![]() |
![]() |
![]() |
libgalago Reference Manual | |
---|---|---|---|---|
Top | Description |
#define GALAGO_DBUS_SERVICE #define GALAGO_DBUS_ERROR_INVALID_ATTRIBUTE #define GALAGO_DBUS_ERROR_OBJECT_NOT_FOUND void galago_dbus_message_iter_append_string_or_nil (DBusMessageIter *iter
,const char *str
); const char * galago_dbus_message_iter_get_string_or_nil (DBusMessageIter *iter
); void galago_dbus_message_iter_append_object (DBusMessageIter *iter
,const GalagoObject *object
); void galago_dbus_message_iter_append_object_list (DBusMessageIter *iter
,GType type
,GList *list
); void * galago_dbus_message_iter_get_object (DBusMessageIter *iter
,GType type
); GList * galago_dbus_message_iter_get_object_list (DBusMessageIter *iter
,GType type
); DBusMessage * galago_dbus_message_new_method_call (const GalagoObject *object
,const char *name
,gboolean reply
,DBusMessageIter *ret_iter
); DBusMessage * galago_dbus_message_new_method_call_vargs (const GalagoObject *object
,const char *name
,gboolean reply
,va_list args
); DBusMessage * galago_dbus_message_new_method_call_args (const GalagoObject *object
,const char *name
,gboolean reply
,...
); void galago_dbus_send_message (const GalagoObject *object
,const char *name
,...
); GList * galago_dbus_send_message_with_reply_list (const GalagoObject *object
,const char *name
,GList *return_types
,...
); void * galago_dbus_send_message_with_reply (const GalagoObject *object
,const char *name
,GalagoValue *return_type
,...
); void galago_dbus_object_push_full (GalagoObject *object
);
A set of Galago-specific utility functions for working with D-BUS. These functions should be considered semi-public, but are expected to change in time.
#define GALAGO_DBUS_ERROR_INVALID_ATTRIBUTE "org.freedesktop.Galago.Error.InvalidAttribute"
An "Invalid Attribute" D-BUS message error.
#define GALAGO_DBUS_ERROR_OBJECT_NOT_FOUND "org.freedesktop.Galago.Error.ObjectNotFound"
An "Object Not Found" D-BUS message error.
void galago_dbus_message_iter_append_string_or_nil (DBusMessageIter *iter
,const char *str
);
Appends a string to a message, or an empty string if the passed string is NULL.
|
The message iterator. |
|
The string, or NULL. |
const char * galago_dbus_message_iter_get_string_or_nil
(DBusMessageIter *iter
);
Returns a string that the iterator points to. If the returned string is an empty string (""), this returns NULL.
|
The iterator. |
Returns : |
The string or NULL. |
void galago_dbus_message_iter_append_object (DBusMessageIter *iter
,const GalagoObject *object
);
Appends an object to a D-BUS message.
|
The D-BUS message iterator. |
|
The object to append. |
void galago_dbus_message_iter_append_object_list (DBusMessageIter *iter
,GType type
,GList *list
);
Appends a list of objects to a D-BUS message.
|
The D-BUS message iterator. |
|
The type of the objects inside. |
|
The list of objects to append. |
void * galago_dbus_message_iter_get_object (DBusMessageIter *iter
,GType type
);
Returns an object of the specified type from a D-BUS message.
|
The D-BUS message iterator. |
|
The GType. |
Returns : |
The object. |
GList * galago_dbus_message_iter_get_object_list (DBusMessageIter *iter
,GType type
);
Returns a list of objects of the specified type from a D-BUS message. The returned list must be destroyed.
|
The D-BUS message iterator. |
|
The GType. |
Returns : |
The list. |
DBusMessage * galago_dbus_message_new_method_call (const GalagoObject *object
,const char *name
,gboolean reply
,DBusMessageIter *ret_iter
);
Creates a D-BUS message to the specified object.
|
The object. |
|
The message name. |
|
TRUE if a reply is expected. |
|
The returned message iterator, if not NULL. |
Returns : |
The D-BUS message. |
DBusMessage * galago_dbus_message_new_method_call_vargs (const GalagoObject *object
,const char *name
,gboolean reply
,va_list args
);
Creates a D-BUS message to the specified object with a va_list of parameters.
|
The object. |
|
The message name. |
|
TRUE if a reply is expected. |
|
The va_list of parameters. |
Returns : |
The D-BUS message. |
DBusMessage * galago_dbus_message_new_method_call_args (const GalagoObject *object
,const char *name
,gboolean reply
,...
);
Creates a D-BUS message to the specified object with a list of parameters.
The parameters passed are in GalagoValue, pointer-to-data form.
|
The object. |
|
The message name. |
|
TRUE if a reply is expected. |
|
The list of parameters. |
Returns : |
The D-BUS message. |
void galago_dbus_send_message (const GalagoObject *object
,const char *name
,...
);
Sends a new D-BUS message with an object, name, and parameters.
The parameters passed are in GalagoValue, pointer-to-data form.
|
The object. |
|
The message name. |
|
The list of parameters. |
GList * galago_dbus_send_message_with_reply_list (const GalagoObject *object
,const char *name
,GList *return_types
,...
);
Sends a new D-BUS message with an object, name, and parameters, and waits for a reply with a variable list of return types.
The parameters passed are in GalagoValue, pointer-to-data form.
|
The object. |
|
The message name. |
|
A list of expected return types, in order. |
|
The list of parameters. |
Returns : |
The returned data in a list. The list will need to be g_freed, as may some of its data. |
void * galago_dbus_send_message_with_reply (const GalagoObject *object
,const char *name
,GalagoValue *return_type
,...
);
Sends a new D-BUS message with an object, name, and parameters, and waits for a reply.
The parameters passed are in GalagoValue, pointer-to-data form.
|
The object. |
|
The message name. |
|
The expected return type. |
|
The list of parameters. |
Returns : |
The returned data. This may need to be g_freed. |
void galago_dbus_object_push_full (GalagoObject *object
);
Pushes an object and all its internal data to the server.
This is meant for internal use.
|
The object to push. |