On Sun, 2011-04-17 at 17:49 +0200, Eckhart Wörner wrote:
> Hi everybody,
> 
> when I first encountered GeoClue some time ago, I immediately liked the idea 
> of 
> it. However, I was somehow never really satisfied with its design. Therefore, 
> in the last few days I tried to write down my vision of how its D-Bus API 
> should look like, and now present it here for discussion. I'll start with the 
> problems the old API has in my eyes, and then present a new API that 
> hopefully 
> overcomes these problems.
<snip>

This is the API I came up with. The GeoclueLocation would contain things
like the coordinates (X, Y, Z), timestamps, eventually speed, course or
heading if the hardware or service makes it available. The only required
fields are the long/lat, and all the other data is "as offered by the
device or service" (some web services also give you addresses, which
might be useful for some applications, we wouldn't want to drop that if
it were given).

Note that this does not include any APIs *just* for the compass,
altimeters or other pieces of equipment one might have.

Note that the split between Manager and Client is to avoid data from one
D-Bus client leaking into another.

Internally, the providers list would be handled by a single object.

Manager
-------

        Methods
        -------

        object path GetClientObject()
        Retrieves a client object, which will be used by the application

        Properties
        ----------
                gboolean Enabled
                whether geoclue is enabled at all 

Client
------

        Methods
        -------

        Start()
        Start receiving events about the current location

        Stop()
        Stop receiving events about the current location

        Properties
        ----------
                enum GeoclueAuthorisationStatus
                whether the application is allowed to connect to the
location service

                string Usage
                what the application is using Geoclue for 

                GeoclueLocation Location
                a complex type representing the last updated location

                int DistanceThreshold
                the minimum distance between notifications

                enum GeoclueAccuracy
                accuracy level requested by the application

        Signal
        ------

                LocationUpdated(GeoclueLocation old, GeoclueLocation
new)
                the new location


_______________________________________________
GeoClue mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/geoclue

Reply via email to