summaryrefslogtreecommitdiff
path: root/tests/dbus/test-tpl-log-store-sqlite.c
blob: f9a25e1e1e6eb2e7ed5488a1ddc8d64175fc31d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "config.h"

#include <telepathy-logger/log-store-sqlite-internal.h>
#include <telepathy-logger/debug-internal.h>
#include <telepathy-logger/client-factory-internal.h>

int
main (int argc, char **argv)
{
  TplLogStore *store;
  TpDBusDaemon *bus;
  TpAccount *account;
  GError *error = NULL;
  TpSimpleClientFactory* factory;

  g_type_init ();

  _tpl_debug_set_flags_from_env ();

  bus = tp_dbus_daemon_dup (&error);
  g_assert_no_error (error);

  factory = _tpl_client_factory_dup (bus);

  account =  tp_simple_client_factory_ensure_account (factory,
      TP_ACCOUNT_OBJECT_PATH_BASE "gabble/jabber/danielle_2emadeley_40collabora_2eco_2euk0",
      NULL, &error);
  g_assert_no_error (error);

  store = _tpl_log_store_sqlite_dup ();

  g_print ("freq = %g\n",
      _tpl_log_store_sqlite_get_frequency (TPL_LOG_STORE_SQLITE (store),
        account, "dannielle.meyer@gmail.com"));

  g_object_unref (store);
  g_object_unref (account);
  g_object_unref (bus);
  g_object_unref (factory);
}