1 #include <libmodest-dbus-client/libmodest-dbus-api.h>
2 #include <libmodest-dbus-client/libmodest-dbus-client.h>
7 static gboolean manual = FALSE;
8 static gchar *account_id = NULL;
10 static GOptionEntry option_entries [] =
12 { "manual", 'm', 0, G_OPTION_ARG_NONE, &manual, "Manual send receive, so behave as interactive.", NULL },
13 { "account", 'a', 0, G_OPTION_ARG_STRING, &account_id, "Account to perform send receive into", NULL },
19 main (int argc, char *argv[])
21 osso_context_t *osso_context;
22 GOptionContext *context;
26 context = g_option_context_new ("- Modest email client");
27 g_option_context_add_main_entries (context, option_entries, NULL);
28 if (!g_option_context_parse (context, &argc, &argv, &error)) {
29 g_print ("option parsing failed: %s\n", error->message);
30 g_option_context_free (context);
33 g_option_context_free (context);
35 osso_context = osso_initialize ("test_update_account",
40 if (osso_context == NULL) {
41 g_printerr ("osso_initialize() failed.\n");
45 result = libmodest_dbus_client_send_and_receive_full (osso_context, account_id, manual);