2007-05-02 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Wed, 2 May 2007 16:35:13 +0000 (16:35 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Wed, 2 May 2007 16:35:13 +0000 (16:35 +0000)
* src/dbus_api/modest-dbus-callbacks.c:
        (modest_osso_cb_hw_state_handler):
        * src/dbus_api/modest-dbus-callbacks.h:
        * src/maemo/modest-platform.c: (modest_platform_init):
        Registered (empty) callbacks for the osso hardware state D-Bus signals,
        in case this has some effect on the ability for Maemo to ping the
        application.

pmo-trunk-r1734

ChangeLog2
src/dbus_api/modest-dbus-callbacks.c
src/dbus_api/modest-dbus-callbacks.h
src/maemo/modest-platform.c

index 1cc8fe3..880d60b 100644 (file)
@@ -1,5 +1,15 @@
 2007-05-02  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/dbus_api/modest-dbus-callbacks.c:
+       (modest_osso_cb_hw_state_handler):
+       * src/dbus_api/modest-dbus-callbacks.h:
+       * src/maemo/modest-platform.c: (modest_platform_init):
+       Registered (empty) callbacks for the osso hardware state D-Bus signals, 
+       in case this has some effect on the ability for Maemo to ping the 
+       application.
+
+2007-05-02  Murray Cumming  <murrayc@murrayc.com>
+
        * src/modest-text-utils.c: (modest_text_utils_validate_recipient):
        Comment out an if() that checks a gchar for < 0, causing a build-breaking 
        warning. It is probably a logic error, but I need to fix the build.
index 1504c16..ab7e1d8 100644 (file)
@@ -424,3 +424,22 @@ gint modest_dbus_req_handler(const gchar * interface, const gchar * method,
        else
                return OSSO_ERROR;
 }
+
+void
+modest_osso_cb_hw_state_handler(osso_hw_state_t *state, gpointer data)
+{
+    printf("%s()\n", __PRETTY_FUNCTION__);
+
+    if(state->system_inactivity_ind)
+    {
+    }
+    else if(state->save_unsaved_data_ind)
+    {
+    }
+    else
+    {
+    
+    }
+
+    printf("debug: %s(): return\n", __PRETTY_FUNCTION__);
+}
index d88423f..26344f8 100644 (file)
@@ -39,4 +39,6 @@ gint modest_dbus_req_handler(const gchar * interface, const gchar * method,
                       GArray * arguments, gpointer data,
                       osso_rpc_t * retval);
                       
+void modest_osso_cb_hw_state_handler(osso_hw_state_t *state, gpointer data);
+
 #endif /* __MODEST_DBUS_CALLBACKS_H__ */
index 8d6ba12..b286c8f 100644 (file)
@@ -67,6 +67,9 @@ modest_platform_init (void)
                        return OSSO_ERROR;
        }
 
+       /* Register hardware event dbus callback: */
+       osso_hw_set_event_cb(osso_context, NULL, modest_osso_cb_hw_state_handler, NULL);
+
        /* Add handler for Exit D-BUS messages.
         * Not used because osso_application_set_exit_cb() is deprecated and obsolete:
        result = osso_application_set_exit_cb(osso_context,