~ubuntu-branches/ubuntu/wily/telepathy-glib/wily

« back to all changes in this revision

Viewing changes to examples/cm/echo/conn.c

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2009-03-24 22:06:52 UTC
  • mfrom: (1.3.1 upstream) (17.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20090324220652-c8dvom0nsqomp23d
Tags: 0.7.28-1
* New upstream version (ABI, API added)
* Put the -dbg package in section debug, as per recent archive changes
* Remove obsolete Conflicts/Replaces with libtelepathy-glib-static-dev, which
  was never in a stable release (and probably never in Debian at all)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include <telepathy-glib/dbus.h>
17
17
#include <telepathy-glib/errors.h>
18
18
#include <telepathy-glib/handle-repo-dynamic.h>
 
19
#include <telepathy-glib/interfaces.h>
19
20
 
20
 
#include "factory.h"
 
21
#include "im-manager.h"
21
22
 
22
23
G_DEFINE_TYPE (ExampleEchoConnection,
23
24
    example_echo_connection,
104
105
{
105
106
  if (id[0] == '\0')
106
107
    {
107
 
      g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
 
108
      g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
108
109
          "ID must not be empty");
109
110
      return NULL;
110
111
    }
121
122
}
122
123
 
123
124
static GPtrArray *
124
 
create_channel_factories (TpBaseConnection *conn)
 
125
create_channel_managers (TpBaseConnection *conn)
125
126
{
126
127
  GPtrArray *ret = g_ptr_array_sized_new (1);
127
128
 
128
 
  g_ptr_array_add (ret, g_object_new (EXAMPLE_TYPE_ECHO_FACTORY,
 
129
  g_ptr_array_add (ret, g_object_new (EXAMPLE_TYPE_ECHO_IM_MANAGER,
129
130
        "connection", conn,
130
131
        NULL));
131
132
 
165
166
static void
166
167
example_echo_connection_class_init (ExampleEchoConnectionClass *klass)
167
168
{
 
169
  static const gchar *interfaces_always_present[] = {
 
170
      TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
 
171
      NULL };
168
172
  TpBaseConnectionClass *base_class =
169
173
      (TpBaseConnectionClass *) klass;
170
174
  GObjectClass *object_class = (GObjectClass *) klass;
177
181
 
178
182
  base_class->create_handle_repos = create_handle_repos;
179
183
  base_class->get_unique_connection_name = get_unique_connection_name;
180
 
  base_class->create_channel_factories = create_channel_factories;
 
184
  base_class->create_channel_managers = create_channel_managers;
181
185
  base_class->start_connecting = start_connecting;
182
186
  base_class->shut_down = shut_down;
 
187
  base_class->interfaces_always_present = interfaces_always_present;
183
188
 
184
189
  param_spec = g_param_spec_string ("account", "Account name",
185
190
      "The username of this user", NULL,