1 #include <libmodest-dbus-client/libmodest-dbus-client.h>
6 static gchar *account_id = NULL;
8 static GOptionEntry option_entries [] =
10 { "account", 'a', 0, G_OPTION_ARG_STRING, &account_id, "Account to perform update folder accounts into", NULL },
16 main (int argc, char *argv[])
18 osso_context_t *osso_context;
19 GOptionContext *context;
23 context = g_option_context_new ("- Modest email client");
24 g_option_context_add_main_entries (context, option_entries, NULL);
25 if (!g_option_context_parse (context, &argc, &argv, &error)) {
26 g_print ("option parsing failed: %s\n", error->message);
27 g_option_context_free (context);
30 g_option_context_free (context);
32 osso_context = osso_initialize ("test_update_account",
37 if (osso_context == NULL) {
38 g_printerr ("osso_initialize() failed.\n");
42 if (account_id == NULL) {
43 g_printerr ("Provide an account id\n");
47 result = libmodest_dbus_client_update_folder_counts (osso_context, account_id);