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
*.pc
*_glue.h
doxygen.conf
backend/geocode_yahoo/geoclue-geocode-server-yahoo
backend/map_yahoo/geoclue-map-server-yahoo
backend/position_gpsd/geoclue-position-server-gpsd
backend/position_hostip/geoclue-position-server-hostip
backend/position_manual/geoclue-position-server-manual
backend/position_plazes/geoclue-position-server-plazes
example/geoclue-find-example
example/geoclue-geocode-example
example/geoclue-map-example
......
......@@ -479,10 +479,9 @@ static void set_civic_location (GeocluePosition *obj,
obj->civic_description = g_strdup (description);
obj->civic_text = g_strdup (text);
geoclue_position_civic_location_changed (obj,
country, region, locality, area,
postalcode, street, building,
floor, room, description, text);
g_signal_emit_by_name (obj, "civic_location_changed",
country, region, locality, area, postalcode, street,
building, floor, room, description, text);
}
/* if net connection is monitored, the validity of location can be guaranteed */
......
......@@ -12,20 +12,22 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef __GEOCLUE_POSITION_SERVER_H__
#define __GEOCLUE_POSITION_SERVER_H__
#ifndef __GEOCLUE_POSITION_MANUAL_SERVER_H__
#define __GEOCLUE_POSITION_MANUAL_SERVER_H__
#define DBUS_API_SUBJECT_TO_CHANGE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <dbus/dbus-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_PATH "/org/freedesktop/geoclue/position/manual"
......@@ -33,7 +35,6 @@
G_BEGIN_DECLS
//Let's create a geoclue_position object that has one method of geoclue_position
typedef struct GeocluePosition GeocluePosition;
typedef struct GeocluePositionClass GeocluePositionClass;
......@@ -42,6 +43,17 @@ struct GeocluePosition
{
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
......@@ -123,16 +135,17 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gdouble* OUT_altitude_velocity,
GError **error);
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error);
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
GError **error);
gboolean geoclue_position_civic_location ( GeocluePosition* server,
......
......@@ -540,10 +540,9 @@ static void set_civic_location (GeocluePosition *server,
server->civic_description = g_strdup (description);
server->civic_text = g_strdup (text);
geoclue_position_civic_location_changed (server,
country, region, locality, area,
postalcode, street, building,
floor, room, description, text);
g_signal_emit_by_name (server, "civic_location_changed",
country, region, locality, area, postalcode, street,
building, floor, room, description, text);
}
/* if net connection is monitored, the validity of location can be guaranteed */
......
......@@ -65,7 +65,6 @@ int main (int argc, char** argv)
g_debug ("Querying geoclue_position_service_status");
if (geoclue_position_service_status (NULL, &status, &reason) != GEOCLUE_POSITION_SUCCESS) {
g_debug ("current status query failed");
return 1;
} else {
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",
......@@ -88,7 +87,6 @@ int main (int argc, char** argv)
g_debug ("Querying current position");
if (geoclue_position_current_position (NULL, &timestamp, &lat, &lon, &altitude) != GEOCLUE_POSITION_SUCCESS) {
g_debug ("current position query failed");
return 1;
} else {
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