typedef struct _DBusGConnection | DBusGConnection |
Convert to DBusConnection with dbus_g_connection_get_connection() in dbus-glib-lowlevel.h
typedef struct _DBusGMessage | DBusGMessage |
Convert to DBusMessage with dbus_g_message_get_message() in dbus-glib-lowlevel.h
IMPORT_C GType | dbus_g_connection_get_g_type | ( | void | ) |
dbus_g_connection_get_g_type: Get the GLib type ID for a DBusGConnection boxed type.
Returns: the GLib type
IMPORT_C GType | dbus_g_message_get_g_type | ( | void | ) |
dbus_g_message_get_g_type: Get the GLib type ID for a DBusGMessage boxed type.
Returns: the GLib type
IMPORT_C DBusGConnection * | dbus_g_connection_ref | ( | DBusGConnection * | connection | ) |
dbus_g_connection_ref: the DBusGConnection to ref
Increment refcount on a DBusGConnection
Returns: the connection that was ref'd
IMPORT_C void | dbus_g_connection_unref | ( | DBusGConnection * | connection | ) |
dbus_g_connection_unref: : the connection to unref
Decrement refcount on a DBusGConnection
IMPORT_C DBusGMessage * | dbus_g_message_ref | ( | DBusGMessage * | message | ) |
SECTION:dbus-gmessage : DBus Message : DBusMessage : Stable
A DBusGConnection is a boxed type abstracting a DBusMessage. dbus_g_message_ref: : the message to ref
Increment refcount on a DBusGMessage
Returns: the message that was ref'd
IMPORT_C void | dbus_g_message_unref | ( | DBusGMessage * | message | ) |
dbus_g_message_unref: : the message to unref
Decrement refcount on a DBusGMessage
IMPORT_C void | dbus_g_connection_flush | ( | DBusGConnection * | connection | ) |
SECTION:dbus-gconnection : DBus Connection : DBusConnection : Stable
A DBusGConnection is a boxed type abstracting a DBusConnection. dbus_g_connection_flush: : the DBusGConnection to flush
Blocks until outgoing calls and signal emissions have been sent.
IMPORT_C GQuark | dbus_g_error_quark | ( | void | ) |
SECTION:dbus-gerror : DBus GError : GError : Stable
DBusGError is the GError used by DBus. dbus_g_error_quark:
The implementation of DBUS_GERROR error domain. See documentation for GError in GLib reference manual.
Returns: the error domain quark for use with GError
IMPORT_C const char * | dbus_g_error_get_name | ( | GError * | error | ) |
IMPORT_C void | dbus_g_thread_init | ( | void | ) |
dbus_g_thread_init:
Initializes the D-BUS thread system. This function may only be called once and must be called prior to calling any other function in the D-BUS API.
IMPORT_C DBusGConnection * | dbus_g_connection_open | ( | const gchar * | address, |
GError ** | error | |||
) |
dbus_g_connection_open: : address of the connection to open : address where an error can be returned.
Returns a connection to the given address.
(Internally, calls dbus_connection_open() then calls dbus_connection_setup_with_g_main() on the result.)
Returns: a DBusConnection
IMPORT_C DBusGConnection * | dbus_g_bus_get | ( | DBusBusType | type, |
GError ** | error | |||
) |
dbus_g_bus_get: : bus type : address where an error can be returned.
Returns a connection to the given bus. The connection is a global variable shared with other callers of this function.
(Internally, calls dbus_bus_get() then calls dbus_connection_setup_with_g_main() on the result.)
Returns: a DBusConnection
typedef struct _DBusGObjectInfo | DBusGObjectInfo |
typedef struct _DBusGMethodInfo | DBusGMethodInfo |
IMPORT_C void | dbus_g_object_type_install_info | ( | GType | object_type, |
const DBusGObjectInfo * | info | |||
) |
SECTION:dbus-gobject : Exporting a GObject remotely : GObject : Stable
FIXME dbus_g_object_type_install_info: : GType for the object : introspection data generated by #dbus-glib-tool
Install introspection information about the given object GType sufficient to allow methods on the object to be invoked by name. The introspection information is normally generated by dbus-glib-tool, then this function is called in the class_init() for the object class.
Once introspection information has been installed, instances of the object registered with dbus_g_connection_register_g_object() can have their methods invoked remotely.
dbus_g_error_domain_register: : the GError domain : the D-BUS interface used for error values by default, or NULL : a GType for a #GEnum of the error codes
Register a GError domain and set of codes with D-BUS. You must have created a GEnum for the error codes. This function will not be needed with an introspection-capable GLib.
IMPORT_C void | dbus_g_connection_register_g_object | ( | DBusGConnection * | connection, |
const char * | at_path, | |||
GObject * | object | |||
) |
dbus_g_connection_register_g_object: : the D-BUS connection : the path where the object will live (the object's name) : the object
Registers a GObject at the given path. Properties, methods, and signals of the object can then be accessed remotely. Methods are only available if method introspection data has been added to the object's class with g_object_class_install_info().
The registration will be cancelled if either the DBusConnection or the GObject gets finalized.
IMPORT_C GObject * | dbus_g_connection_lookup_g_object | ( | DBusGConnection * | connection, |
const char * | at_path | |||
) |
IMPORT_C GType | dbus_g_object_path_get_g_type | ( | void | ) |
Get the GLib type ID for a DBusGObjectPath boxed type.
Returns: GLib type
IMPORT_C void | dbus_g_object_register_marshaller | ( | GClosureMarshal | marshaller, |
GType | rettype, | |||
... | ||||
) |
dbus_g_object_register_marshaller: : a GClosureMarshal to be used for invocation : a GType for the return type of the function @:... The parameter #GTypes, followed by G_TYPE_INVALID
Register a GClosureMarshal to be used for signal invocations, giving its return type and a list of parameter types, followed by G_TYPE_INVALID.
This function will not be needed once GLib includes libffi.
void | dbus_g_object_register_marshaller_array | ( | GClosureMarshal | marshaller, |
GType | rettype, | |||
guint | n_types, | |||
const GType * | types | |||
) |
dbus_g_object_register_marshaller_array: : a GClosureMarshal to be used for invocation : a GType for the return type of the function : number of function parameters : a C array of GTypes values
Register a GClosureMarshal to be used for signal invocations. dbus_g_object_register_marshaller
typedef struct _DBusGProxy | DBusGProxy |
typedef struct _DBusGProxyClass | DBusGProxyClass |
typedef struct _DBusGProxyCall | DBusGProxyCall |
typedef void(* | DBusGProxyCallNotify |
IMPORT_C GType | dbus_g_proxy_get_type | ( | void | ) |
SECTION:dbus-gproxy : DBus Proxy : #DBusProxy : Stable
A DBusGProxy is a boxed type abstracting a #DBusProxy. dbus_g_proxy_get_type: Standard GObject get_type() function for DBusGProxy.
Returns: type ID for DBusGProxy class
IMPORT_C DBusGProxy * | dbus_g_proxy_new_for_name | ( | DBusGConnection * | connection, |
const char * | name, | |||
const char * | path, | |||
const char * | interface | |||
) |
IMPORT_C DBusGProxy * | dbus_g_proxy_new_for_name_owner | ( | DBusGConnection * | connection, |
const char * | name, | |||
const char * | path, | |||
const char * | interface, | |||
GError ** | error | |||
) |
IMPORT_C DBusGProxy * | dbus_g_proxy_new_from_proxy | ( | DBusGProxy * | proxy, |
const char * | interface, | |||
const char * | path_name | |||
) |
IMPORT_C DBusGProxy * | dbus_g_proxy_new_for_peer | ( | DBusGConnection * | connection, |
const char * | path_name, | |||
const char * | interface_name | |||
) |
dbus_g_proxy_new_for_peer: : the connection to the peer : name of the object inside the peer to call methods on : name of the interface to call methods on
Creates a proxy for an object in peer application (one we're directly connected to). That is, this function is intended for use when there's no message bus involved, we're doing a simple 1-to-1 communication between two applications.
Returns: new proxy object
IMPORT_C void | dbus_g_proxy_set_interface | ( | DBusGProxy * | proxy, |
const char * | interface_name | |||
) |
dbus_g_proxy_set_interface: : the proxy : an object interface
Sets the object interface proxy is bound to
IMPORT_C void | dbus_g_proxy_add_signal | ( | DBusGProxy * | proxy, |
const char * | signal_name, | |||
GType | first_type, | |||
... | ||||
) |
dbus_g_proxy_add_signal: : the proxy for a remote interface : the name of the signal : the first argument type, or G_TYPE_INVALID if none
Specifies the argument signature of a signal;.only necessary if the remote object does not support introspection. The arguments specified are the GLib types expected.
IMPORT_C void | dbus_g_proxy_connect_signal | ( | DBusGProxy * | proxy, |
const char * | signal_name, | |||
GCallback | handler, | |||
void * | data, | |||
GClosureNotify | free_data_func | |||
) |
dbus_g_proxy_connect_signal: : a proxy for a remote interface : the DBus signal name to listen for : the handler to connect : data to pass to handler : callback function to destroy data
Connect a signal handler to a proxy for a remote interface. When the remote interface emits the specified signal, the proxy will emit a corresponding GLib signal.
IMPORT_C void | dbus_g_proxy_disconnect_signal | ( | DBusGProxy * | proxy, |
const char * | signal_name, | |||
GCallback | handler, | |||
void * | data | |||
) |
dbus_g_proxy_disconnect_signal: : a proxy for a remote interface : the DBus signal name to disconnect : the handler to disconnect : the data that was registered with handler
Disconnect all signal handlers from a proxy that match the given criteria.
IMPORT_C gboolean | dbus_g_proxy_call | ( | DBusGProxy * | proxy, |
const char * | method, | |||
GError ** | error, | |||
GType | first_arg_type, | |||
... | ||||
) |
dbus_g_proxy_call: : a proxy for a remote interface : method to invoke : return location for an error : type of first "in" argument
Function for synchronously invoking a method and receiving reply values. This function is equivalent to dbus_g_proxy_begin_call followed by dbus_g_proxy_end_call. All of the input arguments are specified first, followed by G_TYPE_INVALID, followed by all of the output values, followed by a second G_TYPE_INVALID. Note that this means you must always specify G_TYPE_INVALID twice.
Returns: FALSE if an error is set, TRUE otherwise.
IMPORT_C gboolean | dbus_g_proxy_call_with_timeout | ( | DBusGProxy * | proxy, |
const char * | method, | |||
int | timeout, | |||
GError ** | error, | |||
GType | first_arg_type, | |||
... | ||||
) |
dbus_g_proxy_call_with_timeout: : a proxy for a remote interface : method to invoke : specify the timeout in milliseconds : return location for an error : type of first "in" argument
Function for synchronously invoking a method and receiving reply values. This function is equivalent to dbus_g_proxy_begin_call followed by dbus_g_proxy_end_call. All of the input arguments are specified first, followed by G_TYPE_INVALID, followed by all of the output values, followed by a second G_TYPE_INVALID. Note that this means you must always specify G_TYPE_INVALID twice.
Returns: FALSE if an error is set, TRUE otherwise.
IMPORT_C void | dbus_g_proxy_call_no_reply | ( | DBusGProxy * | proxy, |
const char * | method, | |||
GType | first_arg_type, | |||
... | ||||
) |
dbus_g_proxy_call_no_reply: : a proxy for a remote interface : the name of the method to invoke : type of the first argument
Sends a method call message as with dbus_g_proxy_begin_call(), but does not ask for a reply or allow you to receive one.
TODO: this particular function shouldn't die on out of memory, since you should be able to do a call with large arguments.
IMPORT_C DBusGProxyCall * | dbus_g_proxy_begin_call | ( | DBusGProxy * | proxy, |
const char * | method, | |||
DBusGProxyCallNotify | notify, | |||
gpointer | data, | |||
GDestroyNotify | destroy, | |||
GType | first_arg_type, | |||
... | ||||
) |
dbus_g_proxy_begin_call: : a proxy for a remote interface : the name of the method to invoke : callback to be invoked when method returns : user data passed to callback : function called to destroy user_data : type of the first argument
Asynchronously invokes a method on a remote interface. The method call will not be sent over the wire until the application returns to the main loop, or blocks in dbus_connection_flush() to write out pending data. The call will be completed after a timeout, or when a reply is received. When the call returns, the callback specified will be invoked; you can then collect the results of the call (which may be an error, or a reply), use dbus_g_proxy_end_call().
TODO this particular function shouldn't die on out of memory, since you should be able to do a call with large arguments.
Returns: call identifier.
IMPORT_C DBusGProxyCall * | dbus_g_proxy_begin_call_with_timeout | ( | DBusGProxy * | proxy, |
const char * | method, | |||
DBusGProxyCallNotify | notify, | |||
gpointer | user_data, | |||
GDestroyNotify | destroy, | |||
int | timeout, | |||
GType | first_arg_type, | |||
... | ||||
) |
dbus_g_proxy_begin_call_with_timeout: : a proxy for a remote interface : the name of the method to invoke : callback to be invoked when method returns : user data passed to callback : function called to destroy user_data : specify the timeout in milliseconds : type of the first argument
Asynchronously invokes a method on a remote interface. The method call will not be sent over the wire until the application returns to the main loop, or blocks in dbus_connection_flush() to write out pending data. The call will be completed after a timeout, or when a reply is received. When the call returns, the callback specified will be invoked; you can then collect the results of the call (which may be an error, or a reply), use dbus_g_proxy_end_call().
TODO this particular function shouldn't die on out of memory, since you should be able to do a call with large arguments.
Returns: call identifier.
IMPORT_C gboolean | dbus_g_proxy_end_call | ( | DBusGProxy * | proxy, |
DBusGProxyCall * | call, | |||
GError ** | error, | |||
GType | first_arg_type, | |||
... | ||||
) |
dbus_g_proxy_end_call: : a proxy for a remote interface : the pending call ID from dbus_g_proxy_begin_call() : return location for an error : type of first "out" argument
Collects the results of a method call. The method call was normally initiated with dbus_g_proxy_end_call(). You may use this function outside of the callback given to dbus_g_proxy_begin_call; in that case this function will block if the results haven't yet been received.
If the call results in an error, the error is set as normal for GError and the function returns FALSE.
Otherwise, the "out" parameters and return value of the method are stored in the provided varargs list. The list should be terminated with G_TYPE_INVALID.
Returns: FALSE if an error is set.
IMPORT_C void | dbus_g_proxy_cancel_call | ( | DBusGProxy * | proxy, |
DBusGProxyCall * | call | |||
) |
dbus_g_proxy_cancel_call : a proxy for a remote interface : the pending call ID from dbus_g_proxy_begin_call()
Cancels a pending method call. The method call was normally initiated with dbus_g_proxy_begin_call(). This function may not be used on pending calls that have already been ended with dbus_g_proxy_end_call.
IMPORT_C const char * | dbus_g_proxy_get_path | ( | DBusGProxy * | proxy | ) |
dbus_g_proxy_get_path: Gets the path this proxy is bound to : the proxy
Returns: an object path
IMPORT_C const char * | dbus_g_proxy_get_bus_name | ( | DBusGProxy * | proxy | ) |
dbus_g_proxy_get_bus_name: : the proxy
Gets the bus name a proxy is bound to (may be NULL in some cases). If you created the proxy with dbus_g_proxy_new_for_name(), then the name you passed to that will be returned. If you created it with dbus_g_proxy_new_for_name_owner(), then the unique connection name will be returned. If you created it with dbus_g_proxy_new_for_peer() then NULL will be returned.
Returns: the bus name the proxy sends messages to
IMPORT_C const char * | dbus_g_proxy_get_interface | ( | DBusGProxy * | proxy | ) |
dbus_g_proxy_get_interface: : the proxy
Gets the object interface proxy is bound to (may be NULL in some cases).
Returns: an object interface
typedef struct _DBusGMethodInvocation | DBusGMethodInvocation |
IMPORT_C void | dbus_g_method_return | ( | DBusGMethodInvocation * | context, |
... | ||||
) |
dbus_g_method_return: : the method context
Send a return message for a given method invocation, with arguments. This function also frees the sending context.
IMPORT_C void | dbus_g_method_return_error | ( | DBusGMethodInvocation * | context, |
GError * | error | |||
) |
dbus_g_method_return_error: : the method context : the error to send
Send a error message for a given method invocation. This function also frees the sending context.