Service-side Channel Request interface

Service-side Channel Request interface — GInterface for Telepathy ChannelRequest object

Synopsis

#include <telepathy-glib/svc-channel-request.h>

                    TpSvcChannelRequest;
                    TpSvcChannelRequestClass;
void                tp_svc_channel_request_return_from_proceed
                                                        (DBusGMethodInvocation *context);
void                (*tp_svc_channel_request_proceed_impl)
                                                        (TpSvcChannelRequest *self,
                                                         DBusGMethodInvocation *context);
void                tp_svc_channel_request_implement_proceed
                                                        (TpSvcChannelRequestClass *klass,
                                                         tp_svc_channel_request_proceed_impl impl);
void                tp_svc_channel_request_return_from_cancel
                                                        (DBusGMethodInvocation *context);
void                (*tp_svc_channel_request_cancel_impl)
                                                        (TpSvcChannelRequest *self,
                                                         DBusGMethodInvocation *context);
void                tp_svc_channel_request_implement_cancel
                                                        (TpSvcChannelRequestClass *klass,
                                                         tp_svc_channel_request_cancel_impl impl);
void                tp_svc_channel_request_emit_failed  (gpointer instance,
                                                         const gchar *arg_Error,
                                                         const gchar *arg_Message);
void                tp_svc_channel_request_emit_succeeded
                                                        (gpointer instance);

Object Hierarchy

  GInterface
   +----TpSvcChannelRequest

Signals

  "failed"                                         : Run Last / Has Details
  "succeeded"                                      : Run Last / Has Details

Description

This interface (auto-generated from the Telepathy spec) makes it easier to export an object implementing the Telepathy ChannelRequest interface, with the correct method and signal signatures, and emit signals from that object in a type-safe way.

You don't need these interfaces unless you're implementing a Telepathy ChannelDispatcher, such as Mission Control.

Details

TpSvcChannelRequest

typedef struct _TpSvcChannelRequest TpSvcChannelRequest;

Dummy typedef representing any implementation of this interface.


TpSvcChannelRequestClass

typedef struct _TpSvcChannelRequestClass TpSvcChannelRequestClass;

The class of TpSvcChannelRequest.

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_channel_request (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_channel_request_implement_##x (\
  klass, my_object_##x)
  IMPLEMENT (proceed);
  IMPLEMENT (cancel);
#undef IMPLEMENT
}


tp_svc_channel_request_return_from_proceed ()

void                tp_svc_channel_request_return_from_proceed
                                                        (DBusGMethodInvocation *context);

Return successfully by calling dbus_g_method_return(). This inline function exists only to provide type-safety.

context :

The D-Bus method invocation context

tp_svc_channel_request_proceed_impl ()

void                (*tp_svc_channel_request_proceed_impl)
                                                        (TpSvcChannelRequest *self,
                                                         DBusGMethodInvocation *context);

The signature of an implementation of the D-Bus method Proceed on interface org.freedesktop.Telepathy.ChannelRequest.

self :

The object implementing this interface

context :

Used to return values or throw an error

tp_svc_channel_request_implement_proceed ()

void                tp_svc_channel_request_implement_proceed
                                                        (TpSvcChannelRequestClass *klass,
                                                         tp_svc_channel_request_proceed_impl impl);

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

klass :

A class whose instances implement this interface

impl :

A callback used to implement the Proceed D-Bus method

tp_svc_channel_request_return_from_cancel ()

void                tp_svc_channel_request_return_from_cancel
                                                        (DBusGMethodInvocation *context);

Return successfully by calling dbus_g_method_return(). This inline function exists only to provide type-safety.

context :

The D-Bus method invocation context

tp_svc_channel_request_cancel_impl ()

void                (*tp_svc_channel_request_cancel_impl)
                                                        (TpSvcChannelRequest *self,
                                                         DBusGMethodInvocation *context);

The signature of an implementation of the D-Bus method Cancel on interface org.freedesktop.Telepathy.ChannelRequest.

self :

The object implementing this interface

context :

Used to return values or throw an error

tp_svc_channel_request_implement_cancel ()

void                tp_svc_channel_request_implement_cancel
                                                        (TpSvcChannelRequestClass *klass,
                                                         tp_svc_channel_request_cancel_impl impl);

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

klass :

A class whose instances implement this interface

impl :

A callback used to implement the Cancel D-Bus method

tp_svc_channel_request_emit_failed ()

void                tp_svc_channel_request_emit_failed  (gpointer instance,
                                                         const gchar *arg_Error,
                                                         const gchar *arg_Message);

Type-safe wrapper around g_signal_emit to emit the Failed signal on interface org.freedesktop.Telepathy.ChannelRequest.

instance :

The object implementing this interface

arg_Error :

const gchar * (FIXME, generate documentation)

arg_Message :

const gchar * (FIXME, generate documentation)

tp_svc_channel_request_emit_succeeded ()

void                tp_svc_channel_request_emit_succeeded
                                                        (gpointer instance);

Type-safe wrapper around g_signal_emit to emit the Succeeded signal on interface org.freedesktop.Telepathy.ChannelRequest.

instance :

The object implementing this interface

Signal Details

The "failed" signal

void                user_function                      (TpSvcChannelRequest *arg_Error,
                                                        gchar               *arg_Message,
                                                        gchar               *arg2,
                                                        gpointer             user_data)        : Run Last / Has Details

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

arg_Error :

const gchar * (FIXME, generate documentation)

arg_Message :

const gchar * (FIXME, generate documentation)

user_data :

user data set when the signal handler was connected.

The "succeeded" signal

void                user_function                      (TpSvcChannelRequest *arg0,
                                                        gpointer             user_data)      : Run Last / Has Details

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

user_data :

user data set when the signal handler was connected.