DBus GObject related functions

DBus GObject related functions — Exporting a GObject remotely

Stability Level

Stable, unless otherwise indicated

Synopsis




#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);

Description

FIXME

Details

DBUS_TYPE_G_OBJECT_PATH

#define DBUS_TYPE_G_OBJECT_PATH (dbus_g_object_path_get_g_type ())


DBusGObjectInfo

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 format_version;

Allows us to change the rest of this struct by adding DBusGObjectInfo2, DBusGObjectInfo3, etc.

const DBusGMethodInfo *method_infos;

Array of method pointers

int n_method_infos;

Length of the infos array

const char *data;

Introspection data

const char *exported_signals;

Exported signals

const char *exported_properties;

Exported properties

dbus_g_object_type_install_info ()

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.

object_type :

GType for the object

info :

introspection data generated by dbus-glib-tool

dbus_g_object_path_get_g_type ()

GType               dbus_g_object_path_get_g_type       (void);

Returns :


dbus_g_object_register_marshaller ()

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.

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

... :


dbus_g_object_register_marshaller_array ()

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

marshaller :

a GClosureMarshal to be used for invocation

rettype :

a GType for the return type of the function

n_types :

number of function parameters

types :

a C array of GTypes values

See Also

GObject