Generic service-side interfaces

Generic service-side interfaces — GInterfaces for D-Bus objects exporting Telepathy properties and common D-Bus core interfaces

Functions

Signals

void properties-changed Has Details

Types and Values

Object Hierarchy

    GInterface
    ├── TpSvcDBusIntrospectable
    ╰── TpSvcDBusProperties

Includes

#include <telepathy-glib/telepathy-glib-dbus.h>

Description

The D-Bus Properties interface associates named properties with any D-Bus object.

The D-Bus Introspectable interface provides introspection information.

The D-Bus Peer interface is exported by every D-Bus object.

The Telepathy Properties interface associates a number of named properties with a channel, connection or other D-Bus object. Signals are emitted when the properties or their flags (readable/writable) change.

Functions

tp_svc_dbus_introspectable_implement_introspect ()

void
tp_svc_dbus_introspectable_implement_introspect
                               (TpSvcDBusIntrospectableClass *klass,
                                tp_svc_dbus_introspectable_introspect_impl impl);

Register an implementation for the Introspect method in the vtable of an implementation of this interface. To be called from the interface init function.

Parameters

klass

A class whose instances implement this interface

 

impl

A callback used to implement the Introspect D-Bus method

 

tp_svc_dbus_introspectable_introspect_impl ()

void
(*tp_svc_dbus_introspectable_introspect_impl)
                               (TpSvcDBusIntrospectable *self,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method Introspect on interface org.freedesktop.DBus.Introspectable.

Parameters

self

The object implementing this interface

 

invocation

Used to return values or throw an error

 

tp_svc_dbus_introspectable_return_from_introspect ()

void
tp_svc_dbus_introspectable_return_from_introspect
                               (GDBusMethodInvocation *invocation,
                                const gchar *out_XML_Data);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

out_XML_Data

const gchar * (FIXME, generate documentation)

 

tp_svc_dbus_properties_get_all_impl ()

void
(*tp_svc_dbus_properties_get_all_impl)
                               (TpSvcDBusProperties *self,
                                const gchar *in_Interface_Name,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method GetAll on interface org.freedesktop.DBus.Properties.

Parameters

self

The object implementing this interface

 

in_Interface_Name

const gchar * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_dbus_properties_get_impl ()

void
(*tp_svc_dbus_properties_get_impl) (TpSvcDBusProperties *self,
                                    const gchar *in_Interface_Name,
                                    const gchar *in_Property_Name,
                                    GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method Get on interface org.freedesktop.DBus.Properties.

Parameters

self

The object implementing this interface

 

in_Interface_Name

const gchar * (FIXME, generate documentation)

 

in_Property_Name

const gchar * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_dbus_properties_implement_get ()

void
tp_svc_dbus_properties_implement_get (TpSvcDBusPropertiesClass *klass,
                                      tp_svc_dbus_properties_get_impl impl);

Register an implementation for the Get method in the vtable of an implementation of this interface. To be called from the interface init function.

Parameters

klass

A class whose instances implement this interface

 

impl

A callback used to implement the Get D-Bus method

 

tp_svc_dbus_properties_implement_get_all ()

void
tp_svc_dbus_properties_implement_get_all
                               (TpSvcDBusPropertiesClass *klass,
                                tp_svc_dbus_properties_get_all_impl impl);

Register an implementation for the GetAll method in the vtable of an implementation of this interface. To be called from the interface init function.

Parameters

klass

A class whose instances implement this interface

 

impl

A callback used to implement the GetAll D-Bus method

 

tp_svc_dbus_properties_implement_set ()

void
tp_svc_dbus_properties_implement_set (TpSvcDBusPropertiesClass *klass,
                                      tp_svc_dbus_properties_set_impl impl);

Register an implementation for the Set method in the vtable of an implementation of this interface. To be called from the interface init function.

Parameters

klass

A class whose instances implement this interface

 

impl

A callback used to implement the Set D-Bus method

 

tp_svc_dbus_properties_return_from_get ()

void
tp_svc_dbus_properties_return_from_get
                               (GDBusMethodInvocation *invocation,
                                const GValue *out_Value);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

out_Value

const GValue * (FIXME, generate documentation)

 

tp_svc_dbus_properties_return_from_get_all ()

void
tp_svc_dbus_properties_return_from_get_all
                               (GDBusMethodInvocation *invocation,
                                GHashTable *out_Properties);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

out_Properties

GHashTable * (FIXME, generate documentation)

 

tp_svc_dbus_properties_return_from_set ()

void
tp_svc_dbus_properties_return_from_set
                               (GDBusMethodInvocation *invocation);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

tp_svc_dbus_properties_set_impl ()

void
(*tp_svc_dbus_properties_set_impl) (TpSvcDBusProperties *self,
                                    const gchar *in_Interface_Name,
                                    const gchar *in_Property_Name,
                                    const GValue *in_Value,
                                    GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method Set on interface org.freedesktop.DBus.Properties.

Parameters

self

The object implementing this interface

 

in_Interface_Name

const gchar * (FIXME, generate documentation)

 

in_Property_Name

const gchar * (FIXME, generate documentation)

 

in_Value

const GValue * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_dbus_properties_emit_properties_changed ()

void
tp_svc_dbus_properties_emit_properties_changed
                               (gpointer instance,
                                const gchar *arg_Interface_Name,
                                GHashTable *arg_Changed_Properties,
                                const gchar **arg_Invalidated_Properties);

Type-safe wrapper around g_signal_emit to emit the PropertiesChanged signal on interface org.freedesktop.DBus.Properties.

Parameters

instance

The object implementing this interface

 

arg_Interface_Name

const gchar * (FIXME, generate documentation)

 

arg_Changed_Properties

GHashTable * (FIXME, generate documentation)

 

arg_Invalidated_Properties

const gchar ** (FIXME, generate documentation)

 

Types and Values

TpSvcDBusIntrospectable

typedef struct _TpSvcDBusIntrospectable TpSvcDBusIntrospectable;

Dummy typedef representing any implementation of this interface.


TpSvcDBusIntrospectableClass

typedef struct _TpSvcDBusIntrospectableClass TpSvcDBusIntrospectableClass;

The class of TpSvcDBusIntrospectable.

In a full implementation of this interface (i.e. all methods implemented), the interface initialization function used in G_IMPLEMENT_INTERFACE() would typically look like this:

static void
implement_dbus_introspectable (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_dbus_introspectable_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (introspect);
#undef IMPLEMENT
}

TpSvcDBusProperties

typedef struct _TpSvcDBusProperties TpSvcDBusProperties;

Dummy typedef representing any implementation of this interface.


TpSvcDBusPropertiesClass

typedef struct _TpSvcDBusPropertiesClass TpSvcDBusPropertiesClass;

The class of TpSvcDBusProperties.

In a full implementation of this interface (i.e. all methods implemented), the interface initialization function used in G_IMPLEMENT_INTERFACE() would typically look like this:

static void
implement_dbus_properties (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_dbus_properties_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (get);
  IMPLEMENT (set);
  IMPLEMENT (get_all);
#undef IMPLEMENT
}

Signal Details

The “properties-changed” signal

void
user_function (TpSvcDBusProperties *self,
               gchar               *arg_Interface_Name,
               GStrv                arg_Invalidated_Properties,
               gpointer             user_data)

The PropertiesChanged D-Bus signal is emitted whenever this GObject signal is.

Parameters

self

an object

 

arg_Interface_Name

const gchar * (FIXME, generate documentation)

 

arg_Changed_Properties

GHashTable * (FIXME, generate documentation)

 

arg_Invalidated_Properties

const gchar ** (FIXME, generate documentation)

 

user_data

user data set when the signal handler was connected.

 

Flags: Has Details

See Also

TpPropertiesMixin