om-locations (tangoGPS?) dbus routes

Chia-I Wu olv at
Tue Sep 16 18:41:10 CEST 2008

On Mon, Sep 15, 2008 at 08:15:17PM +0200, Simon Kagstrom wrote:
> First a general question: Where can I find the dbus API for
> om-locations/diversity-nav?

> Then a request. I've tried to browse the source code to understand what
> is exported, and one thing I'd like which I don't *think* is available
> is the ability to record paths, i.e., something like
>    org.openmoko.Diversity.Path
>    methods:
>    NewPath -> object handle
>    StartRecording(obj)
>    StopRecording(obj)
>    AddSymbol(obj, sym) -> Add a symbol (small icon, png) to the path
>                           (current location)
>    AddNote(obj, text) -> Add text to the path (current location)
>    Display(obj) -> Display the path on the map
> The usage pattern I'm after is for external programs that also use the
> GPS to be able to record paths and add interesting tags and notes to
> them.
Sound like a good idea.  Some quick thoughts on the API:

In the org.openmoko.Diversity.World interface, two new methods are

	TrackAdd(void) -> objpath
	TrackRemove(objpath) -> void

These functions add/remove a new diversity object, DiversityTrack, in
the world, which in turn implements org.openmoko.Diversity.Track

        (signal)PointAdded -> int, double, double
        (signal)PointRemoved -> int
	AddPoint(int, double, double) -> void
	PrependPoint(double, double) -> void
	AppendPoint(double, double) -> void
        GetPoint(int) -> double, double
        ListPoints(void) -> array of double, double
	AttachData(int, variant) -> void
        GetData(int) -> variant
	Track(objpath) -> void

Points are an array of (longitude, latitude).  They are accessed by
their indices in the array.  What is interesting in this interface is
the Track method and the two signals.  The Track method takes an objpath
as its argument and asks DiversityTrack to monitor the object accociated
with the objpath.  By monitoring Self (current location), DiversityTrack
would start recording the locations and the recorded locations will be
sent to those who interest.

This is basically the needed methods for recording tracks and showing
them in Locations.  I would like to take a further look at it :)


More information about the devel mailing list