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