Difference between revisions of "Dbus"

From Navit's Wiki
Jump to: navigation, search
Line 1: Line 1:
 
This Document displays the requirements and implementation details of the navit dbus interface.
 
This Document displays the requirements and implementation details of the navit dbus interface.
  
=Navit Dbus details:=
+
=Navit DBus details:=
 
DBUS Service: "org.navit_project.navit" <br>
 
DBUS Service: "org.navit_project.navit" <br>
DBUS Object Path: "/org/navit_project/navit" <br>
 
DBUS Interface: "org.navit_project.navit.navit" <br>
 
 
DBUS Bus: Session bus
 
DBUS Bus: Session bus
  
=Navit Dbus Methods:=
+
=org.navit_project.navit:=
==Set destination==
+
DBUS Object Path: /org/navit_project/navit
 +
 
 +
==Methods:==
 +
===iter===
 +
===destroy_iter===
 +
===get_navit===
 +
returns an instance of navit
 +
 
 +
Name: get_navit <br>
 +
Args: Object path returned from the iter() call <br>
 +
Returns: Object path representing an instance of a running navit. <br>
 +
 
 +
=org.navit_project.navit.navit:=
 +
DBUS Object Path: /org/navit_project/navit/navit/[]
 +
 
 +
==Methods:==
 +
===Set destination===
 
Sets the destination. coord is a string containing the coordinates in a special format. pro contains the map projection while x and y define the position. descr is a description for the target
 
Sets the destination. coord is a string containing the coordinates in a special format. pro contains the map projection while x and y define the position. descr is a description for the target
  
Line 24: Line 38:
 
Returns: (none) <br>
 
Returns: (none) <br>
  
==Zoom==
+
===Zoom===
 
Zooms into the map if f is positive, otherwise it zooms out. f is the zoom factor and has to be bigger than 1 or smaller than -1. Values between 1 and -1 have no effect. In addition, x and y can be set to zoom into a special point on the screen.
 
Zooms into the map if f is positive, otherwise it zooms out. f is the zoom factor and has to be bigger than 1 or smaller than -1. Values between 1 and -1 have no effect. In addition, x and y can be set to zoom into a special point on the screen.
  
Line 31: Line 45:
 
Returns: (none)
 
Returns: (none)
  
==Set position==
+
===Set position===
 
Sets the current position. See [[#Set destination|Set destination]].
 
Sets the current position. See [[#Set destination|Set destination]].
  
Line 40: Line 54:
 
Returns: (none) <br>
 
Returns: (none) <br>
  
==Center map (coordinates)==
+
===Center map (coordinates)===
 
Centers the view to a absolute position on the map. Useful when looking up for some coordinates (e.g. for bookmarks). See [[#Set destination|Set destination]].  
 
Centers the view to a absolute position on the map. Useful when looking up for some coordinates (e.g. for bookmarks). See [[#Set destination|Set destination]].  
  
Line 49: Line 63:
 
Returns: (none) <br>
 
Returns: (none) <br>
  
==Center map (pixel)==
+
===Center map (pixel)===
 
Centers the map to a specific position on the screen. x and y contain the pixel coordinates on the current map section starting from the upper left.
 
Centers the map to a specific position on the screen. x and y contain the pixel coordinates on the current map section starting from the upper left.
  
Line 56: Line 70:
 
Returns: (none) <br>
 
Returns: (none) <br>
  
==Set layout==
+
===Set layout===
 
Sets the map layout
 
Sets the map layout
  
Line 63: Line 77:
 
Returns: (none)<br>
 
Returns: (none)<br>
  
==Add message==
+
===Add message===
 
Adds a message to the [[OSD|messages label]].
 
Adds a message to the [[OSD|messages label]].
  
Line 70: Line 84:
 
Returns: (none)<br>
 
Returns: (none)<br>
  
==Redraw==
+
===Redraw===
 
Forces a redraw of the current map section
 
Forces a redraw of the current map section
  
Line 76: Line 90:
 
Args: (none)<br>
 
Args: (none)<br>
 
Return: (none)<br>
 
Return: (none)<br>
 
<!--==Getting current position (in coordinates)==
 
Not Implemented
 
 
Name: getCurrentPosition<br>
 
Args: (none)<br>
 
Returns: coordinate (string)<br>
 
 
==Getting current speed (in kph/mph/fps)==
 
Not Implemented
 
 
Name: getCurrentSpeed<br>
 
Args: (none)<br>
 
Returns: speed in kph/mph<br>-->
 
  
 
[[category: navit dbus]]
 
[[category: navit dbus]]

Revision as of 11:46, 24 March 2009

This Document displays the requirements and implementation details of the navit dbus interface.

Navit DBus details:

DBUS Service: "org.navit_project.navit"
DBUS Bus: Session bus

org.navit_project.navit:

DBUS Object Path: /org/navit_project/navit

Methods:

iter

destroy_iter

get_navit

returns an instance of navit

Name: get_navit
Args: Object path returned from the iter() call
Returns: Object path representing an instance of a running navit.

org.navit_project.navit.navit:

DBUS Object Path: /org/navit_project/navit/navit/[]

Methods:

Set destination

Sets the destination. coord is a string containing the coordinates in a special format. pro contains the map projection while x and y define the position. descr is a description for the target

coord can be formatted like this:

[Proj:]-0xX [-]0xX
 - where Proj can be mg/garmin, defaults to mg
[Proj:][D][D]Dmm.ss[S][S] N/S [D][D]DMM.ss[S][S]... E/W
[Proj:][-][D]D.d[d]... [-][D][D]D.d[d]
 - where Proj can be geo

Name: set_destination
Args: string coord, string descr
Args: (int pro, string coord), string descr
Args: (int pro, int x, int y), string descr
Returns: (none)

Zoom

Zooms into the map if f is positive, otherwise it zooms out. f is the zoom factor and has to be bigger than 1 or smaller than -1. Values between 1 and -1 have no effect. In addition, x and y can be set to zoom into a special point on the screen.

Name: zoom
Args: int f[, (int x, int y)]
Returns: (none)

Set position

Sets the current position. See Set destination.

Name: set_destination
Args: string coord
Args: (int pro, string coord)
Args: (int pro, int x, int y)
Returns: (none)

Center map (coordinates)

Centers the view to a absolute position on the map. Useful when looking up for some coordinates (e.g. for bookmarks). See Set destination.

Name: set_center
Args: string coord
Args: (int pro, string coord)
Args: (int pro, int x, int y)
Returns: (none)

Center map (pixel)

Centers the map to a specific position on the screen. x and y contain the pixel coordinates on the current map section starting from the upper left.

Name: set_center
Args: (int x, int y)
Returns: (none)

Set layout

Sets the map layout

Name: set_layout
Args: string layout_name
Returns: (none)

Add message

Adds a message to the messages label.

Name: add_message
Args: string message
Returns: (none)

Redraw

Forces a redraw of the current map section

Name: draw
Args: (none)
Return: (none)