Commit 4e8066b4 authored by Keith Preston's avatar Keith Preston

Merge branch 'master' of ssh://git.freedesktop.org/git/geoclue

parents c4347500 8c1d8dff
...@@ -27,12 +27,14 @@ missing ...@@ -27,12 +27,14 @@ missing
*.pc *.pc
*_glue.h *_glue.h
doxygen.conf
backend/geocode_yahoo/geoclue-geocode-server-yahoo backend/geocode_yahoo/geoclue-geocode-server-yahoo
backend/map_yahoo/geoclue-map-server-yahoo backend/map_yahoo/geoclue-map-server-yahoo
backend/position_gpsd/geoclue-position-server-gpsd backend/position_gpsd/geoclue-position-server-gpsd
backend/position_hostip/geoclue-position-server-hostip backend/position_hostip/geoclue-position-server-hostip
backend/position_manual/geoclue-position-server-manual backend/position_manual/geoclue-position-server-manual
backend/position_plazes/geoclue-position-server-plazes
example/geoclue-find-example example/geoclue-find-example
example/geoclue-geocode-example example/geoclue-geocode-example
example/geoclue-map-example example/geoclue-map-example
......
...@@ -478,11 +478,10 @@ static void set_civic_location (GeocluePosition *obj, ...@@ -478,11 +478,10 @@ static void set_civic_location (GeocluePosition *obj,
obj->civic_room = g_strdup (room); obj->civic_room = g_strdup (room);
obj->civic_description = g_strdup (description); obj->civic_description = g_strdup (description);
obj->civic_text = g_strdup (text); obj->civic_text = g_strdup (text);
geoclue_position_civic_location_changed (obj, g_signal_emit_by_name (obj, "civic_location_changed",
country, region, locality, area, country, region, locality, area, postalcode, street,
postalcode, street, building, building, floor, room, description, text);
floor, room, description, text);
} }
/* if net connection is monitored, the validity of location can be guaranteed */ /* if net connection is monitored, the validity of location can be guaranteed */
......
...@@ -12,20 +12,22 @@ ...@@ -12,20 +12,22 @@
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the * License along with this library; if not, see
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * <http://www.gnu.org/licenses/>.
* Boston, MA 02111-1307, USA.
*/ */
#ifndef __GEOCLUE_POSITION_SERVER_H__ #ifndef __GEOCLUE_POSITION_MANUAL_SERVER_H__
#define __GEOCLUE_POSITION_SERVER_H__ #define __GEOCLUE_POSITION_MANUAL_SERVER_H__
#define DBUS_API_SUBJECT_TO_CHANGE #define DBUS_API_SUBJECT_TO_CHANGE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <dbus/dbus-glib.h> #include <dbus/dbus-glib.h>
#include <glib.h> #include <glib.h>
#include <config.h> #include <gconf/gconf-client.h>
#define GEOCLUE_POSITION_DBUS_SERVICE "org.freedesktop.geoclue.position.manual" #define GEOCLUE_POSITION_DBUS_SERVICE "org.freedesktop.geoclue.position.manual"
#define GEOCLUE_POSITION_DBUS_PATH "/org/freedesktop/geoclue/position/manual" #define GEOCLUE_POSITION_DBUS_PATH "/org/freedesktop/geoclue/position/manual"
...@@ -33,7 +35,6 @@ ...@@ -33,7 +35,6 @@
G_BEGIN_DECLS G_BEGIN_DECLS
//Let's create a geoclue_position object that has one method of geoclue_position
typedef struct GeocluePosition GeocluePosition; typedef struct GeocluePosition GeocluePosition;
typedef struct GeocluePositionClass GeocluePositionClass; typedef struct GeocluePositionClass GeocluePositionClass;
...@@ -41,7 +42,18 @@ GType geoclue_position_get_type (void); ...@@ -41,7 +42,18 @@ GType geoclue_position_get_type (void);
struct GeocluePosition struct GeocluePosition
{ {
GObject parent; GObject parent;
GMainLoop* loop;
GConfClient* gconf;
gdouble latitude, longitude, altitude;
gchar *country, *region, *locality, *area, *postalcode, *street, *building, *floor, *room, *description, *text;
gboolean civic_location_set, current_position_set;
/*secs after epoch*/
gint valid_until;
gint timestamp;
}; };
struct GeocluePositionClass struct GeocluePositionClass
...@@ -123,16 +135,17 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server, ...@@ -123,16 +135,17 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gdouble* OUT_altitude_velocity, gdouble* OUT_altitude_velocity,
GError **error); GError **error);
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error);
gboolean geoclue_position_satellites_data ( GeocluePosition* server, gboolean geoclue_position_satellites_data ( GeocluePosition* server,
gint* OUT_timestamp, const gint IN_prn_number,
GArray** OUT_prn_number, gdouble* OUT_elevation,
GArray** OUT_elevation, gdouble* OUT_azimuth,
GArray** OUT_azimuth, gdouble* OUT_signal_noise_ratio,
GArray** OUT_signal_noise_ratio, gboolean* OUT_differential,
GArray** OUT_differential, gboolean* OUT_ephemeris,
GArray** OUT_ephemeris,
GError **error); GError **error);
gboolean geoclue_position_civic_location ( GeocluePosition* server, gboolean geoclue_position_civic_location ( GeocluePosition* server,
......
org.freedesktop.geoclue.position.manual org.freedesktop.geoclue.position.manual
/org/freedesktop/geoclue/position/manual /org/freedesktop/geoclue/position/manual
org.freedesktop.geoclue.position org.freedesktop.geoclue.position
Manual User Set Position Manual User Set Position
\ No newline at end of file
...@@ -539,11 +539,10 @@ static void set_civic_location (GeocluePosition *server, ...@@ -539,11 +539,10 @@ static void set_civic_location (GeocluePosition *server,
server->civic_room = g_strdup (room); server->civic_room = g_strdup (room);
server->civic_description = g_strdup (description); server->civic_description = g_strdup (description);
server->civic_text = g_strdup (text); server->civic_text = g_strdup (text);
geoclue_position_civic_location_changed (server, g_signal_emit_by_name (server, "civic_location_changed",
country, region, locality, area, country, region, locality, area, postalcode, street,
postalcode, street, building, building, floor, room, description, text);
floor, room, description, text);
} }
/* if net connection is monitored, the validity of location can be guaranteed */ /* if net connection is monitored, the validity of location can be guaranteed */
......
...@@ -65,7 +65,6 @@ int main (int argc, char** argv) ...@@ -65,7 +65,6 @@ int main (int argc, char** argv)
g_debug ("Querying geoclue_position_service_status"); g_debug ("Querying geoclue_position_service_status");
if (geoclue_position_service_status (NULL, &status, &reason) != GEOCLUE_POSITION_SUCCESS) { if (geoclue_position_service_status (NULL, &status, &reason) != GEOCLUE_POSITION_SUCCESS) {
g_debug ("current status query failed"); g_debug ("current status query failed");
return 1;
} else { } else {
g_debug ("current status query ok"); g_debug ("current status query ok");
printf ("The backend status is %d\n %d No service available\n %d acquiring altitude \n %d acquiring longitude \n %d acquiring latitude \n %d has alititude available \n %d has longitude available \n %d has latitude available \n for the reason %s\n", printf ("The backend status is %d\n %d No service available\n %d acquiring altitude \n %d acquiring longitude \n %d acquiring latitude \n %d has alititude available \n %d has longitude available \n %d has latitude available \n for the reason %s\n",
...@@ -88,7 +87,6 @@ int main (int argc, char** argv) ...@@ -88,7 +87,6 @@ int main (int argc, char** argv)
g_debug ("Querying current position"); g_debug ("Querying current position");
if (geoclue_position_current_position (NULL, &timestamp, &lat, &lon, &altitude) != GEOCLUE_POSITION_SUCCESS) { if (geoclue_position_current_position (NULL, &timestamp, &lat, &lon, &altitude) != GEOCLUE_POSITION_SUCCESS) {
g_debug ("current position query failed"); g_debug ("current position query failed");
return 1;
} else { } else {
g_debug ("current position query ok"); g_debug ("current position query ok");
......
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