Commit b1ee090c authored by Jussi Kukkonen's avatar Jussi Kukkonen

Change plazes position provider to use new WebService-class

parent 09eca2a7
......@@ -4,3 +4,6 @@ all: geoclue_web_service.o
geoclue_web_service.o: geoclue_web_service.c
$(CC) $(geoclue_web_service_CFLAGS) -c geoclue_web_service.c
clean:
rm geoclue_web_service.o
......@@ -68,7 +68,7 @@ static void geoclue_web_service_connection_events_init (GeoclueWebService *self)
G_CALLBACK(geoclue_web_service_conic_callback),
self);
self->using_connection_events = TRUE;
g_debug ("Internet connection event monitoring started");
g_debug ("connection_events init");
}
static void geoclue_web_service_connection_events_deinit (GeoclueWebService *self)
......@@ -133,7 +133,7 @@ geoclue_web_service_fetch (GeoclueWebService *self, gchar *url)
g_assert (url);
xmlNanoHTTPInit();
g_debug ("GET DATA: %s", url);
g_debug ("fetch: %s", url);
ctxt = xmlNanoHTTPMethod (url, "GET", NULL, NULL, NULL, 0);
if (!ctxt) {
g_debug ("xmlNanoHTTPMethod did not get a response.");
......@@ -348,7 +348,6 @@ geoclue_web_service_query (GeoclueWebService *self, ...)
gchar *key, *value, *esc_value, *tmp, *url;
gboolean first_pair = TRUE;
g_debug ("get_data");
g_return_val_if_fail (GEOCLUE_IS_WEB_SERVICE (self), FALSE);
g_return_val_if_fail (self->base_url, FALSE);
......
......@@ -11,7 +11,7 @@ geoclue_position_server_plazes_SOURCES = geoclue_position_server_plazes.c \
# TODO: Yahoo libs/cflags is wrong, fix these...
AM_CPPFLAGS = $(YAHOO_CFLAGS) $(CONIC_CFLAGS) -I$(top_srcdir)
AM_LDFLAGS = $(YAHOO_LIBS) $(CONIC_LIBS) ../../geoclue/libgeoclue.la
AM_LDFLAGS = $(YAHOO_LIBS) $(CONIC_LIBS) ../../geoclue/libgeoclue.la ../common/geoclue_web_service.o
EXTRA_DIST = geoclue_position_server_plazes.h \
position_plazes.desc \
......
......@@ -19,19 +19,14 @@
#ifndef __GEOCLUE_POSITION_SERVER_H__
#define __GEOCLUE_POSITION_SERVER_H__
#define DBUS_API_SUBJECT_TO_CHANGE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
#ifdef HAVE_LIBCONIC
#include <conicconnection.h>
#endif
#include "../common/geoclue_web_service.h"
#define GEOCLUE_POSITION_DBUS_SERVICE "org.freedesktop.geoclue.position.plazes"
#define GEOCLUE_POSITION_DBUS_PATH "/org/freedesktop/geoclue/position/plazes"
......@@ -49,9 +44,12 @@ struct GeocluePosition
GObject parent;
GMainLoop* loop;
GeoclueWebService *web_service;
gdouble current_lat;
gdouble current_lon;
gboolean is_current_valid;
gboolean is_civic_valid;
gchar* civic_country;
gchar* civic_region;
......@@ -64,12 +62,6 @@ struct GeocluePosition
gchar* civic_room;
gchar* civic_description;
gchar* civic_text;
gboolean is_civic_valid;
#ifdef HAVE_LIBCONIC
ConIcConnection* net_connection;
DBusConnection* dbus_connection;
#endif
};
struct GeocluePositionClass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment