| Top |
Instances of the EggDBusMethodInvocation class are used when handling D-Bus method calls. It provides a way to get information (such as the UNIX process identifier if applicable) about the remote end invoking the method. It also provides a mechanism to return errors.
EggDBusMethodInvocation * egg_dbus_method_invocation_new (EggDBusMessage *request_message,gpointer source_tag);
Creates a new EggDBusMethodInvocation. This method is only useful for language bindings.
gpointer
egg_dbus_method_invocation_get_source_tag
(EggDBusMethodInvocation *method_invocation);
Gets the user provided tag for method_invocation
. This method is only useful for
language bindings.
EggDBusMessage *
egg_dbus_method_invocation_create_reply_message
(EggDBusMethodInvocation *method_invocation);
Creates a EggDBusMessage in reply to the EggDBusMessage passed when
method_invocation
was created. This method is only useful for
language bindings.
const gchar *
egg_dbus_method_invocation_get_caller (EggDBusMethodInvocation *method_invocation);
Gets the unique bus name of the caller of the method.
EggDBusConnection *
egg_dbus_method_invocation_get_connection
(EggDBusMethodInvocation *method_invocation);
Gets the EggDBusConnection that method_invocation
is associated with.
void egg_dbus_method_invocation_add_destroy_notify (EggDBusMethodInvocation *method_invocation,gpointer data,GDestroyNotify func);
Makes method_invocation
call func
with a a single parameter,
data
, upon finalization.
void egg_dbus_method_invocation_return_error (EggDBusMethodInvocation *method_invocation,GQuark domain,gint code,const gchar *format,...);
Use this to return an error when handling a D-Bus method call. The error will be propagated to the remote caller.
This completes the method invocation and you don't have to call the corresponding
method in your D-Bus method call handler._finish()
void egg_dbus_method_invocation_return_error_valist (EggDBusMethodInvocation *method_invocation,GQuark domain,gint code,const gchar *format,va_list var_args);
Like egg_dbus_method_invocation_return_error() but intended for language bindings.
void egg_dbus_method_invocation_return_error_literal (EggDBusMethodInvocation *method_invocation,GQuark domain,gint code,const gchar *message);
Like egg_dbus_method_invocation_return_error() but without
printf()-style formatting.
void egg_dbus_method_invocation_return_gerror (EggDBusMethodInvocation *method_invocation,GError *error);
Like egg_dbus_method_invocation_return_error() but takes a a GError instead.
void egg_dbus_method_invocation_return_dbus_error (EggDBusMethodInvocation *method_invocation,const gchar *name,const gchar *format,...);
Use this to return a raw D-Bus error when handling a D-Bus method call. The error will be propagated to the remote caller.
This completes the method invocation and you don't have to call the corresponding
method in your D-Bus method call handler._finish()
void egg_dbus_method_invocation_return_dbus_error_valist (EggDBusMethodInvocation *method_invocation,const gchar *name,const gchar *format,va_list var_args);
Like egg_dbus_method_invocation_return_dbus_error() but intended for langauge bindings.
void egg_dbus_method_invocation_return_dbus_error_literal (EggDBusMethodInvocation *method_invocation,const gchar *name,const gchar *message);
Like egg_dbus_method_invocation_return_dbus_error() but without
printf()-style formatting.