Maemo integration patch



Hi Lucas,

I merged the Maemo patch last evening.  Sorry for being so slow on that!

Before merging it though, I removed a number of the #ifdefs.  My
philosophy on #ifdefs is that if the code can compile and run without
them, and there is no major performance hit, they should be removed.

Things are usually far more readable that way.  For example the
networking changes:

@@ -144,19 +144,41 @@
         const char *member = dbus_message_get_member(message);
 
         g_debug("system bus signal from %s %s.%s", sender ? sender : "NULL", interface, member);
-   
+
+#ifndef WITH_MAEMO   
         if (dbus_message_is_signal(message, "org.freedesktop.NetworkManager", "StateChange")) {
             dbus_uint32_t v_UINT32;
-            
+#else
+        if (dbus_message_is_signal(message, "com.nokia.icd", "status_changed")) {
+            char *iap_id, *bearer, *state;
+#endif
+
+#ifndef WITH_MAEMO            
             if (dbus_message_get_args(message, NULL, DBUS_TYPE_UINT32,

This created a mess; and since there is no real harm in just watching
for *both* org.freedesktop.NetworkManager and com.nokia.icd, the code
now just does:

        if (dbus_message_is_signal(message, "org.freedesktop.NetworkManager", "StateChange")) {
           /* Handle change */
        } else if (dbus_message_is_signal(message, "com.nokia.icd", "status_changed")) {
           /* Handle change */
        }

Similarly for watching for the microb cookies, definition of
HIPPO_BROWSER_MAEMO, etc.

Again thanks for the patch, and please let me know if you have a chance
to test the merged changes on Maemo!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]