Added test for OpenEditAccountsDialog Dbus method
[modest] / tests / dbus_api / test_mail_to.c
1 #include <libmodest-dbus-client/libmodest-dbus-client.h>
2 #include <stdio.h>
3
4 int main(int argc, char *argv[])
5 {
6         /* Initialize maemo application */
7         osso_context_t * osso_context = osso_initialize(
8             "test_hello", "0.0.1", TRUE, NULL);
9                
10         /* Check that initialization was ok */
11         if (osso_context == NULL)
12         {
13                 printf("osso_initialize() failed.\n");
14             return OSSO_ERROR;
15         }
16         
17         /* Call the function in libmodest-dbus-client: */
18         const gboolean ret = libmodest_dbus_client_mail_to (osso_context,
19                 "mailto:nomail@nodomain.com?subject=test%20subject%20via%20dbus&body=test%20body%20via%20dbus");
20         if (!ret) {
21                 printf("libmodest_dbus_client_mail_to() failed.\n");
22                 return OSSO_ERROR;
23         } else {
24                 printf("libmodest_dbus_client_mail_to() succeeded.\n");
25         }
26                 
27     /* Exit */
28     return 0;
29 }