![]() |
![]() |
![]() |
D-Bus GLib bindings - Reference Manual | ![]() |
---|---|---|---|---|
DBus GObject related functionsDBus GObject related functions — Exporting a GObject remotely |
#define DBUS_TYPE_G_OBJECT_PATH DBusGObjectInfo; void dbus_g_object_type_install_info (GType object_type, const DBusGObjectInfo *info); GType dbus_g_object_path_get_g_type (void); void dbus_g_object_register_marshaller (GClosureMarshal marshaller, GType rettype, ...); void dbus_g_object_register_marshaller_array (GClosureMarshal marshaller, GType rettype, guint n_types, const GType *types);
typedef struct { int format_version; const DBusGMethodInfo *method_infos; int n_method_infos; const char *data; const char *exported_signals; const char *exported_properties; } DBusGObjectInfo;
Introspection data for a GObject, normally autogenerated by a tool such as dbus-binding-tool.
int |
Allows us to change the rest of this struct by adding DBusGObjectInfo2, DBusGObjectInfo3, etc. |
const DBusGMethodInfo * |
Array of method pointers |
int |
Length of the infos array |
const char * |
Introspection data |
const char * |
Exported signals |
const char * |
Exported properties |
void dbus_g_object_type_install_info (GType object_type, const 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 #dbus_g_connection_register_g_object()
can have
their methods invoked remotely.
|
GType for the object |
|
introspection data generated by dbus-glib-tool |
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.
|
a GClosureMarshal to be used for invocation |
|
a GType for the return type of the function
@:... The parameter GTypes, followed by G_TYPE_INVALID
|
|
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
dbus_g_object_register_marshaller
|
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 |