Service-side Protocol interface

Service-side Protocol interface — GInterface for Telepathy Protocol objects

Functions

Types and Values

Object Hierarchy

    GInterface
    ├── TpSvcProtocol
    ├── TpSvcProtocolInterfaceAddressing1
    ├── TpSvcProtocolInterfaceAvatars1
    ╰── TpSvcProtocolInterfacePresence1

Known Implementations

TpSvcProtocol is implemented by TpBaseProtocol.

TpSvcProtocolInterfaceAddressing1 is implemented by TpBaseProtocol.

TpSvcProtocolInterfacePresence1 is implemented by TpBaseProtocol.

TpSvcProtocolInterfaceAvatars1 is implemented by TpBaseProtocol.

Includes

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

Description

The TpSvcProtocol interface (auto-generated from the Telepathy spec) makes it easier to export an object implementing the Telepathy Protocol interface.

Functions

tp_svc_protocol_identify_account_impl ()

void
(*tp_svc_protocol_identify_account_impl)
                               (TpSvcProtocol *self,
                                GHashTable *in_Parameters,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method IdentifyAccount on interface im.telepathy.v1.Protocol.

Parameters

self

The object implementing this interface

 

in_Parameters

GHashTable * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_protocol_implement_identify_account ()

void
tp_svc_protocol_implement_identify_account
                               (TpSvcProtocolClass *klass,
                                tp_svc_protocol_identify_account_impl impl);

Register an implementation for the IdentifyAccount 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 IdentifyAccount D-Bus method

 

tp_svc_protocol_implement_normalize_contact ()

void
tp_svc_protocol_implement_normalize_contact
                               (TpSvcProtocolClass *klass,
                                tp_svc_protocol_normalize_contact_impl impl);

Register an implementation for the NormalizeContact 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 NormalizeContact D-Bus method

 

tp_svc_protocol_normalize_contact_impl ()

void
(*tp_svc_protocol_normalize_contact_impl)
                               (TpSvcProtocol *self,
                                const gchar *in_Contact_ID,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method NormalizeContact on interface im.telepathy.v1.Protocol.

Parameters

self

The object implementing this interface

 

in_Contact_ID

const gchar * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_protocol_return_from_identify_account ()

void
tp_svc_protocol_return_from_identify_account
                               (GDBusMethodInvocation *invocation,
                                const gchar *out_Account_ID);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

out_Account_ID

const gchar * (FIXME, generate documentation)

 

tp_svc_protocol_return_from_normalize_contact ()

void
tp_svc_protocol_return_from_normalize_contact
                               (GDBusMethodInvocation *invocation,
                                const gchar *out_Normalized_Contact_ID);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

out_Normalized_Contact_ID

const gchar * (FIXME, generate documentation)

 

Types and Values

TpSvcProtocol

typedef struct _TpSvcProtocol TpSvcProtocol;

Dummy typedef representing any implementation of this interface.


TpSvcProtocolClass

typedef struct _TpSvcProtocolClass TpSvcProtocolClass;

The class of TpSvcProtocol.

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_protocol (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_protocol_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (identify_account);
  IMPLEMENT (normalize_contact);
#undef IMPLEMENT
}

TpSvcProtocolInterfaceAddressing1

typedef struct _TpSvcProtocolInterfaceAddressing1 TpSvcProtocolInterfaceAddressing1;

Dummy typedef representing any implementation of this interface.


TpSvcProtocolInterfaceAddressing1Class

typedef struct _TpSvcProtocolInterfaceAddressing1Class TpSvcProtocolInterfaceAddressing1Class;

The class of TpSvcProtocolInterfaceAddressing1.

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_protocol_interface_addressing1 (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_protocol_interface_addressing1_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (normalize_vcard_address);
  IMPLEMENT (normalize_contact_uri);
#undef IMPLEMENT
}

TpSvcProtocolInterfacePresence1

typedef struct _TpSvcProtocolInterfacePresence1 TpSvcProtocolInterfacePresence1;

Dummy typedef representing any implementation of this interface.


TpSvcProtocolInterfacePresence1Class

typedef struct _TpSvcProtocolInterfacePresence1Class TpSvcProtocolInterfacePresence1Class;

The class of TpSvcProtocolInterfacePresence1. This interface has no D-Bus methods, so an implementation can typically pass NULL to G_IMPLEMENT_INTERFACE() as the interface initialization function.


TpSvcProtocolInterfaceAvatars1

typedef struct _TpSvcProtocolInterfaceAvatars1 TpSvcProtocolInterfaceAvatars1;

Dummy typedef representing any implementation of this interface.


TpSvcProtocolInterfaceAvatars1Class

typedef struct _TpSvcProtocolInterfaceAvatars1Class TpSvcProtocolInterfaceAvatars1Class;

The class of TpSvcProtocolInterfaceAvatars1. This interface has no D-Bus methods, so an implementation can typically pass NULL to G_IMPLEMENT_INTERFACE() as the interface initialization function.

See Also

TpBaseProtocol