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

D-BUS Manager
[MNT daemon]

Manager for D-BUS messages for MNT Daemon. More...

Functions

int mntd_dbus_init (void *user_data)
 Initialize DBUS stuff for MNT daemon (biz.bambach.Mnt).
int mntd_dbus_quit (void)
 Quit DBUS for MNT daemon.
void mntd_dbus_raise_no_such_device (DBusConnection *connection, DBusMessage *in_reply_to, const char *udi)
 Raise the biz.bambach.Mnt.NoSuchDevice error.
void mntd_dbus_raise_syntax (DBusConnection *connection, DBusMessage *in_reply_to, const char *method_name)
 Raise the biz.bambach.Mnt.SyntaxError error.
void mntd_dbus_raise_no_mntpnt (DBusConnection *connection, DBusMessage *in_reply_to, const char *udi)
 Raise the biz.bambach.Mnt.NoMntPnt error.
DBusHandlerResult mntd_dbus_manager_filter_function (DBusConnection *connection, DBusMessage *message, void *user_data)
 Message handler for method invocations.
void mntd_dbus_manager_send_signal_volume_mounted (PVOLUME pv)
 Send signal VolumeAdded(string udi) on the biz.bambach.Mnt.Manager interface on the object /biz/bambach/Mnt/Manager.
void mntd_dbus_manager_send_signal_volume_unmounted (PVOLUME pv)
 Send signal VolumeRemoved(string udi) on the biz.bambach.Mnt.Manager interface on the object /biz/bambach/Mnt/Manager.
int cb_append_udi (void *data, void *userdata)
 Callback for each entry in volumes.
DBusHandlerResult mntd_dbus_manager_get_all_volumes (PVOLUMEMANAGER pvm, DBusConnection *connection, DBusMessage *message)
 Get all volumes.
DBusHandlerResult mntd_dbus_manager_get_mntpnt (PVOLUMEMANAGER pvm, DBusConnection *connection, DBusMessage *message)
 Get mount point.
DBusHandlerResult mntd_dbus_manager_remount (PVOLUMEMANAGER pvm, DBusConnection *connection, DBusMessage *message)
 Remount mount point.

Variables

DBusConnection * dbus_connection = NULL
 D-Bus connection object for the MNT service.

Detailed Description

Manager for D-BUS messages for MNT Daemon.


Function Documentation

int cb_append_udi void *  data,
void *  userdata
 

Callback for each entry in volumes.

Parameters:
data PHASHELEMENT pointer
userdata dbus iterator pointer
Returns:
0 if successful, -1 otherwise

Definition at line 553 of file mntd_dbus_manager.c.

Referenced by mntd_dbus_manager_get_all_volumes().

int mntd_dbus_init void *  user_data  ) 
 

Initialize DBUS stuff for MNT daemon (biz.bambach.Mnt).

Parameters:
user_data pointer to user_data structure (MNTDDATA)
Returns:
0 if successful, -1 otherwise

Definition at line 74 of file mntd_dbus_manager.c.

References dbus_connection, DBUS_INTERFACE_MNT_BLOCK, DBUS_INTERFACE_MNT_DISC, DBUS_INTERFACE_MNT_TTY, DBUS_PATH_MNT_BLOCK, DBUS_PATH_MNT_DISC, DBUS_PATH_MNT_TTY, DBUS_SERVICE_MNT, mntd_dbus_manager_filter_function(), mntd_dbus_quit(), and MSG_INF.

Referenced by main().

DBusHandlerResult mntd_dbus_manager_filter_function DBusConnection *  connection,
DBusMessage *  message,
void *  user_data
 

Message handler for method invocations.

All invocations on any object or interface is routed through this function. All method calls for MNT daemon will be handled here.

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

Definition at line 287 of file mntd_dbus_manager.c.

References DBUS_INTERFACE_MNT_BLOCK, DBUS_INTERFACE_MNT_DISC, DBUS_INTERFACE_MNT_MANAGER, DBUS_INTERFACE_MNT_TTY, MNTDDATA_::disconnect, mntd_dbus_manager_get_all_volumes(), mntd_dbus_manager_get_mntpnt(), mntd_dbus_manager_remount(), MSG_DEBUG, and MNTDDATA_::vols.

Referenced by mntd_dbus_init().

DBusHandlerResult mntd_dbus_manager_get_all_volumes PVOLUMEMANAGER  pvm,
DBusConnection *  connection,
DBusMessage *  message
 

Get all volumes.

  array{object_reference} Manager.GetAllVolumes()
  

Parameters:
pvm pointer to volume manager
connection D-BUS connection
message Message
Returns:
What to do with the message

Definition at line 603 of file mntd_dbus_manager.c.

References cb_append_udi(), and MSG_EMERG.

Referenced by mntd_dbus_manager_filter_function().

DBusHandlerResult mntd_dbus_manager_get_mntpnt PVOLUMEMANAGER  pvm,
DBusConnection *  connection,
DBusMessage *  message
 

Get mount point.

  string{object_reference} Manager.GetMntPnt()
  

Parameters:
pvm pointer to volume manager
connection D-BUS connection
message Message
Returns:
What to do with the message

Definition at line 658 of file mntd_dbus_manager.c.

References VOLUME_::get_mntpnt, mntd_dbus_raise_no_mntpnt(), mntd_dbus_raise_no_such_device(), mntd_dbus_raise_syntax(), and MSG_EMERG.

Referenced by mntd_dbus_manager_filter_function().

DBusHandlerResult mntd_dbus_manager_remount PVOLUMEMANAGER  pvm,
DBusConnection *  connection,
DBusMessage *  message
 

Remount mount point.

Parameters:
pvm pointer to volume manager
connection D-BUS connection
message Message
Returns:
What to do with the message

Definition at line 736 of file mntd_dbus_manager.c.

References mntd_dbus_raise_no_mntpnt(), mntd_dbus_raise_no_such_device(), mntd_dbus_raise_syntax(), MSG_EMERG, and VOLUME_::remount.

Referenced by mntd_dbus_manager_filter_function().

void mntd_dbus_manager_send_signal_volume_mounted PVOLUME  pv  ) 
 

Send signal VolumeAdded(string udi) on the biz.bambach.Mnt.Manager interface on the object /biz/bambach/Mnt/Manager.

Parameters:
pv Pointer to Volume Object

Definition at line 481 of file mntd_dbus_manager.c.

References dbus_connection, DBUS_INTERFACE_MNT_MANAGER, DBUS_PATH_MNT_MANAGER, and MSG_EMERG.

Referenced by mntd_volume_send_mounted().

void mntd_dbus_manager_send_signal_volume_unmounted PVOLUME  pv  ) 
 

Send signal VolumeRemoved(string udi) on the biz.bambach.Mnt.Manager interface on the object /biz/bambach/Mnt/Manager.

Parameters:
pv Pointer to Volume Object

Definition at line 517 of file mntd_dbus_manager.c.

References dbus_connection, DBUS_INTERFACE_MNT_MANAGER, DBUS_PATH_MNT_MANAGER, and MSG_EMERG.

Referenced by mntd_volume_send_unmounted().

int mntd_dbus_quit void   ) 
 

Quit DBUS for MNT daemon.

Returns:
0 if successful, -1 otherwise

Definition at line 169 of file mntd_dbus_manager.c.

References dbus_connection.

Referenced by main(), and mntd_dbus_init().

void mntd_dbus_raise_no_mntpnt DBusConnection *  connection,
DBusMessage *  in_reply_to,
const char *  udi
 

Raise the biz.bambach.Mnt.NoMntPnt error.

Parameters:
connection D-Bus connection
in_reply_to message to report error on
udi Unique device id given

Definition at line 252 of file mntd_dbus_manager.c.

References DBUS_ERROR_NO_MNTPNT, and MSG_EMERG.

Referenced by mntd_dbus_manager_get_mntpnt(), and mntd_dbus_manager_remount().

void mntd_dbus_raise_no_such_device DBusConnection *  connection,
DBusMessage *  in_reply_to,
const char *  udi
 

Raise the biz.bambach.Mnt.NoSuchDevice error.

Parameters:
connection D-Bus connection
in_reply_to message to report error on
udi Unique device id given

Definition at line 187 of file mntd_dbus_manager.c.

References DBUS_ERROR_NO_SUCH_DEVICE, and MSG_EMERG.

Referenced by mntd_dbus_manager_get_mntpnt(), and mntd_dbus_manager_remount().

void mntd_dbus_raise_syntax DBusConnection *  connection,
DBusMessage *  in_reply_to,
const char *  method_name
 

Raise the biz.bambach.Mnt.SyntaxError error.

Parameters:
connection D-Bus connection
in_reply_to message to report error on
method_name Name of the method that was invoked with the wrong signature

Definition at line 219 of file mntd_dbus_manager.c.

References DBUS_ERROR_SYNTAX, and MSG_EMERG.

Referenced by mntd_dbus_manager_get_mntpnt(), and mntd_dbus_manager_remount().


Generated on Wed Mar 30 13:43:27 2005 for Mntd by  doxygen 1.3.9.1