index.html
Main Page
|
modules.html
Modules
|
namespaces.html
Namespace List
|
hierarchy.html
Class Hierarchy
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
namespacemembers.html
Namespace Members
|
functions.html
Data Fields
|
pages.html
Related Pages
GLib bindings
API for using D-BUS with GLib.
#_details
More...
Data Structures
struct
structDBusGFuncSignature.html
DBusGFuncSignature
Functions
void
group__DBusGLib.html#ga0
dbus_g_connection_flush
(DBusGConnection *connection)
Blocks until outgoing calls and signal emissions have been sent.
#ga0
DBusGConnection *
group__DBusGLib.html#ga1
dbus_g_connection_ref
(DBusGConnection *gconnection)
Increment refcount on a DBusGConnection.
#ga1
void
group__DBusGLib.html#ga2
dbus_g_connection_unref
(DBusGConnection *gconnection)
Decrement refcount on a DBusGConnection.
#ga2
DBusGMessage *
group__DBusGLib.html#ga3
dbus_g_message_ref
(DBusGMessage *gmessage)
Increment refcount on a DBusGMessage.
#ga3
void
group__DBusGLib.html#ga4
dbus_g_message_unref
(DBusGMessage *gmessage)
Decrement refcount on a DBusGMessage.
#ga4
GQuark
group__DBusGLib.html#ga5
dbus_g_error_quark
(void)
The implementation of DBUS_GERROR error domain.
#ga5
gboolean
group__DBusGLib.html#ga6
dbus_g_error_has_name
(GError *error, const char *name)
Determine whether D-BUS error name for a remote exception matches the given name.
#ga6
const char *
group__DBusGLib.html#ga7
dbus_g_error_get_name
(GError *error)
Return the D-BUS name for a remote exception.
#ga7
GType
group__DBusGLib.html#ga8
dbus_connection_get_g_type
(void)
Get the GLib type ID for a
structDBusConnection.html
DBusConnection
boxed type.
#ga8
GType
group__DBusGLib.html#ga9
dbus_message_get_g_type
(void)
Get the GLib type ID for a
structDBusMessage.html
DBusMessage
boxed type.
#ga9
GType
group__DBusGLib.html#ga10
dbus_g_connection_get_g_type
(void)
Get the GLib type ID for a DBusGConnection boxed type.
#ga10
GType
group__DBusGLib.html#ga11
dbus_g_message_get_g_type
(void)
Get the GLib type ID for a DBusGMessage boxed type.
#ga11
structDBusConnection.html
DBusConnection
*
group__DBusGLib.html#ga12
dbus_g_connection_get_connection
(DBusGConnection *gconnection)
Get the
structDBusConnection.html
DBusConnection
corresponding to this DBusGConnection.
#ga12
structDBusMessage.html
DBusMessage
*
group__DBusGLib.html#ga13
dbus_g_message_get_message
(DBusGMessage *gmessage)
Get the
structDBusMessage.html
DBusMessage
corresponding to this DBusGMessage.
#ga13
void
group__DBusGLib.html#ga14
dbus_connection_setup_with_g_main
(
structDBusConnection.html
DBusConnection
*connection, GMainContext *context)
Sets the watch and timeout functions of a
structDBusConnection.html
DBusConnection
to integrate the connection with the GLib main loop.
#ga14
void
group__DBusGLib.html#ga15
dbus_server_setup_with_g_main
(
structDBusServer.html
DBusServer
*server, GMainContext *context)
Sets the watch and timeout functions of a
structDBusServer.html
DBusServer
to integrate the server with the GLib main loop.
#ga15
DBusGConnection *
group__DBusGLib.html#ga16
dbus_g_bus_get
(DBusBusType type, GError **error)
Returns a connection to the given bus.
#ga16
void
group__DBusGLib.html#ga17
dbus_g_object_type_install_info
(GType object_type, const
struct__DBusGObjectInfo.html
DBusGObjectInfo
*info)
Install introspection information about the given object GType sufficient to allow methods on the object to be invoked by name.
#ga17
void
group__DBusGLib.html#ga18
dbus_g_error_domain_register
(GQuark domain, const char *default_iface, GType code_enum)
Register a GError domain and set of codes with D-BUS.
#ga18
void
group__DBusGLib.html#ga20
dbus_g_connection_register_g_object
(DBusGConnection *connection, const char *at_path, GObject *object)
Registers a GObject at the given path.
#ga20
GObject *
group__DBusGLib.html#ga21
dbus_g_connection_lookup_g_object
(DBusGConnection *connection, const char *at_path)
GClosureMarshal
group__DBusGLib.html#ga24
_dbus_gobject_lookup_marshaller
(GType rettype, guint n_params, const GType *param_types)
void
group__DBusGLib.html#ga25
dbus_g_object_register_marshaller
(GClosureMarshal marshaller, GType rettype,...)
Register a GClosureMarshal to be used for signal invocations, giving its return type and a list of parameter types, followed by G_TYPE_INVALID.
#ga25
void
group__DBusGLib.html#ga26
dbus_g_object_register_marshaller_array
(GClosureMarshal marshaller, GType rettype, guint n_types, const GType *types)
Register a GClosureMarshal to be used for signal invocations.
#ga26
void
group__DBusGLib.html#ga27
dbus_g_method_return
(
struct__DBusGMethodInvocation.html
DBusGMethodInvocation
*context,...)
Send a return message for a given method invocation, with arguments.
#ga27
void
group__DBusGLib.html#ga28
dbus_g_method_return_error
(
struct__DBusGMethodInvocation.html
DBusGMethodInvocation
*context, GError *error)
Send a error message for a given method invocation.
#ga28
GType
group__DBusGLib.html#ga29
dbus_g_proxy_get_type
(void)
Standard GObject get_type() function for DBusGProxy.
#ga29
struct__DBusGProxy.html
DBusGProxy
*
group__DBusGLib.html#ga31
dbus_g_proxy_new_for_name
(DBusGConnection *connection, const char *name, const char *path_name, const char *interface_name)
Creates a new proxy for a remote interface exported by a connection on a message bus.
#ga31
struct__DBusGProxy.html
DBusGProxy
*
group__DBusGLib.html#ga32
dbus_g_proxy_new_for_name_owner
(DBusGConnection *connection, const char *name, const char *path_name, const char *interface_name, GError **error)
Similar to
group__DBusGLib.html#ga31
dbus_g_proxy_new_for_name()
, but makes a round-trip request to the message bus to get the current name owner, then binds the proxy to the unique name of the current owner, rather than to the well-known name.
#ga32
struct__DBusGProxy.html
DBusGProxy
*
group__DBusGLib.html#ga33
dbus_g_proxy_new_from_proxy
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *interface, const char *path)
Creates a proxy using an existing proxy as a template, substituting the specified interface and path.
#ga33
struct__DBusGProxy.html
DBusGProxy
*
group__DBusGLib.html#ga34
dbus_g_proxy_new_for_peer
(DBusGConnection *connection, const char *path_name, const char *interface_name)
Creates a proxy for an object in peer application (one we're directly connected to).
#ga34
const char *
group__DBusGLib.html#ga35
dbus_g_proxy_get_bus_name
(
struct__DBusGProxy.html
DBusGProxy
*proxy)
Gets the bus name a proxy is bound to (may be
group__DBusMacros.html#ga4
NULL
in some cases).
#ga35
const char *
group__DBusGLib.html#ga36
dbus_g_proxy_get_interface
(
struct__DBusGProxy.html
DBusGProxy
*proxy)
Gets the object interface proxy is bound to (may be
group__DBusMacros.html#ga4
NULL
in some cases).
#ga36
void
group__DBusGLib.html#ga37
dbus_g_proxy_set_interface
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *interface_name)
Sets the object interface proxy is bound to.
#ga37
const char *
group__DBusGLib.html#ga38
dbus_g_proxy_get_path
(
struct__DBusGProxy.html
DBusGProxy
*proxy)
Gets the path this proxy is bound to.
#ga38
DBusGProxyCall *
group__DBusGLib.html#ga40
dbus_g_proxy_begin_call
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *method, DBusGProxyCallNotify notify, gpointer user_data, GDestroyNotify destroy, GType first_arg_type,...)
Asynchronously invokes a method on a remote interface.
#ga40
gboolean
group__DBusGLib.html#ga41
dbus_g_proxy_end_call
(
struct__DBusGProxy.html
DBusGProxy
*proxy, DBusGProxyCall *call, GError **error, GType first_arg_type,...)
Collects the results of a method call.
#ga41
gboolean
group__DBusGLib.html#ga42
dbus_g_proxy_call
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *method, GError **error, GType first_arg_type,...)
Function for synchronously invoking a method and receiving reply values.
#ga42
void
group__DBusGLib.html#ga43
dbus_g_proxy_call_no_reply
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *method, GType first_arg_type,...)
Sends a method call message as with
group__DBusGLib.html#ga40
dbus_g_proxy_begin_call()
, but does not ask for a reply or allow you to receive one.
#ga43
void
group__DBusGLib.html#ga44
dbus_g_proxy_cancel_call
(
struct__DBusGProxy.html
DBusGProxy
*proxy, DBusGProxyCall *call)
Cancels a pending method call.
#ga44
void
group__DBusGLib.html#ga45
dbus_g_proxy_send
(
struct__DBusGProxy.html
DBusGProxy
*proxy,
structDBusMessage.html
DBusMessage
*message,
group__DBusTypes.html#ga3
dbus_uint32_t
*client_serial)
Sends a message to the interface we're proxying for.
#ga45
void
group__DBusGLib.html#ga47
dbus_g_proxy_add_signal
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *signal_name, GType first_type,...)
Specifies the argument signature of a signal;.only necessary if the remote object does not support introspection.
#ga47
void
group__DBusGLib.html#ga48
dbus_g_proxy_connect_signal
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *signal_name, GCallback handler, void *data, GClosureNotify free_data_func)
Connect a signal handler to a proxy for a remote interface.
#ga48
void
group__DBusGLib.html#ga49
dbus_g_proxy_disconnect_signal
(
struct__DBusGProxy.html
DBusGProxy
*proxy, const char *signal_name, GCallback handler, void *data)
Disconnect all signal handlers from a proxy that match the given criteria.
#ga49
void
group__DBusGLib.html#ga50
dbus_g_thread_init
(void)
Initializes the D-BUS thread system to use GLib threads.
#ga50
Detailed Description
API for using D-BUS with GLib.
libdbus proper is a low-level API, these GLib bindings wrap libdbus with a much higher-level approach. The higher level approach is possible because GLib defines a main loop, an object/type system, and an out-of-memory handling policy (it exits the program). See
http://www.gtk.org
http://www.gtk.org
for GLib information.
To manipulate remote objects, use DBusGProxy.
Function Documentation
GType dbus_connection_get_g_type
(
void
)
Get the GLib type ID for a
structDBusConnection.html
DBusConnection
boxed type.
Returns:
GLib type
Definition at line
dbus-glib_8c-source.html#l00183
183
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-connection_8c-source.html#l01746
dbus_connection_ref()
, and
dbus-connection_8c-source.html#l01884
dbus_connection_unref()
.
void dbus_connection_setup_with_g_main
(
structDBusConnection.html
DBusConnection
*
connection
,
GMainContext *
context
)
Sets the watch and timeout functions of a
structDBusConnection.html
DBusConnection
to integrate the connection with the GLib main loop.
Pass in
group__DBusMacros.html#ga4
NULL
for the GMainContext unless you're doing something specialized.
If called twice for the same context, does nothing the second time. If called once with context A and once with context B, context B replaces context A as the context monitoring the connection.
Parameters:
connection
the connection
context
the GMainContext or
group__DBusMacros.html#ga4
NULL
for default context
Definition at line
dbus-gmain_8c-source.html#l00563
563
of file
dbus-gmain_8c-source.html
dbus-gmain.c
.
References
dbus-gmain_8c-source.html#l00121
ConnectionSetup::context
,
dbus-connection_8c-source.html#l04456
dbus_connection_allocate_data_slot()
,
dbus-connection_8c-source.html#l04536
dbus_connection_get_data()
,
dbus-connection_8c-source.html#l04496
dbus_connection_set_data()
,
dbus-connection_8c-source.html#l03867
dbus_connection_set_timeout_functions()
,
dbus-connection_8c-source.html#l03926
dbus_connection_set_wakeup_main_function()
,
dbus-connection_8c-source.html#l03785
dbus_connection_set_watch_functions()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-gmain_8c-source.html#l00709
dbus_g_bus_get()
.
DBusGConnection* dbus_g_bus_get
(
DBusBusType
type
,
GError **
error
)
Returns a connection to the given bus.
The connection is a global variable shared with other callers of this function.
(Internally, calls
group__DBusBus.html#ga0
dbus_bus_get()
then calls
group__DBusGLib.html#ga14
dbus_connection_setup_with_g_main()
on the result.)
Parameters:
type
bus type
error
address where an error can be returned.
Returns:
a
structDBusConnection.html
DBusConnection
Definition at line
dbus-gmain_8c-source.html#l00709
709
of file
dbus-gmain_8c-source.html
dbus-gmain.c
.
References
dbus-bus_8c-source.html#l00328
dbus_bus_get()
,
dbus-gmain_8c-source.html#l00563
dbus_connection_setup_with_g_main()
,
dbus-errors_8c-source.html#l00174
dbus_error_free()
,
dbus-errors_8c-source.html#l00151
dbus_error_init()
,
dbus-gobject_8c-source.html#l01481
dbus_set_g_error()
, and
group__DBusMacros.html#ga4
NULL
.
void dbus_g_connection_flush
(
DBusGConnection *
connection
)
Blocks until outgoing calls and signal emissions have been sent.
Parameters:
connection
the connection to flush
Definition at line
dbus-glib_8c-source.html#l00047
47
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-connection_8c-source.html#l02800
dbus_connection_flush()
.
structDBusConnection.html
DBusConnection
* dbus_g_connection_get_connection
(
DBusGConnection *
gconnection
)
Get the
structDBusConnection.html
DBusConnection
corresponding to this DBusGConnection.
The return value does not have its refcount incremented.
Returns:
structDBusConnection.html
DBusConnection
Definition at line
dbus-glib_8c-source.html#l00256
256
of file
dbus-glib_8c-source.html
dbus-glib.c
.
Referenced by
dbus-gobject_8c-source.html#l01866
dbus_g_method_return()
, and
dbus-gobject_8c-source.html#l01915
dbus_g_method_return_error()
.
GType dbus_g_connection_get_g_type
(
void
)
Get the GLib type ID for a DBusGConnection boxed type.
Returns:
GLib type
Definition at line
dbus-glib_8c-source.html#l00219
219
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-glib_8c-source.html#l00059
dbus_g_connection_ref()
, and
dbus-glib_8c-source.html#l00075
dbus_g_connection_unref()
.
DBusGConnection* dbus_g_connection_ref
(
DBusGConnection *
gconnection
)
Increment refcount on a DBusGConnection.
Parameters:
gconnection
the connection to ref
Returns:
the connection that was ref'd
Definition at line
dbus-glib_8c-source.html#l00059
59
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-connection_8c-source.html#l01746
dbus_connection_ref()
.
Referenced by
dbus-glib_8c-source.html#l00219
dbus_g_connection_get_g_type()
.
void dbus_g_connection_register_g_object
(
DBusGConnection *
connection
,
const char *
at_path
,
GObject *
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
structDBusConnection.html
DBusConnection
or the GObject gets finalized.
Parameters:
connection
the D-BUS connection
at_path
the path where the object will live (the object's name)
object
the object
Definition at line
dbus-gobject_8c-source.html#l01616
1616
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
References
dbus-connection_8c-source.html#l04262
dbus_connection_register_object_path()
.
void dbus_g_connection_unref
(
DBusGConnection *
gconnection
)
Decrement refcount on a DBusGConnection.
Parameters:
gconnection
the connection to unref
Definition at line
dbus-glib_8c-source.html#l00075
75
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-connection_8c-source.html#l01884
dbus_connection_unref()
.
Referenced by
dbus-glib_8c-source.html#l00219
dbus_g_connection_get_g_type()
, and
dbus-gobject_8c-source.html#l01866
dbus_g_method_return()
.
void dbus_g_error_domain_register
(
GQuark
domain
,
const char *
default_iface
,
GType
code_enum
)
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.
Parameters:
domain
the GError domain
default_iface
the D-BUS interface used for error values by default, or
group__DBusMacros.html#ga4
NULL
code_enum
a GType for a GEnum of the error codes
Definition at line
dbus-gobject_8c-source.html#l01556
1556
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
References
dbus-gobject_8c-source.html#l00045
DBusGErrorInfo::code_enum
, and
dbus-gobject_8c-source.html#l00044
DBusGErrorInfo::default_iface
.
const char* dbus_g_error_get_name
(
GError *
error
)
Return the D-BUS name for a remote exception.
This function may only be invoked on a GError returned from an invocation of a remote method, e.g. via dbus_g_proxy_end_call. Moreover, you must ensure that the error's domain is DBUS_GERROR, and the code is DBUS_GERROR_REMOTE_EXCEPTION.
Parameters:
gerror
the GError given from the remote method
name
the D-BUS error name
msg
the D-BUS error detailed message
Returns:
the D-BUS error name
Definition at line
dbus-glib_8c-source.html#l00168
168
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-glib_8c-source.html#l00144
dbus_g_error_has_name()
.
gboolean dbus_g_error_has_name
(
GError *
error
,
const char *
name
)
Determine whether D-BUS error name for a remote exception matches the given name.
This function is intended to be invoked on a GError returned from an invocation of a remote method, e.g. via dbus_g_proxy_end_call. It will silently return FALSE for errors which are not remote D-BUS exceptions (i.e. with a domain other than DBUS_GERROR or a code other than DBUS_GERROR_REMOTE_EXCEPTION).
Parameters:
gerror
the GError given from the remote method
name
the D-BUS error name
msg
the D-BUS error detailed message
Returns:
TRUE iff the remote error has the given name
Definition at line
dbus-glib_8c-source.html#l00144
144
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-glib_8c-source.html#l00168
dbus_g_error_get_name()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga4
NULL
.
GQuark dbus_g_error_quark
(
void
)
The implementation of DBUS_GERROR error domain.
See documentation for GError in GLib reference manual.
Returns:
the error domain quark for use with GError
Definition at line
dbus-glib_8c-source.html#l00121
121
of file
dbus-glib_8c-source.html
dbus-glib.c
.
GType dbus_g_message_get_g_type
(
void
)
Get the GLib type ID for a DBusGMessage boxed type.
Returns:
GLib type
Definition at line
dbus-glib_8c-source.html#l00237
237
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-glib_8c-source.html#l00091
dbus_g_message_ref()
, and
dbus-glib_8c-source.html#l00106
dbus_g_message_unref()
.
structDBusMessage.html
DBusMessage
* dbus_g_message_get_message
(
DBusGMessage *
gmessage
)
Get the
structDBusMessage.html
DBusMessage
corresponding to this DBusGMessage.
The return value does not have its refcount incremented.
Returns:
structDBusMessage.html
DBusMessage
Definition at line
dbus-glib_8c-source.html#l00268
268
of file
dbus-glib_8c-source.html
dbus-glib.c
.
Referenced by
dbus-gobject_8c-source.html#l01866
dbus_g_method_return()
, and
dbus-gobject_8c-source.html#l01915
dbus_g_method_return_error()
.
DBusGMessage* dbus_g_message_ref
(
DBusGMessage *
gmessage
)
Increment refcount on a DBusGMessage.
Parameters:
gmessage
the message to ref
Returns:
the message that was ref'd
Definition at line
dbus-glib_8c-source.html#l00091
91
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-message_8c-source.html#l01076
dbus_message_ref()
.
Referenced by
dbus-glib_8c-source.html#l00237
dbus_g_message_get_g_type()
.
void dbus_g_message_unref
(
DBusGMessage *
gmessage
)
Decrement refcount on a DBusGMessage.
Parameters:
gmessage
the message to unref
Definition at line
dbus-glib_8c-source.html#l00106
106
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-message_8c-source.html#l01097
dbus_message_unref()
.
Referenced by
dbus-glib_8c-source.html#l00237
dbus_g_message_get_g_type()
, and
dbus-gobject_8c-source.html#l01866
dbus_g_method_return()
.
void dbus_g_method_return
(
struct__DBusGMethodInvocation.html
DBusGMethodInvocation
*
context
,
...
)
Send a return message for a given method invocation, with arguments.
This function also frees the sending context.
Parameters:
context
the method context
Definition at line
dbus-gobject_8c-source.html#l01866
1866
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
References
dbus-gobject_8c-source.html#l00874
_DBusGMethodInvocation::connection
,
dbus-connection_8c-source.html#l02334
dbus_connection_send()
,
dbus-glib_8c-source.html#l00256
dbus_g_connection_get_connection()
,
dbus-glib_8c-source.html#l00075
dbus_g_connection_unref()
,
dbus-glib_8c-source.html#l00268
dbus_g_message_get_message()
,
dbus-glib_8c-source.html#l00106
dbus_g_message_unref()
,
dbus-message_8c-source.html#l01948
dbus_message_iter_init_append()
,
dbus-message_8c-source.html#l00826
dbus_message_new_method_return()
,
dbus-message_8c-source.html#l01097
dbus_message_unref()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-gobject_8c-source.html#l00875
_DBusGMethodInvocation::message
,
dbus-gobject_8c-source.html#l00877
_DBusGMethodInvocation::method
, and
dbus-gobject_8c-source.html#l00876
_DBusGMethodInvocation::object
.
void dbus_g_method_return_error
(
struct__DBusGMethodInvocation.html
DBusGMethodInvocation
*
context
,
GError *
error
)
Send a error message for a given method invocation.
This function also frees the sending context.
Parameters:
context
the method context
error
the error to send.
Definition at line
dbus-gobject_8c-source.html#l01915
1915
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
References
dbus-gobject_8c-source.html#l00874
_DBusGMethodInvocation::connection
,
dbus-connection_8c-source.html#l02334
dbus_connection_send()
,
dbus-glib_8c-source.html#l00256
dbus_g_connection_get_connection()
,
dbus-glib_8c-source.html#l00268
dbus_g_message_get_message()
,
dbus-message_8c-source.html#l01097
dbus_message_unref()
,
dbus-gobject_8c-source.html#l00875
_DBusGMethodInvocation::message
, and
dbus-gobject_8c-source.html#l00876
_DBusGMethodInvocation::object
.
void dbus_g_object_register_marshaller
(
GClosureMarshal
marshaller
,
GType
rettype
,
...
)
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.
Parameters:
marshaller
a GClosureMarshal to be used for invocation
rettype
a GType for the return type of the function
...
The parameter GTypes, followed by G_TYPE_INVALID
Definition at line
dbus-gobject_8c-source.html#l01800
1800
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
References
dbus-gobject_8c-source.html#l01832
dbus_g_object_register_marshaller_array()
, and
group__DBusMacros.html#ga2
TRUE
.
void dbus_g_object_register_marshaller_array
(
GClosureMarshal
marshaller
,
GType
rettype
,
guint
n_types
,
const GType *
types
)
Register a GClosureMarshal to be used for signal invocations.
See also
group__DBusGLib.html#ga25
dbus_g_object_register_marshaller
Parameters:
marshaller
a GClosureMarshal to be used for invocation
rettype
a GType for the return type of the function
n_types
number of function parameters
param_types
a C array of GTypes values
Definition at line
dbus-gobject_8c-source.html#l01832
1832
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
References
dbus-gobject_8c-source.html#l01660
DBusGFuncSignature::n_params
,
dbus-gobject_8c-source.html#l01661
DBusGFuncSignature::params
, and
dbus-gobject_8c-source.html#l01659
DBusGFuncSignature::rettype
.
Referenced by
dbus-gobject_8c-source.html#l01800
dbus_g_object_register_marshaller()
.
void dbus_g_object_type_install_info
(
GType
object_type
,
const
struct__DBusGObjectInfo.html
DBusGObjectInfo
*
info
)
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
group__DBusGLib.html#ga20
dbus_g_connection_register_g_object()
can have their methods invoked remotely.
Parameters:
object_type
GType for the object
info
introspection data generated by dbus-glib-tool
Definition at line
dbus-gobject_8c-source.html#l01534
1534
of file
dbus-gobject_8c-source.html
dbus-gobject.c
.
void dbus_g_proxy_add_signal
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
signal_name
,
GType
first_type
,
...
)
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.
Parameters:
proxy
the proxy for a remote interface
signal_name
the name of the signal
first_type
the first argument type, or G_TYPE_INVALID if none
Definition at line
dbus-gproxy_8c-source.html#l02493
2493
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gobject_8c-source.html#l01713
_dbus_gobject_lookup_marshaller()
,
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
DBusGProxyCall* dbus_g_proxy_begin_call
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
method
,
DBusGProxyCallNotify
notify
,
gpointer
user_data
,
GDestroyNotify
destroy
,
GType
first_arg_type
,
...
)
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
group__DBusConnection.html#ga27
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
group__DBusGLib.html#ga41
dbus_g_proxy_end_call()
.
todo.html#_todo000087
Todo:
this particular function shouldn't die on out of memory, since you should be able to do a call with large arguments.
Parameters:
proxy
a proxy for a remote interface
method
the name of the method to invoke
notify
callback to be invoked when method returns
user_data
user data passed to callback
destroy
function called to destroy user_data
first_arg_type
type of the first argument
Returns:
call identifier
Definition at line
dbus-gproxy_8c-source.html#l02246
2246
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
,
dbus-gproxy_8c-source.html#l01660
DBUS_G_VALUE_ARRAY_COLLECT_ALL
, and
group__DBusMacros.html#ga3
FALSE
.
gboolean dbus_g_proxy_call
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
method
,
GError **
error
,
GType
first_arg_type
,
...
)
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 G_TYPE_INVALID.
Parameters:
proxy
a proxy for a remote interface
method
method to invoke
error
return location for an error
first_arg_type
type of first "in" argument
Returns:
group__DBusMacros.html#ga3
FALSE
if an error is set, TRUE otherwise
Definition at line
dbus-gproxy_8c-source.html#l02327
2327
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01660
DBUS_G_VALUE_ARRAY_COLLECT_ALL
, and
group__DBusMacros.html#ga4
NULL
.
void dbus_g_proxy_call_no_reply
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
method
,
GType
first_arg_type
,
...
)
Sends a method call message as with
group__DBusGLib.html#ga40
dbus_g_proxy_begin_call()
, but does not ask for a reply or allow you to receive one.
todo.html#_todo000088
Todo:
this particular function shouldn't die on out of memory, since you should be able to do a call with large arguments.
Parameters:
proxy
a proxy for a remote interface
method
the name of the method to invoke
first_arg_type
type of the first argument
Definition at line
dbus-gproxy_8c-source.html#l02366
2366
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-connection_8c-source.html#l02334
dbus_connection_send()
,
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
,
dbus-gproxy_8c-source.html#l01660
DBUS_G_VALUE_ARRAY_COLLECT_ALL
,
dbus-message_8c-source.html#l02319
dbus_message_set_no_reply()
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
void dbus_g_proxy_cancel_call
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
DBusGProxyCall *
call
)
Cancels a pending method call.
The method call was normally initiated with
group__DBusGLib.html#ga40
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.
Parameters:
proxy
a proxy for a remote interface
call_id
the pending call ID from
group__DBusGLib.html#ga40
dbus_g_proxy_begin_call()
Definition at line
dbus-gproxy_8c-source.html#l02412
2412
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
,
dbus-pending-call_8c-source.html#l00249
dbus_pending_call_cancel()
, and
group__DBusMacros.html#ga4
NULL
.
void dbus_g_proxy_connect_signal
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
signal_name
,
GCallback
handler
,
void *
data
,
GClosureNotify
free_data_func
)
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.
Parameters:
proxy
a proxy for a remote interface
signal_name
the
namespaceDBus.html
DBus
signal name to listen for
handler
the handler to connect
data
data to pass to handler
free_data_func
callback function to destroy data
Definition at line
dbus-gproxy_8c-source.html#l02550
2550
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga4
NULL
.
void dbus_g_proxy_disconnect_signal
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
signal_name
,
GCallback
handler
,
void *
data
)
Disconnect all signal handlers from a proxy that match the given criteria.
Parameters:
proxy
a proxy for a remote interface
signal_name
the
namespaceDBus.html
DBus
signal name to disconnect
handler
the handler to disconnect
data
the data that was registered with handler
Definition at line
dbus-gproxy_8c-source.html#l02598
2598
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
, and
group__DBusMacros.html#ga4
NULL
.
gboolean dbus_g_proxy_end_call
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
DBusGProxyCall *
call
,
GError **
error
,
GType
first_arg_type
,
...
)
Collects the results of a method call.
The method call was normally initiated with
group__DBusGLib.html#ga41
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
group__DBusMacros.html#ga3
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.
Parameters:
proxy
a proxy for a remote interface
call_id
the pending call ID from
group__DBusGLib.html#ga40
dbus_g_proxy_begin_call()
error
return location for an error
first_arg_type
type of first "out" argument
Returns:
group__DBusMacros.html#ga3
FALSE
if an error is set
Definition at line
dbus-gproxy_8c-source.html#l02295
2295
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
const char* dbus_g_proxy_get_bus_name
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
)
Gets the bus name a proxy is bound to (may be
group__DBusMacros.html#ga4
NULL
in some cases).
If you created the proxy with
group__DBusGLib.html#ga31
dbus_g_proxy_new_for_name()
, then the name you passed to that will be returned. If you created it with
group__DBusGLib.html#ga32
dbus_g_proxy_new_for_name_owner()
, then the unique connection name will be returned. If you created it with
group__DBusGLib.html#ga34
dbus_g_proxy_new_for_peer()
then
group__DBusMacros.html#ga4
NULL
will be returned.
Parameters:
proxy
the proxy
Returns:
the bus name the proxy sends messages to
Definition at line
dbus-gproxy_8c-source.html#l01936
1936
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
, and
group__DBusMacros.html#ga4
NULL
.
const char* dbus_g_proxy_get_interface
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
)
Gets the object interface proxy is bound to (may be
group__DBusMacros.html#ga4
NULL
in some cases).
Parameters:
proxy
the proxy
Returns:
an object interface
Definition at line
dbus-gproxy_8c-source.html#l01951
1951
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
, and
group__DBusMacros.html#ga4
NULL
.
const char* dbus_g_proxy_get_path
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
)
Gets the path this proxy is bound to.
Parameters:
proxy
the proxy
Returns:
an object path
Definition at line
dbus-gproxy_8c-source.html#l01985
1985
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
, and
group__DBusMacros.html#ga4
NULL
.
GType dbus_g_proxy_get_type
(
void
)
Standard GObject get_type() function for DBusGProxy.
Returns:
type ID for DBusGProxy class
Definition at line
dbus-gproxy_8c-source.html#l01728
1728
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
group__DBusMacros.html#ga4
NULL
.
struct__DBusGProxy.html
DBusGProxy
* dbus_g_proxy_new_for_name
(
DBusGConnection *
connection
,
const char *
name
,
const char *
path_name
,
const char *
interface_name
)
Creates a new proxy for a remote interface exported by a connection on a message bus.
Method calls and signal connections over this proxy will go to the name owner; the name's owner is expected to support the given interface name. THE NAME OWNER MAY CHANGE OVER TIME, for example between two different method calls, unless the name is a unique name. If you need a fixed owner, you need to request the current owner and bind a proxy to its unique name rather than to the generic name; see
group__DBusGLib.html#ga32
dbus_g_proxy_new_for_name_owner()
.
A name-associated proxy only makes sense with a message bus, not for app-to-app direct dbus connections.
This proxy will only emit the "destroy" signal if the
structDBusConnection.html
DBusConnection
is disconnected, the proxy has no remaining references, or the name is a unique name and its owner disappears. If a well-known name changes owner, the proxy will still be alive.
Parameters:
connection
the connection to the remote bus
name
any name on the message bus
path_name
name of the object instance to call methods on
interface_name
name of the interface to call methods on
Returns:
new proxy object
Definition at line
dbus-gproxy_8c-source.html#l01805
1805
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
group__DBusMacros.html#ga4
NULL
.
struct__DBusGProxy.html
DBusGProxy
* dbus_g_proxy_new_for_name_owner
(
DBusGConnection *
connection
,
const char *
name
,
const char *
path_name
,
const char *
interface_name
,
GError **
error
)
Similar to
group__DBusGLib.html#ga31
dbus_g_proxy_new_for_name()
, but makes a round-trip request to the message bus to get the current name owner, then binds the proxy to the unique name of the current owner, rather than to the well-known name.
As a result, the name owner will not change over time, and the proxy will emit the "destroy" signal when the owner disappears from the message bus.
An example of the difference between
group__DBusGLib.html#ga31
dbus_g_proxy_new_for_name()
and
group__DBusGLib.html#ga32
dbus_g_proxy_new_for_name_owner()
: if you provide the well-known name "org.freedesktop.Database"
group__DBusGLib.html#ga31
dbus_g_proxy_new_for_name()
remains bound to that name as it changes owner.
group__DBusGLib.html#ga32
dbus_g_proxy_new_for_name_owner()
will fail if the name has no owner. If the name has an owner,
group__DBusGLib.html#ga32
dbus_g_proxy_new_for_name_owner()
will bind to the unique name of that owner rather than the generic name.
Parameters:
connection
the connection to the remote bus
name
any name on the message bus
path_name
name of the object inside the service to call methods on
interface_name
name of the interface to call methods on
error
return location for an error
Returns:
new proxy object, or
group__DBusMacros.html#ga4
NULL
on error
Definition at line
dbus-gproxy_8c-source.html#l01843
1843
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
group__DBusMacros.html#ga4
NULL
.
struct__DBusGProxy.html
DBusGProxy
* dbus_g_proxy_new_for_peer
(
DBusGConnection *
connection
,
const char *
path_name
,
const char *
interface_name
)
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.
Parameters:
connection
the connection to the peer
path_name
name of the object inside the peer to call methods on
interface_name
name of the interface to call methods on
Returns:
new proxy object
Definition at line
dbus-gproxy_8c-source.html#l01908
1908
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
group__DBusMacros.html#ga4
NULL
.
struct__DBusGProxy.html
DBusGProxy
* dbus_g_proxy_new_from_proxy
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
interface
,
const char *
path
)
Creates a proxy using an existing proxy as a template, substituting the specified interface and path.
Either or both may be NULL.
Parameters:
proxy
the proxy to use as a template
path
of the object inside the peer to call methods on
interface
name of the interface to call methods on
Returns:
new proxy object
Definition at line
dbus-gproxy_8c-source.html#l01877
1877
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l00145
_DBusGProxyManager::connection
,
dbus-gproxy_8c-source.html#l00060
_DBusGProxy::interface
,
dbus-gproxy_8c-source.html#l00057
_DBusGProxy::manager
,
dbus-gproxy_8c-source.html#l00058
_DBusGProxy::name
,
group__DBusMacros.html#ga4
NULL
, and
dbus-gproxy_8c-source.html#l00059
_DBusGProxy::path
.
void dbus_g_proxy_send
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
structDBusMessage.html
DBusMessage
*
message
,
group__DBusTypes.html#ga3
dbus_uint32_t
*
client_serial
)
Sends a message to the interface we're proxying for.
Does not block or wait for a reply. The message is only actually written out when you return to the main loop or block in
group__DBusConnection.html#ga27
dbus_connection_flush()
.
The message is modified to be addressed to the target interface. That is, a destination name field or whatever is needed will be added to the message. The basic point of this function is to add the necessary header fields, otherwise it's equivalent to
group__DBusConnection.html#ga20
dbus_connection_send()
.
This function adds a reference to the message, so the caller still owns its original reference.
Parameters:
proxy
a proxy for a remote interface
message
the message to address and send
client_serial
return location for message's serial, or
group__DBusMacros.html#ga4
NULL
Definition at line
dbus-gproxy_8c-source.html#l02450
2450
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-connection_8c-source.html#l02334
dbus_connection_send()
,
dbus-gproxy_8c-source.html#l01252
DBUS_G_PROXY_DESTROYED
,
dbus-message_8c-source.html#l02721
dbus_message_set_destination()
,
dbus-message_8c-source.html#l02513
dbus_message_set_interface()
, and
dbus-message_8c-source.html#l02395
dbus_message_set_path()
.
void dbus_g_proxy_set_interface
(
struct__DBusGProxy.html
DBusGProxy
*
proxy
,
const char *
interface_name
)
Sets the object interface proxy is bound to.
Parameters:
proxy
the proxy
interface_name
an object interface
Definition at line
dbus-gproxy_8c-source.html#l01966
1966
of file
dbus-gproxy_8c-source.html
dbus-gproxy.c
.
References
dbus-gproxy_8c-source.html#l00060
_DBusGProxy::interface
, and
dbus-gproxy_8c-source.html#l00057
_DBusGProxy::manager
.
void dbus_g_thread_init
(
void
)
Initializes the D-BUS thread system to use GLib threads.
This function may only be called once and must be called prior to calling any other function in the D-BUS API.
Definition at line
dbus-gthread_8c-source.html#l00171
171
of file
dbus-gthread_8c-source.html
dbus-gthread.c
.
References
dbus-threads_8c-source.html#l00306
dbus_threads_init()
.
GType dbus_message_get_g_type
(
void
)
Get the GLib type ID for a
structDBusMessage.html
DBusMessage
boxed type.
Returns:
GLib type
Definition at line
dbus-glib_8c-source.html#l00201
201
of file
dbus-glib_8c-source.html
dbus-glib.c
.
References
dbus-message_8c-source.html#l01076
dbus_message_ref()
, and
dbus-message_8c-source.html#l01097
dbus_message_unref()
.
void dbus_server_setup_with_g_main
(
structDBusServer.html
DBusServer
*
server
,
GMainContext *
context
)
Sets the watch and timeout functions of a
structDBusServer.html
DBusServer
to integrate the server with the GLib main loop.
In most cases the context argument should be
group__DBusMacros.html#ga4
NULL
.
If called twice for the same context, does nothing the second time. If called once with context A and once with context B, context B replaces context A as the context monitoring the connection.
Parameters:
server
the server
context
the GMainContext or
group__DBusMacros.html#ga4
NULL
for default
Definition at line
dbus-gmain_8c-source.html#l00639
639
of file
dbus-gmain_8c-source.html
dbus-gmain.c
.
References
dbus-gmain_8c-source.html#l00121
ConnectionSetup::context
,
dbus-server_8c-source.html#l01060
dbus_server_allocate_data_slot()
,
dbus-server_8c-source.html#l01140
dbus_server_get_data()
,
dbus-server_8c-source.html#l01100
dbus_server_set_data()
,
dbus-server_8c-source.html#l00967
dbus_server_set_timeout_functions()
,
dbus-server_8c-source.html#l00914
dbus_server_set_watch_functions()
, and
group__DBusMacros.html#ga4
NULL
.
Generated on Tue Sep 13 01:28:09 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
