Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

StorageInfo Class Reference

The StorageInfo class describes the disks mounted on the file system. More...

#include </home/clem/local/src/opie/library/storage.h>

Inheritance diagram for StorageInfo:

Inheritance graph
[legend]
Collaboration diagram for StorageInfo:

Collaboration graph
[legend]
List of all members.

Public Slots

void update ()

Signals

void disksChanged ()

Public Member Functions

 StorageInfo (QObject *parent=0)
const QList< FileSystem > & fileSystems () const
const FileSystemfileSystemOf (const QString &filename)

Static Public Member Functions

static bool hasCf ()
 returns whether device has Cf mounted
static bool hasSd ()
 returns whether device has SD mounted
static bool hasMmc ()
 returns whether device has mmc mounted

Private Slots

void cardMessage (const QCString &msg, const QByteArray &data)

Private Attributes

QList< FileSystemmFileSystems
QCopChannelchannel

Detailed Description

The StorageInfo class describes the disks mounted on the file system.

This class provides access to the mount information for the Linux filesystem. Each mount point is represented by the FileSystem class. To ensure this class has the most up to date size information, call the update() method. Note that this will automatically be signaled by the operating system when a disk has been mounted or unmounted.

Definition at line 29 of file storage.h.


Constructor & Destructor Documentation

StorageInfo::StorageInfo QObject *  parent = 0  ) 
 

Constructor that determines the current mount points of the filesystem. The standard parent parameters is passed on to QObject.

Definition at line 93 of file storage.cpp.

References cardMessage(), channel, mFileSystems, TRUE, and update().


Member Function Documentation

void StorageInfo::cardMessage const QCString msg,
const QByteArray data
[private, slot]
 

Definition at line 117 of file storage.cpp.

References update().

Referenced by StorageInfo().

void StorageInfo::disksChanged  )  [signal]
 

Gets emitted when a disk has been mounted or unmounted, such as when a CF c

Referenced by update().

const FileSystem * StorageInfo::fileSystemOf const QString filename  ) 
 

Returns the longest matching FileSystem that starts with the same prefix as filename as its mount point.

Definition at line 106 of file storage.cpp.

References i, mFileSystems, and QString::startsWith().

Referenced by AppLnk::linkFile().

const QList< FileSystem > & StorageInfo::fileSystems  )  const [inline]
 

Returns a list of all available mounted file systems.

Warning:
This may change in Qtopia 3.x to return only relevant Qtopia file systems (and ignore mount points such as /tmp)

Definition at line 35 of file storage.h.

References mFileSystems.

Referenced by Server::cardInfoString(), Opie::Core::OStorageInfo::cfPath(), PFileSystem::changed(), QtRec::changeDirCombo(), FormatterApp::deviceComboSelected(), PMainWindow::dirChanged(), FormatterApp::fillCombos(), QtRec::fillDirectoryCombo(), DCIM_DirLister::findCameras(), Global::findDocuments(), QtRec::getStorage(), MediumMountSetting::MainWindow::init(), DocumentListPrivate::initialize(), Server::installLocationsString(), Opie::Core::OGlobal::isDocumentFileName(), Opie::Core::OStorageInfo::mmcPath(), OFileViewFileListView::OFileViewFileListView(), Opie::Ui::Internal::OFileViewFileListView::OFileViewFileListView(), PlayListWidget::populateAudioView(), PlayListWidget::populateVideoView(), Opie::Core::OStorageInfo::sdPath(), LnkProperties::setupLocations(), Server::storageChanged(), Server::systemMsg(), FileSysInfo::updateMounts(), and SoundSettings::updateStorageCombo().

bool StorageInfo::hasCf  )  [static]
 

returns whether device has Cf mounted

Definition at line 285 of file storage.cpp.

References deviceTab().

Referenced by AdvancedFm::init(), and BackupAndRestore::refreshBackupLocations().

bool StorageInfo::hasMmc  )  [static]
 

returns whether device has mmc mounted

Definition at line 305 of file storage.cpp.

References deviceTab().

Referenced by AdvancedFm::init(), BackupAndRestore::refreshBackupLocations(), and AdvancedFm::SDButtonPushed().

bool StorageInfo::hasSd  )  [static]
 

returns whether device has SD mounted

Definition at line 295 of file storage.cpp.

References deviceTab().

Referenced by AdvancedFm::init(), BackupAndRestore::refreshBackupLocations(), and AdvancedFm::SDButtonPushed().

void StorageInfo::update  )  [slot]
 

Updates the mount and free space available information for each mount point. This method is automatically called when a disk is mounted or unmounted.

Definition at line 130 of file storage.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), disksChanged(), QValueList< T >::end(), FALSE, i, isCF(), QString::left(), mFileSystems, tr, and TRUE.

Referenced by Server::cardInfoString(), cardMessage(), Server::installLocationsString(), StorageInfo(), Server::systemMsg(), and FileSysInfo::updateMounts().


Member Data Documentation

QCopChannel* StorageInfo::channel [private]
 

Definition at line 50 of file storage.h.

Referenced by StorageInfo().

QList<FileSystem> StorageInfo::mFileSystems [private]
 

Definition at line 49 of file storage.h.

Referenced by fileSystemOf(), fileSystems(), StorageInfo(), and update().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:52:33 2005 for OPIE by  doxygen 1.4.2