Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

MNT library

A convenience library used to communicate with the MNT daemon using D-BUS. More...

Functions

DBusHandlerResult filter_func (DBusConnection *connection, DBusMessage *message, void *user_data)
 Message handler for method invocations.

int mnt_init (PLIBMNTFUNCS cb_functions, void *data)
 Initialize the MNT library.

int mnt_quit (void)
 Shutdown the MNT library.

char ** mnt_get_all_volumes (int *num_volumes)
 Get all volumes from mntd (with dbus method call).

char * mnt_get_mntpnt (char *udi)
 Get mount point for a specific volume.


Variables

LIBMNTFUNCS dummy_functions
 Dummy NULL callback functions.


Detailed Description

A convenience library used to communicate with the MNT daemon using D-BUS.


Function Documentation

DBusHandlerResult filter_func DBusConnection *  connection,
DBusMessage *  message,
void *  user_data
[static]
 

Message handler for method invocations.

All invocations on any object or interface is routed through this function.

Parameters:
connection D-BUS connection
message Message
user_data User data
Returns:
What to do with the message

Definition at line 63 of file libmnt.c.

References LIBMNTFUNCS_::volume_mounted, and LIBMNTFUNCS_::volume_unmounted.

Referenced by mnt_init().

char** mnt_get_all_volumes int *  num_volumes  ) 
 

Get all volumes from mntd (with dbus method call).

You have to free each element and the data array by yourself.

Parameters:
num_volumes Integer pointer will hold number of found volumes, if successful
Returns:
data pointer if successful, NULL otherwise

Definition at line 258 of file libmnt.c.

char* mnt_get_mntpnt char *  udi  ) 
 

Get mount point for a specific volume.

You have to free to returned mount point string yourself.

Parameters:
udi udi of volume
Returns:
mount point if successful, NULL otherwise

Definition at line 333 of file libmnt.c.

int mnt_init PLIBMNTFUNCS  cb_functions,
void *  data
 

Initialize the MNT library.

Parameters:
cb_functions Callback functions. If this is set to NULL then the library will not listen for notifications.
data User data pointer will be passed to callbacks
Returns:
0 if successful, -1 otherwise

Definition at line 126 of file libmnt.c.

References dummy_functions, filter_func(), and LIBMNTFUNCS_::main_loop.

int mnt_quit void   ) 
 

Shutdown the MNT library.

Returns:
0 if successful, -1 otherwise

Definition at line 237 of file libmnt.c.


Variable Documentation

LIBMNTFUNCS dummy_functions [static]
 

Initial value:

 {
    NULL, 
    NULL, 
    NULL  
}
Dummy NULL callback functions.

Definition at line 111 of file libmnt.c.

Referenced by mnt_init().


Generated on Thu May 27 23:27:29 2004 for Mntd by doxygen 1.3.5