5f1afe9e448994aadf640b10fea2ba67d49a4753
[modest] / tests / dbus_api / test_open_message.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         /* TODO: The Message URI system is not yet implemented. */
19         const gboolean ret = libmodest_dbus_client_open_message (osso_context,
20                 "http://todo_some_message_uri");
21         if (!ret) {
22                         printf("libmodest_dbus_client_open_message() failed.\n");
23                 return OSSO_ERROR;
24         } else {
25                 printf("libmodest_dbus_client_open_message() succeeded.\n");
26         }
27                 
28     /* Exit */
29     return 0;
30 }