gboolean
modest_platform_init (void)
{
- osso_hw_state_t hw_state = { 0 };
+ osso_hw_state_t hw_state = { 0 };
+ DBusConnection *con;
osso_context =
osso_initialize(PACKAGE,PACKAGE_VERSION,
FALSE, NULL);
return FALSE;
}
+ if ((con = osso_get_dbus_connection (osso_context)) == NULL) {
+ g_printerr ("Could not get dbus connection\n");
+ return FALSE;
+
+ }
+
+ if (!dbus_connection_add_filter (con,
+ modest_dbus_req_filter,
+ NULL,
+ NULL)) {
+
+ g_printerr ("Could not add dbus filter\n");
+ return FALSE;
+ }
+
/* Register our D-Bus callbacks, via the osso API: */
osso_return_t result = osso_rpc_set_cb_f(osso_context,
MODEST_DBUS_SERVICE,
if (tny_device_is_online (device))
return TRUE;
- /* TODO: Block on the result: */
- gboolean request_sent = tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device), NULL);
- if (!request_sent)
- return FALSE;
-
- return TRUE;
+ /* This blocks on the result: */
+ return tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device), NULL);
}
void
g_return_if_fail (osso_context);
/* Show help */
+#ifdef MODEST_HILDON_VERSION_0
result = ossohelp_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
+#else
+ result = hildon_help_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
+#endif
if (result != OSSO_OK) {
gchar *error_msg;