## Service-side Connection Manager interface Service-side Connection Manager interface — GInterface for Telepathy ConnectionManager objects |

## Synopsis

    #include <telepathy-glib/svc-connection-manager.h>

                        TpSvcConnectionManager;
                        TpSvcConnectionManagerClass;
    void                (*tp_svc_connection_manager_get_parameters_impl)
                                                            (TpSvcConnectionManager *self,
                                                             const gchar *in_Protocol,
                                                             DBusGMethodInvocation *context);
    void                tp_svc_connection_manager_implement_get_parameters
                                                            (TpSvcConnectionManagerClass *klass,
                                                             tp_svc_connection_manager_get_parameters_impl impl);
    void                tp_svc_connection_manager_return_from_get_parameters
                                                            (DBusGMethodInvocation *context,
                                                             const GPtrArray *out_Parameters);
    void                (*tp_svc_connection_manager_list_protocols_impl)
                                                            (TpSvcConnectionManager *self,
                                                             DBusGMethodInvocation *context);
    void                tp_svc_connection_manager_implement_list_protocols
                                                            (TpSvcConnectionManagerClass *klass,
                                                             tp_svc_connection_manager_list_protocols_impl impl);
    void                tp_svc_connection_manager_return_from_list_protocols
                                                            (DBusGMethodInvocation *context,
                                                             const gchar **out_Protocols);
    void                (*tp_svc_connection_manager_request_connection_impl)
                                                            (TpSvcConnectionManager *self,
                                                             const gchar *in_Protocol,
                                                             GHashTable *in_Parameters,
                                                             DBusGMethodInvocation *context);
    void                tp_svc_connection_manager_implement_request_connection
                                                            (TpSvcConnectionManagerClass *klass,
                                                             tp_svc_connection_manager_request_connection_impl impl);
    void                tp_svc_connection_manager_return_from_request_connection
                                                            (DBusGMethodInvocation *context,
                                                             const gchar *out_Bus_Name,
                                                             const gchar *out_Object_Path);
    void                tp_svc_connection_manager_emit_new_connection
                                                            (gpointer instance,
                                                             const gchar *arg_Bus_Name,
                                                             const gchar *arg_Object_Path,
                                                             const gchar *arg_Protocol);

## Object Hierarchy

      GInterface
       +----TpSvcConnectionManager

## Known Implementations

TpSvcConnectionManager is implemented by TpBaseConnectionManager.

## Signals

      "new-connection"                                 : Run Last / Has Details

## Description

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

## Details

### TpSvcConnectionManager

    typedef struct _TpSvcConnectionManager TpSvcConnectionManager;

Dummy typedef representing any implementation of this interface.

### TpSvcConnectionManagerClass

    typedef struct _TpSvcConnectionManagerClass TpSvcConnectionManagerClass;

The class of TpSvcConnectionManager.

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_connection_manager (gpointer klass,
        gpointer unused G_GNUC_UNUSED)
    {
    #define IMPLEMENT(x) tp_svc_connection_manager_implement_##x (\
      klass, my_object_##x)
      IMPLEMENT (get_parameters);
      IMPLEMENT (list_protocols);
      IMPLEMENT (request_connection);
    #undef IMPLEMENT
    }

### tp_svc_connection_manager_get_parameters_impl ()

    void                (*tp_svc_connection_manager_get_parameters_impl)
                                                            (TpSvcConnectionManager *self,
                                                             const gchar *in_Protocol,
                                                             DBusGMethodInvocation *context);

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

`self` : | The object implementing this interface
`in_Protocol` : | const gchar * (FIXME, generate documentation)
`context` : | Used to return values or throw an error

### tp_svc_connection_manager_implement_get_parameters ()

    void                tp_svc_connection_manager_implement_get_parameters
                                                            (TpSvcConnectionManagerClass *klass,
                                                             tp_svc_connection_manager_get_parameters_impl impl);

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

### tp_svc_connection_manager_return_from_get_parameters ()

    void                tp_svc_connection_manager_return_from_get_parameters
                                                            (DBusGMethodInvocation *context,
                                                             const GPtrArray *out_Parameters);

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

`context` : | The D-Bus method invocation context
`out_Parameters` : | const GPtrArray * (FIXME, generate documentation)

### tp_svc_connection_manager_list_protocols_impl ()

    void                (*tp_svc_connection_manager_list_protocols_impl)
                                                            (TpSvcConnectionManager *self,
                                                             DBusGMethodInvocation *context);

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

`self` : | The object implementing this interface
`context` : | Used to return values or throw an error

### tp_svc_connection_manager_implement_list_protocols ()

    void                tp_svc_connection_manager_implement_list_protocols
                                                            (TpSvcConnectionManagerClass *klass,
                                                             tp_svc_connection_manager_list_protocols_impl impl);

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

### tp_svc_connection_manager_return_from_list_protocols ()

    void                tp_svc_connection_manager_return_from_list_protocols
                                                            (DBusGMethodInvocation *context,
                                                             const gchar **out_Protocols);

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

`context` : | The D-Bus method invocation context
`out_Protocols` : | const gchar ** (FIXME, generate documentation)

### tp_svc_connection_manager_request_connection_impl ()

    void                (*tp_svc_connection_manager_request_connection_impl)
                                                            (TpSvcConnectionManager *self,
                                                             const gchar *in_Protocol,
                                                             GHashTable *in_Parameters,
                                                             DBusGMethodInvocation *context);

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

`self` : | The object implementing this interface
`in_Protocol` : | const gchar * (FIXME, generate documentation)
`in_Parameters` : | GHashTable * (FIXME, generate documentation)
`context` : | Used to return values or throw an error

### tp_svc_connection_manager_implement_request_connection ()

    void                tp_svc_connection_manager_implement_request_connection
                                                            (TpSvcConnectionManagerClass *klass,
                                                             tp_svc_connection_manager_request_connection_impl impl);

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

### tp_svc_connection_manager_return_from_request_connection ()

    void                tp_svc_connection_manager_return_from_request_connection
                                                            (DBusGMethodInvocation *context,
                                                             const gchar *out_Bus_Name,
                                                             const gchar *out_Object_Path);

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

`context` : | The D-Bus method invocation context
`out_Bus_Name` : | const gchar * (FIXME, generate documentation)
`out_Object_Path` : | const gchar * (FIXME, generate documentation)

### tp_svc_connection_manager_emit_new_connection ()

    void                tp_svc_connection_manager_emit_new_connection
                                                            (gpointer instance,
                                                             const gchar *arg_Bus_Name,
                                                             const gchar *arg_Object_Path,
                                                             const gchar *arg_Protocol);

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

`instance` : | The object implementing this interface
`arg_Bus_Name` : | const gchar * (FIXME, generate documentation)
`arg_Object_Path` : | const gchar * (FIXME, generate documentation)
`arg_Protocol` : | const gchar * (FIXME, generate documentation)

## Signal Details

### The `"new-connection"` signal

    void                user_function                      (TpSvcConnectionManager *arg_Bus_Name,
                                                            gchar                  *arg_Object_Path,
                                                            DBusGObjectPath        *arg_Protocol,
                                                            gchar                  *arg3,
                                                            gpointer                user_data)            : Run Last / Has Details

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

`arg_Bus_Name` : | const gchar * (FIXME, generate documentation)
`arg_Object_Path` : | const gchar * (FIXME, generate documentation)
`arg_Protocol` : | const gchar * (FIXME, generate documentation)
`user_data` : | user data set when the signal handler was connected.

## See Also

TpBaseConnection