Pyro higlevel API
Public Member Functions | List of all members
os::Volumes Class Reference

Information about the mounted volumes. More...

Public Member Functions

 Volumes ()
 
 ~Volumes ()
 
uint GetMountPointCount ()
 Return the number of mount points. More...
 
status_t GetMountPoint (uint nIndex, String *cMountPoint)
 Return a mountpoint. More...
 
status_t GetFSInfo (uint nIndex, fs_info *psInfo)
 Return information about a mounted filesystem. More...
 
WindowMountDialog (const Messenger &cMsgTarget, Message *pcMountMsg)
 Create a mount dialog. More...
 
void Unmount (String cMountPoint, const Messenger &cMsgTarget, Message *pcFinishMsg)
 Unmounts a volume. More...
 

Detailed Description

Description:
This class makes it possible to get a list of the mounted volumes and also offers a way to mount and unmount volumes.
Author
Henrik Isaksson (henri.nosp@m.k@bo.nosp@m.ing.n.nosp@m.u)

Constructor & Destructor Documentation

Volumes::Volumes ( )
Volumes::~Volumes ( )

Member Function Documentation

status_t Volumes::GetFSInfo ( uint  nIndex,
fs_info *  psInfo 
)
Description:
After a successful call of this method, psInfo will contain filesystem related information about the mountpoint specified by nIndex.
Parameters
nIndex- Index of the mountpoint.
psInfo- Pointer to a fs_info structure.
Returns
0 if successful.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Referenced by os::IconDirectoryView::Private::GetDriveIcon(), and os_priv::DirKeeper::Idle().

status_t Volumes::GetMountPoint ( uint  nIndex,
String cMountPoint 
)
Description:
After a successful call of this method, cMountPoint will contain the path of the mountpoint specified by nIndex.
Parameters
nIndex- Index of the mountpoint.
cMountPoint- Will contain the path of the mountpoint after the call.
Returns
0 if successful.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Referenced by os::IconDirectoryView::GetDirIcon(), os::IconDirectoryView::Private::GetDriveIcon(), and os_priv::DirKeeper::Idle().

uint Volumes::GetMountPointCount ( )
Description:
Returns the number of mount points.
Returns
The number of mount points.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

Referenced by os::IconDirectoryView::GetDirIcon(), os::IconDirectoryView::Private::GetDriveIcon(), and os_priv::DirKeeper::Idle().

Window * Volumes::MountDialog ( const Messenger cMsgTarget,
Message pcMountMsg 
)
Description:
Creates a dialog which lists all volumes that can be mounted and lets the user select one. When a volume is mounted, pcMountMsg will be sent to the supplied message target.
Note:
Don’t forget to place the window at the right position and show it.
Parameters
cMsgTarget- The target that will receive the message.
cMountMsg- The message that will be sent.
Returns
Pointer to the created window.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References MountDialogWin::StartScanner().

Referenced by os::IconDirectoryView::HandleMessage().

void Volumes::Unmount ( String  cMountPoint,
const Messenger cMsgTarget,
Message pcFinishMsg 
)
Description:
Unmounts the volume specified by cMountPoint. After the volume has been unmounted, pcFinish will be sent to the supplied message target.
Parameters
cMountPoint- The mountpoint.
cMsgTarget- The target that will receive the message.
cMountMsg- The message that will be sent.
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)

References UnmountThread().

Referenced by os::IconDirectoryView::HandleMessage().