-rw-r--r-- | library/storage.cpp | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/library/storage.cpp b/library/storage.cpp index 4e07ec6..1ce43bc 100644 --- a/library/storage.cpp +++ b/library/storage.cpp @@ -68,2 +68,17 @@ static bool isCF(const QString& m) +/*! \class StorageInfo storage.h + \brief 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. + + \ingroup qtopiaemb +*/ + +/*! Constructor that determines the current mount points of the filesystem. + The standard \a parent parameters is passed on to QObject. + */ StorageInfo::StorageInfo( QObject *parent ) @@ -78,2 +93,5 @@ StorageInfo::StorageInfo( QObject *parent ) +/*! Returns the longest matching FileSystem that starts with the + same prefix as \a filename as its mount point. +*/ const FileSystem *StorageInfo::fileSystemOf( const QString &filename ) @@ -93,2 +111,8 @@ void StorageInfo::cardMessage( const QCString& msg, const QByteArray& ) } + + +/*! Updates the mount and free space available information for each mount + point. This method is automatically called when a disk is mounted or + unmounted. +*/ // cause of the lack of a d pointer we need @@ -236,3 +260,12 @@ bool StorageInfo::hasMmc() +/*! \fn const QList<FileSystem> &StorageInfo::fileSystems() const + 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) +*/ + +/*! \fn void StorageInfo::disksChanged() + Gets emitted when a disk has been mounted or unmounted, such as when + a CF c +*/ //--------------------------------------------------------------------------- @@ -261 +294,53 @@ void FileSystem::update() +/*! \class FileSystem storage.h + \brief The FileSystem class describes a single mount point. + + This class simply returns information about a mount point, including + file system name, mount point, human readable name, size information + and mount options information. + \ingroup qtopiaemb + + \sa StorageInfo +*/ + +/*! \fn const QString &FileSystem::disk() const + Returns the file system name, such as /dev/hda3 +*/ + +/*! \fn const QString &FileSystem::path() const + Returns the mount path, such as /home +*/ + +/*! \fn const QString &FileSystem::name() const + Returns the translated, human readable name for the mount directory. +*/ + +/*! \fn const QString &FileSystem::options() const + Returns the mount options +*/ + +/*! \fn long FileSystem::blockSize() const + Returns the size of each block on the file system. +*/ + +/*! \fn long FileSystem::totalBlocks() const + Returns the total number of blocks on the file system +*/ + +/*! \fn long FileSystem::availBlocks() const + Returns the number of available blocks on the file system + */ + +/*! \fn bool FileSystem::isRemovable() const + Returns flag whether the file system can be removed, such as a CF card + would be removable, but the internal memory wouldn't +*/ + +/*! \fn bool FileSystem::isWritable() const + Returns flag whether the file system is mounted as writable or read-only. + Returns FALSE if read-only, TRUE if read and write. +*/ + +/*! \fn QStringList StorageInfo::fileSystemNames() const + Returns a list of filesystem names. +*/ |