Service-side Client interfaces

Service-side Client interfaces — interfaces used to be an Observer, Approver and Handler

Functions

Types and Values

Object Hierarchy

    GInterface
    ├── TpSvcClient
    ├── TpSvcClientApprover
    ├── TpSvcClientHandler
    ├── TpSvcClientInterfaceRequests
    ╰── TpSvcClientObserver

Known Implementations

TpSvcClient is implemented by TpBaseClient, TpSimpleApprover, TpSimpleHandler and TpSimpleObserver.

TpSvcClientApprover is implemented by TpBaseClient, TpSimpleApprover, TpSimpleHandler and TpSimpleObserver.

TpSvcClientHandler is implemented by TpBaseClient, TpSimpleApprover, TpSimpleHandler and TpSimpleObserver.

TpSvcClientInterfaceRequests is implemented by TpBaseClient, TpSimpleApprover, TpSimpleHandler and TpSimpleObserver.

TpSvcClientObserver is implemented by TpBaseClient, TpSimpleApprover, TpSimpleHandler and TpSimpleObserver.

Includes

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

Description

These interfaces (auto-generated from the telepathy spec) make it easier to export the objects used to implement a Telepathy client.

Clients such as loggers, new message notification windows and chat UIs should implement some or all of the Client types (Observer, Approver and/or Handler): see telepathy-spec for details.

Functions

tp_svc_client_approver_return_from_add_dispatch_operation ()

void
tp_svc_client_approver_return_from_add_dispatch_operation
                               (GDBusMethodInvocation *invocation);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

tp_svc_client_approver_add_dispatch_operation_impl ()

void
(*tp_svc_client_approver_add_dispatch_operation_impl)
                               (TpSvcClientApprover *self,
                                const gchar *in_DispatchOperation,
                                GHashTable *in_Properties,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method AddDispatchOperation on interface im.telepathy.v1.Client.Approver.

Parameters

self

The object implementing this interface

 

in_DispatchOperation

const gchar * (FIXME, generate documentation)

 

in_Properties

GHashTable * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_client_approver_implement_add_dispatch_operation ()

void
tp_svc_client_approver_implement_add_dispatch_operation
                               (TpSvcClientApproverClass *klass,
                                tp_svc_client_approver_add_dispatch_operation_impl impl);

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

 

tp_svc_client_handler_return_from_handle_channel ()

void
tp_svc_client_handler_return_from_handle_channel
                               (GDBusMethodInvocation *invocation);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

tp_svc_client_handler_handle_channel_impl ()

void
(*tp_svc_client_handler_handle_channel_impl)
                               (TpSvcClientHandler *self,
                                const gchar *in_Account,
                                const gchar *in_Connection,
                                const gchar *in_Channel,
                                GHashTable *in_Channel_Properties,
                                GHashTable *in_Requests_Satisfied,
                                gint64 in_User_Action_Time,
                                GHashTable *in_Handler_Info,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method HandleChannel on interface im.telepathy.v1.Client.Handler.

Parameters

self

The object implementing this interface

 

in_Account

const gchar * (FIXME, generate documentation)

 

in_Connection

const gchar * (FIXME, generate documentation)

 

in_Channel

const gchar * (FIXME, generate documentation)

 

in_Channel_Properties

GHashTable * (FIXME, generate documentation)

 

in_Requests_Satisfied

GHashTable * (FIXME, generate documentation)

 

in_User_Action_Time

gint64 (FIXME, generate documentation)

 

in_Handler_Info

GHashTable * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_client_handler_implement_handle_channel ()

void
tp_svc_client_handler_implement_handle_channel
                               (TpSvcClientHandlerClass *klass,
                                tp_svc_client_handler_handle_channel_impl impl);

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

 

tp_svc_client_interface_requests_return_from_add_request ()

void
tp_svc_client_interface_requests_return_from_add_request
                               (GDBusMethodInvocation *invocation);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

tp_svc_client_interface_requests_add_request_impl ()

void
(*tp_svc_client_interface_requests_add_request_impl)
                               (TpSvcClientInterfaceRequests *self,
                                const gchar *in_Request,
                                GHashTable *in_Properties,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method AddRequest on interface im.telepathy.v1.Client.Interface.Requests.

Parameters

self

The object implementing this interface

 

in_Request

const gchar * (FIXME, generate documentation)

 

in_Properties

GHashTable * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_client_interface_requests_implement_add_request ()

void
tp_svc_client_interface_requests_implement_add_request
                               (TpSvcClientInterfaceRequestsClass *klass,
                                tp_svc_client_interface_requests_add_request_impl impl);

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

 

tp_svc_client_interface_requests_return_from_remove_request ()

void
tp_svc_client_interface_requests_return_from_remove_request
                               (GDBusMethodInvocation *invocation);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

tp_svc_client_interface_requests_remove_request_impl ()

void
(*tp_svc_client_interface_requests_remove_request_impl)
                               (TpSvcClientInterfaceRequests *self,
                                const gchar *in_Request,
                                const gchar *in_Error,
                                const gchar *in_Message,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method RemoveRequest on interface im.telepathy.v1.Client.Interface.Requests.

Parameters

self

The object implementing this interface

 

in_Request

const gchar * (FIXME, generate documentation)

 

in_Error

const gchar * (FIXME, generate documentation)

 

in_Message

const gchar * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_client_interface_requests_implement_remove_request ()

void
tp_svc_client_interface_requests_implement_remove_request
                               (TpSvcClientInterfaceRequestsClass *klass,
                                tp_svc_client_interface_requests_remove_request_impl impl);

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

 

tp_svc_client_observer_return_from_observe_channel ()

void
tp_svc_client_observer_return_from_observe_channel
                               (GDBusMethodInvocation *invocation);

Return successfully by calling g_dbus_method_invocation_return_value().

Parameters

invocation

The D-Bus method invocation context

 

tp_svc_client_observer_observe_channel_impl ()

void
(*tp_svc_client_observer_observe_channel_impl)
                               (TpSvcClientObserver *self,
                                const gchar *in_Account,
                                const gchar *in_Connection,
                                const gchar *in_Channel,
                                GHashTable *in_Channel_Properties,
                                const gchar *in_Dispatch_Operation,
                                GHashTable *in_Requests_Satisfied,
                                GHashTable *in_Observer_Info,
                                GDBusMethodInvocation *invocation);

The signature of an implementation of the D-Bus method ObserveChannel on interface im.telepathy.v1.Client.Observer.

Parameters

self

The object implementing this interface

 

in_Account

const gchar * (FIXME, generate documentation)

 

in_Connection

const gchar * (FIXME, generate documentation)

 

in_Channel

const gchar * (FIXME, generate documentation)

 

in_Channel_Properties

GHashTable * (FIXME, generate documentation)

 

in_Dispatch_Operation

const gchar * (FIXME, generate documentation)

 

in_Requests_Satisfied

GHashTable * (FIXME, generate documentation)

 

in_Observer_Info

GHashTable * (FIXME, generate documentation)

 

invocation

Used to return values or throw an error

 

tp_svc_client_observer_implement_observe_channel ()

void
tp_svc_client_observer_implement_observe_channel
                               (TpSvcClientObserverClass *klass,
                                tp_svc_client_observer_observe_channel_impl impl);

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

 

Types and Values

TpSvcClient

typedef struct _TpSvcClient TpSvcClient;

Dummy typedef representing any implementation of this interface.


TpSvcClientClass

typedef struct _TpSvcClientClass TpSvcClientClass;

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


TpSvcClientApprover

typedef struct _TpSvcClientApprover TpSvcClientApprover;

Dummy typedef representing any implementation of this interface.


TpSvcClientApproverClass

typedef struct _TpSvcClientApproverClass TpSvcClientApproverClass;

The class of TpSvcClientApprover.

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_client_approver (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_client_approver_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (add_dispatch_operation);
#undef IMPLEMENT
}

TpSvcClientHandler

typedef struct _TpSvcClientHandler TpSvcClientHandler;

Dummy typedef representing any implementation of this interface.


TpSvcClientHandlerClass

typedef struct _TpSvcClientHandlerClass TpSvcClientHandlerClass;

The class of TpSvcClientHandler.

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_client_handler (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_client_handler_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (handle_channel);
#undef IMPLEMENT
}

TpSvcClientInterfaceRequests

typedef struct _TpSvcClientInterfaceRequests TpSvcClientInterfaceRequests;

Dummy typedef representing any implementation of this interface.


TpSvcClientInterfaceRequestsClass

typedef struct _TpSvcClientInterfaceRequestsClass TpSvcClientInterfaceRequestsClass;

The class of TpSvcClientInterfaceRequests.

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_client_interface_requests (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_client_interface_requests_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (add_request);
  IMPLEMENT (remove_request);
#undef IMPLEMENT
}

TpSvcClientObserver

typedef struct _TpSvcClientObserver TpSvcClientObserver;

Dummy typedef representing any implementation of this interface.


TpSvcClientObserverClass

typedef struct _TpSvcClientObserverClass TpSvcClientObserverClass;

The class of TpSvcClientObserver.

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_client_observer (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_client_observer_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (observe_channel);
#undef IMPLEMENT
}