Service-side Channel base interface

Service-side Channel base interface — GInterface for Telepathy Channel objects

Synopsis

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

                    TpSvcChannel;
                    TpSvcChannelClass;
void                (*tp_svc_channel_close_impl)        (TpSvcChannel *self,
                                                         DBusGMethodInvocation *context);
void                tp_svc_channel_implement_close      (TpSvcChannelClass *klass,
                                                         tp_svc_channel_close_impl impl);
void                tp_svc_channel_return_from_close    (DBusGMethodInvocation *context);
void                tp_svc_channel_emit_closed          (gpointer instance);

                    TpSvcChannelInterfaceDestroyable1;
                    TpSvcChannelInterfaceDestroyable1Class;
void                (*tp_svc_channel_interface_destroyable1_destroy_impl)
                                                        (TpSvcChannelInterfaceDestroyable1 *self,
                                                         DBusGMethodInvocation *context);
void                tp_svc_channel_interface_destroyable1_implement_destroy
                                                        (TpSvcChannelInterfaceDestroyable1Class *klass,
                                                         tp_svc_channel_interface_destroyable1_destroy_impl impl);
void                tp_svc_channel_interface_destroyable1_return_from_destroy
                                                        (DBusGMethodInvocation *context);

Object Hierarchy

  GInterface
   +----TpSvcChannel
  GInterface
   +----TpSvcChannelInterfaceDestroyable1

Known Derived Interfaces

TpSvcChannel is required by TpExportableChannel.

Known Implementations

TpSvcChannel is implemented by TpBaseCallChannel, TpBaseChannel, TpBaseMediaCallChannel and TpBasePasswordChannel.

Signals

  "closed"                                         : Has Details

Description

This interface (auto-generated from the Telepathy spec) makes it easier to export objects implementing the Telepathy Channel.

Details

TpSvcChannel

typedef struct _TpSvcChannel TpSvcChannel;

Dummy typedef representing any implementation of this interface.


TpSvcChannelClass

typedef struct _TpSvcChannelClass TpSvcChannelClass;

The class of TpSvcChannel.

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


tp_svc_channel_close_impl ()

void                (*tp_svc_channel_close_impl)        (TpSvcChannel *self,
                                                         DBusGMethodInvocation *context);

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

self :

The object implementing this interface

context :

Used to return values or throw an error

tp_svc_channel_implement_close ()

void                tp_svc_channel_implement_close      (TpSvcChannelClass *klass,
                                                         tp_svc_channel_close_impl impl);

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

tp_svc_channel_return_from_close ()

void                tp_svc_channel_return_from_close    (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_emit_closed ()

void                tp_svc_channel_emit_closed          (gpointer instance);

Type-safe wrapper around g_signal_emit to emit the Closed signal on interface im.telepathy.v1.Channel.

instance :

The object implementing this interface

TpSvcChannelInterfaceDestroyable1

typedef struct _TpSvcChannelInterfaceDestroyable1 TpSvcChannelInterfaceDestroyable1;

Dummy typedef representing any implementation of this interface.


TpSvcChannelInterfaceDestroyable1Class

typedef struct _TpSvcChannelInterfaceDestroyable1Class TpSvcChannelInterfaceDestroyable1Class;

The class of TpSvcChannelInterfaceDestroyable1.

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


tp_svc_channel_interface_destroyable1_destroy_impl ()

void                (*tp_svc_channel_interface_destroyable1_destroy_impl)
                                                        (TpSvcChannelInterfaceDestroyable1 *self,
                                                         DBusGMethodInvocation *context);

The signature of an implementation of the D-Bus method Destroy on interface im.telepathy.v1.Channel.Interface.Destroyable1.

self :

The object implementing this interface

context :

Used to return values or throw an error

tp_svc_channel_interface_destroyable1_implement_destroy ()

void                tp_svc_channel_interface_destroyable1_implement_destroy
                                                        (TpSvcChannelInterfaceDestroyable1Class *klass,
                                                         tp_svc_channel_interface_destroyable1_destroy_impl impl);

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

tp_svc_channel_interface_destroyable1_return_from_destroy ()

void                tp_svc_channel_interface_destroyable1_return_from_destroy
                                                        (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

Signal Details

The "closed" signal

void                user_function                      (TpSvcChannel *self,
                                                        gpointer      user_data)      : Has Details

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

self :

an object

user_data :

user data set when the signal handler was connected.

See Also

TpChannelIface