(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > (In reply to comment #4)
> > > > > Started working on geoclue2 provider.
> > > >
> > > > Awesome. Would be really nice if all apps have already ported in 3.10 so distros don't have to keep shipping the old unmaintained code.
> > >
> > > To be clear, I meant GNOME 3.10. :)
> >
> > While implementing it got few questions for you:
> > 1) About accuracy - are you planning to add API to set accuracy level of the latitude and longitude coordinates?
>
> If I understood your question correctly, no. This info is given from geoclue to app together with coordinates. Its accuracy of the location fix in meters. Currently its city-level at best. The app-writable 'DistanceThreshold' property is to specify the minimum distance changed before geoclue should notify your app.
Just for information you had this API for accuracy in geoclue:
/**
* GeoclueAccuracyLevel:
*
* Enum values used to define the approximate accuracy of
* Position or Address information. These are ordered in
* from lowest accuracy possible to highest accuracy possible.
* geoclue_accuracy_get_details() can be used to get get the
* current accuracy. It is up to the provider to set the
* accuracy based on analysis of its queries.
**/
typedef enum {
GEOCLUE_ACCURACY_LEVEL_NONE = 0,
GEOCLUE_ACCURACY_LEVEL_COUNTRY,
GEOCLUE_ACCURACY_LEVEL_REGION,
GEOCLUE_ACCURACY_LEVEL_LOCALITY,
GEOCLUE_ACCURACY_LEVEL_POSTALCODE,
GEOCLUE_ACCURACY_LEVEL_STREET,
GEOCLUE_ACCURACY_LEVEL_DETAILED,
} GeoclueAccuracyLevel;
geoclue_master_client_set_requirements_*(, GeoclueAccuracyLevel, ...);
>
> > 2) Same about timestamps - there is no way to obtain them now.
>
> What kind of timestamps you need?
from the Geolocation spec: The length of time specified by the timeout property has elapsed before the implementation could successfully acquire a new Position.
in geoclue https://developer.gnome.org/geoclue/unstable/GeocluePosition.html#GeocluePositionCallback has timestamp which I guess
is abs time of acquiring the position. In geoclue2 I can calculate timestamps myself on LocationUpdated but it would be a bit in precise. But probably should be OK in most of the cases.
>
> > 3) I am going to use gdbus-codegen to generate wrapper for the API like they do it for Empathy. if you had client lib for the API it would be a bit easier but anyway I can live with the generated interface.
>
> Sure. I was kind hoping that Empathy guys meant contributing patches for these rather when they said "contribute". :)
>
> > 4) And last question for now :) where can I find geoclue2 ip location provider to try out my changes?
>
> You don't need to do anything other than to just install geoclue2 (in system prefix as that seems to be required of system dbus services) and run your app.
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > (In reply to comment #4)
> > > > > Started working on geoclue2 provider.
> > > >
> > > > Awesome. Would be really nice if all apps have already ported in 3.10 so distros don't have to keep shipping the old unmaintained code.
> > >
> > > To be clear, I meant GNOME 3.10. :)
> >
> > While implementing it got few questions for you:
> > 1) About accuracy - are you planning to add API to set accuracy level of the latitude and longitude coordinates?
>
> If I understood your question correctly, no. This info is given from geoclue to app together with coordinates. Its accuracy of the location fix in meters. Currently its city-level at best. The app-writable 'DistanceThreshold' property is to specify the minimum distance changed before geoclue should notify your app.
Just for information you had this API for accuracy in geoclue: Level: accuracy_ get_details( ) can be used to get get the ACCURACY_ LEVEL_NONE = 0, ACCURACY_ LEVEL_COUNTRY, ACCURACY_ LEVEL_REGION, ACCURACY_ LEVEL_LOCALITY, ACCURACY_ LEVEL_POSTALCOD E, ACCURACY_ LEVEL_STREET, ACCURACY_ LEVEL_DETAILED, Level;
/**
* GeoclueAccuracy
*
* Enum values used to define the approximate accuracy of
* Position or Address information. These are ordered in
* from lowest accuracy possible to highest accuracy possible.
* geoclue_
* current accuracy. It is up to the provider to set the
* accuracy based on analysis of its queries.
**/
typedef enum {
GEOCLUE_
GEOCLUE_
GEOCLUE_
GEOCLUE_
GEOCLUE_
GEOCLUE_
GEOCLUE_
} GeoclueAccuracy
geoclue_ master_ client_ set_requirement s_*(, GeoclueAccuracy Level, ...); /developer. gnome.org/ geoclue/ unstable/ GeocluePosition .html#GeocluePo sitionCallback has timestamp which I guess
>
> > 2) Same about timestamps - there is no way to obtain them now.
>
> What kind of timestamps you need?
from the Geolocation spec: The length of time specified by the timeout property has elapsed before the implementation could successfully acquire a new Position.
in geoclue https:/
is abs time of acquiring the position. In geoclue2 I can calculate timestamps myself on LocationUpdated but it would be a bit in precise. But probably should be OK in most of the cases.
>
> > 3) I am going to use gdbus-codegen to generate wrapper for the API like they do it for Empathy. if you had client lib for the API it would be a bit easier but anyway I can live with the generated interface.
>
> Sure. I was kind hoping that Empathy guys meant contributing patches for these rather when they said "contribute". :)
>
> > 4) And last question for now :) where can I find geoclue2 ip location provider to try out my changes?
>
> You don't need to do anything other than to just install geoclue2 (in system prefix as that seems to be required of system dbus services) and run your app.