/* Label child of a captioned */
#define CAPTIONED_LABEL_CHILD "captioned-label"
+#ifdef MODEST_PLATFORM_MAEMO
+#define INTERNAL_MMC_USB_MODE "/system/osso/af/internal-mmc-used-over-usb"
+#endif
static osso_context_t *__osso_context = NULL; /* urgh global */
modest_maemo_utils_get_osso_context (void)
{
if (!__osso_context)
- g_debug ("%s: __osso_context == NULL", __FUNCTION__);
+ __osso_context = osso_initialize(PACKAGE,PACKAGE_VERSION,
+ FALSE, NULL);
return __osso_context;
}
-void
-modest_maemo_utils_set_osso_context (osso_context_t *osso_context)
-{
- g_return_if_fail (osso_context);
- __osso_context = osso_context;
-}
-
static void
get_properties_cb (DBusMessage *message)
{
get_default_adapter_cb (conn, msg);
dbus_message_unref (msg);
}
+
dbus_message_unref (request);
+ if (dbus_error_is_set (&error))
+ dbus_error_free (&error);
}
void
return result;
}
+
+#ifdef MODEST_PLATFORM_MAEMO
+gboolean
+modest_maemo_utils_in_usb_mode ()
+{
+ return modest_conf_get_bool (modest_runtime_get_conf (), INTERNAL_MMC_USB_MODE, NULL);
+}
+#endif