]> err.no Git - mapper/commitdiff
Fix usage of renamed functions. Misc other stuff.
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 13 Sep 2007 14:36:45 +0000 (17:36 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 13 Sep 2007 14:36:45 +0000 (17:36 +0300)
src/iap.c
src/maemo-osso.c
src/map-download.h
src/map.h

index e2d2ead9d6605258b7ba2596e0bc38d1084176e5..c26c19f2b9fbbace655b2dc87f0fbf45cf86f592 100644 (file)
--- a/src/iap.c
+++ b/src/iap.c
@@ -8,63 +8,52 @@
 #include <osso-ic.h>
 
 #include "iap.h"
-#include "map.h"
+#include "map-download.h"
 #include "gps.h"
+#include "config-gconf.h"
 
 gboolean iap_connecting=FALSE;
 gboolean iap_connected=TRUE;
 
 void iap_callback(struct iap_event_t *event, void *arg)
 {
-       printf("%s()\n", __PRETTY_FUNCTION__);
-       iap_connecting = FALSE;
-       if (event->type == OSSO_IAP_CONNECTED && !iap_connected) {
-               iap_connected = TRUE;
-               config_update_proxy();
-               if (!_curl_sid)
-                       _curl_sid = g_timeout_add(100,
-                                                 (GSourceFunc)
-                                                 curl_download_timeout, NULL);
-       }
-       vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+iap_connecting = FALSE;
+if (event->type == OSSO_IAP_CONNECTED && !iap_connected) {
+       iap_connected = TRUE;
+       config_update_proxy();
+       if (!_curl_sid)
+               _curl_sid = g_timeout_add(100, (GSourceFunc)map_download_timeout, NULL);
+}
 }
 
 DBusHandlerResult
 get_connection_status_signal_cb(DBusConnection * connection,
                                DBusMessage * message, void *user_data)
 {
-       gchar *iap_name = NULL, *iap_nw_type = NULL, *iap_state = NULL;
-       printf("%s()\n", __PRETTY_FUNCTION__);
+gchar *iap_name = NULL, *iap_nw_type = NULL, *iap_state = NULL;
 
-       /* check signal */
-       if (!dbus_message_is_signal(message,
-                                   ICD_DBUS_INTERFACE,
-                                   ICD_STATUS_CHANGED_SIG)) {
-               vprintf("%s(): return DBUS_HANDLER_RESULT_NOT_YET_HANDLED\n",
-                       __PRETTY_FUNCTION__);
-               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-       }
+/* check signal */
+if (!dbus_message_is_signal(message, ICD_DBUS_INTERFACE, ICD_STATUS_CHANGED_SIG)) {
+       vprintf("%s(): return DBUS_HANDLER_RESULT_NOT_YET_HANDLED\n", __PRETTY_FUNCTION__);
+       return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
 
-       if (!dbus_message_get_args(message, NULL,
-                                  DBUS_TYPE_STRING, &iap_name,
-                                  DBUS_TYPE_STRING, &iap_nw_type,
-                                  DBUS_TYPE_STRING, &iap_state,
-                                  DBUS_TYPE_INVALID)) {
-               vprintf("%s(): return DBUS_HANDLER_RESULT_NOT_YET_HANDLED\n",
-                       __PRETTY_FUNCTION__);
+if (!dbus_message_get_args(message, NULL,
+                  DBUS_TYPE_STRING, &iap_name,
+                  DBUS_TYPE_STRING, &iap_nw_type,
+                  DBUS_TYPE_STRING, &iap_state,
+                  DBUS_TYPE_INVALID)) {
+               vprintf("%s(): return DBUS_HANDLER_RESULT_NOT_YET_HANDLED\n", __PRETTY_FUNCTION__);
                return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-       }
+}
 
-       printf("  > iap_state = %s\n", iap_state);
-       if (!strcmp(iap_state, "CONNECTED")) {
-               if (!iap_connected) {
-                       iap_connected = TRUE;
-                       config_update_proxy();
-                       if (!_curl_sid)
-                               _curl_sid = g_timeout_add(100,
-                                                         (GSourceFunc)
-                                                         curl_download_timeout,
-                                                         NULL);
+printf("  > iap_state = %s\n", iap_state);
+if (!strcmp(iap_state, "CONNECTED")) {
+       if (!iap_connected) {
+               iap_connected = TRUE;
+               config_update_proxy();
+               if (!_curl_sid)
+                       _curl_sid = g_timeout_add(100, (GSourceFunc)map_download_timeout, NULL);
                }
        } else if (iap_connected) {
                iap_connected = FALSE;
@@ -73,10 +62,8 @@ get_connection_status_signal_cb(DBusConnection * connection,
                        _curl_sid = 0;
                }
        }
-
-       vprintf("%s(): return DBUS_HANDLER_RESULT_HANDLED\n",
-               __PRETTY_FUNCTION__);
-       return DBUS_HANDLER_RESULT_HANDLED;
+vprintf("%s(): return DBUS_HANDLER_RESULT_HANDLED\n", __PRETTY_FUNCTION__);
+return DBUS_HANDLER_RESULT_HANDLED;
 }
 
 void
index c50bf95e8f9229597f7a0feeff1539343bb02d2b..be322b01f89f0fd704631bbe47cf0a285ad4d081 100644 (file)
@@ -17,6 +17,7 @@
 #include <osso-ic.h>
 
 #include "map.h"
+#include "map-download.h"
 #include "route.h"
 #include "mapper-types.h"
 #include "bt.h"
@@ -80,9 +81,7 @@ if (state->system_inactivity_ind) {
 
        /* Start curl in case there are downloads pending. */
        if (iap_is_connected() && !_curl_sid)
-               _curl_sid = g_timeout_add(100,
-                                         (GSourceFunc)
-                                         curl_download_timeout, NULL);
+               _curl_sid = g_timeout_add(100, (GSourceFunc)map_download_timeout, NULL);
 }
 vprintf("%s(): return\n", __PRETTY_FUNCTION__);
 }
index d2b6a163bf26f90204d643657192ce47904c6f7e..1fe6b8368033c9e61b4ef8eda16319c37963e5eb 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <curl/multi.h>
 #include <glib.h>
+#include "mapper-types.h"
 
 CURLM *_curl_multi;
 GQueue *_curl_easy_queue;
index 74afd1e2d897ab5da66d91dbbf947c4c2d2c3127..cac230dd7621e034850040902f9afc18e2044f74 100644 (file)
--- a/src/map.h
+++ b/src/map.h
@@ -69,7 +69,6 @@ gboolean _map_location_known;
 gdouble _map_location_dist;
 
 gboolean map_key_zoom_timeout();
-gboolean curl_download_timeout();
 
 void map_set_autozoom(gboolean az);
 int map_zoom(gint zdir);