TpSvcInterface

TpSvcInterface — glue to export `TpSvc` interfaces on D-Bus

Functions

Types and Values

Object Hierarchy


Includes

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

Description

TpSvcInterfaceInfo describes a dbus-glib-style GInterface in sufficient detail to export it on a GDBusConnection.

Functions

tp_svc_interface_peek_dbus_interface_info ()

const TpSvcInterfaceInfo *
tp_svc_interface_peek_dbus_interface_info
                               (GType g_interface);

See whether the given interface has Telepathy code generation data attached.

Parameters

g_interface

The GType of a service interface

 

Returns

a TpSvcInterfaceInfo struct, or NULL.

[transfer none]

Since 0.99.10


tp_svc_interface_set_dbus_interface_info ()

void
tp_svc_interface_set_dbus_interface_info
                               (GType g_interface,
                                const TpSvcInterfaceInfo *info);

Declare that g_interface implements the given D-Bus interface, with the given vtable. This may only be called once per GInterface, usually from a section of its base_init function that only runs once.

This is typically only used within generated code; there is normally no reason to call it manually.

Parameters

g_interface

The GType of a service interface

 

info

struct encapsulating the GDBusInterfaceInfo, the GDBusVTable and the GLib signal names corresponding to D-Bus signals. The GDBusVTable methods must expect the object implementing g_interface as their user-data.

 

Since 0.99.10


tp_svc_interface_skeleton_new ()

GDBusInterfaceSkeleton *
tp_svc_interface_skeleton_new (gpointer object,
                               GType iface);

Return a GDBus interface skeleton whose methods and signals are implemented by iface on object , and whose properties are implemented by a TpDBusPropertiesMixin on object .

Parameters

object

a GObject.

[type GObject.Object]

iface

a TpSvc interface on the object

 

Returns

a new interface skeleton wrapping iface on object .

[transfer full]

Types and Values

struct TpSvcInterfaceInfo

struct TpSvcInterfaceInfo {
    volatile gint ref_count;
    GDBusInterfaceInfo *interface_info;
    GDBusInterfaceVTable *vtable;
    gchar **signals;
};

The necessary glue between a dbus-glib-style TpSvc GInterface and telepathy-glib.

These structs are intended to be programmatically-generated.

Members

volatile gint ref_count;

currently -1 since these structures can only be statically allocated; will be used for the reference count in the same way as GDBusInterfaceInfo if necessary

 

GDBusInterfaceInfo *interface_info;

the GDBus interface information

 

GDBusInterfaceVTable *vtable;

the GDBus vtable, which must expect the object that implements the TpSvc interface (*not* the GDBusInterfaceSkeleton!) as its user_data

 

gchar **signals;

a NULL-terminated array of GLib signal names in the same order as interface_info->signals.

[array zero-terminated=1]

Since 0.99.10