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

« back to all changes in this revision

Viewing changes to examples/cm/echo-message-parts/main.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:
 
1
/*
 
2
 * main.c - entry point for an example Telepathy connection manager
 
3
 *
 
4
 * Copyright (C) 2007 Collabora Ltd. <http://www.collabora.co.uk/>
 
5
 * Copyright (C) 2007 Nokia Corporation
 
6
 *
 
7
 * Copying and distribution of this file, with or without modification,
 
8
 * are permitted in any medium without royalty provided the copyright
 
9
 * notice and this notice are preserved.
 
10
 */
 
11
 
 
12
#include "config.h"
 
13
 
 
14
#include <telepathy-glib/debug.h>
 
15
#include <telepathy-glib/run.h>
 
16
#include "connection-manager.h"
 
17
 
 
18
static TpBaseConnectionManager *
 
19
construct_cm (void)
 
20
{
 
21
  return (TpBaseConnectionManager *) g_object_new (
 
22
      EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER,
 
23
      NULL);
 
24
}
 
25
 
 
26
int
 
27
main (int argc,
 
28
      char **argv)
 
29
{
 
30
#ifdef ENABLE_DEBUG
 
31
  tp_debug_divert_messages (g_getenv ("EXAMPLE_CM_LOGFILE"));
 
32
  tp_debug_set_flags (g_getenv ("EXAMPLE_DEBUG"));
 
33
 
 
34
  if (g_getenv ("EXAMPLE_TIMING") != NULL)
 
35
    g_log_set_default_handler (tp_debug_timestamped_log_handler, NULL);
 
36
 
 
37
  if (g_getenv ("EXAMPLE_PERSIST") != NULL)
 
38
    tp_debug_set_persistent (TRUE);
 
39
#endif
 
40
 
 
41
  return tp_run_connection_manager ("telepathy-example-cm-echo-2",
 
42
      VERSION, construct_cm, argc, argv);
 
43
}