navit  0.5.3-trunk
binding_dbus.c File Reference
#include <string.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include "config.h"
#include "config_.h"
#include "navit.h"
#include "coord.h"
#include "point.h"
#include "plugin.h"
#include "debug.h"
#include "item.h"
#include "xmlconfig.h"
#include "attr.h"
#include "layout.h"
#include "navigation.h"
#include "command.h"
#include "callback.h"
#include "graphics.h"

Data Structures

struct  dbus_callback
 
struct  dbus_method
 

Macros

#define DBUS_API_SUBJECT_TO_CHANGE
 

Functions

static char * object_new (char *type, void *object)
 
static void * object_get (const char *path)
 
static void object_destroy (const char *path, void *object)
 
static void * resolve_object (const char *opath, char *type)
 
static void * object_get_from_message_arg (DBusMessageIter *iter, char *type)
 
static void * object_get_from_message (DBusMessage *message, char *type)
 
static enum attr_type attr_type_get_from_message (DBusMessageIter *iter)
 
static void encode_variant_string (DBusMessageIter *iter, char *str)
 
static void encode_dict_string_variant_string (DBusMessageIter *iter, char *key, char *value)
 
static int encode_attr (DBusMessageIter *iter1, struct attr *attr)
 
static DBusHandlerResult empty_reply (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error (DBusConnection *connection, DBusMessage *message, char *error, char *msg)
 
static DBusHandlerResult dbus_error_invalid_attr_type (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error_invalid_parameter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error_invalid_object_path (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error_invalid_object_path_parameter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error_navigation_not_configured (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error_traffic_not_configured (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult dbus_error_no_data_available (DBusConnection *connection, DBusMessage *message)
 
static void dbus_dump_iter (char *prefix, DBusMessageIter *iter)
 
static void dbus_dump (DBusMessage *message)
 
static int pcoord_get_from_message (DBusMessage *message, DBusMessageIter *iter, struct pcoord *pc)
 
static void pcoord_encode (DBusMessageIter *iter, struct pcoord *pc)
 
static enum attr_type decode_attr_type_from_iter (DBusMessageIter *iter)
 
static int decode_attr_from_iter (DBusMessageIter *iter, struct attr *attr)
 
static int decode_attr (DBusMessage *message, struct attr *attr)
 
static void destroy_attr (struct attr *attr)
 
static char * get_iter_name (char *type)
 
static DBusHandlerResult request_attr_iter (DBusConnection *connection, DBusMessage *message, char *type, struct attr_iter *(*func)(void *))
 
static DBusHandlerResult request_attr_iter_destroy (DBusConnection *connection, DBusMessage *message, char *type, void(*func)(struct attr_iter *))
 
static DBusHandlerResult request_destroy (DBusConnection *connection, DBusMessage *message, char *type, void *data, void(*func)(void *))
 
static DBusHandlerResult request_dup (DBusConnection *connection, DBusMessage *message, char *type, void *data, void *(*func)(void *))
 
static DBusHandlerResult request_get_attr (DBusConnection *connection, DBusMessage *message, char *type, void *data, int(*func)(void *data, enum attr_type type, struct attr *attr, struct attr_iter *iter))
 
static DBusHandlerResult request_command (DBusConnection *connection, DBusMessage *message, char *type, void *data, int(*func)(void *data, enum attr_type type, struct attr *attr, struct attr_iter *iter))
 
static DBusHandlerResult request_set_add_remove_attr (DBusConnection *connection, DBusMessage *message, char *type, void *data, int(*func)(void *data, struct attr *attr))
 
static void dbus_callback_emit_signal (struct dbus_callback *dbus_callback)
 
static void request_callback_destroy_do (struct dbus_callback *data)
 
static DBusHandlerResult request_callback_destroy (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_callback_new (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_config_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_config_attr_iter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_config_attr_iter_destroy (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_graphics_get_data (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_gui_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_gui_command (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_graphics_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_layout_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_map_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_map_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_map_dump (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_mapset_attr_iter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_mapset_attr_iter_destroy (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_mapset_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navigation_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_osd_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_osd_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_roadprofile_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_roadprofile_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_roadprofile_attr_iter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_roadprofile_attr_iter_destroy (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_route_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_route_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_route_add_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_route_remove_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_route_destroy (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_route_dup (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_draw (DBusConnection *connection, DBusMessage *message)
 
static int point_get_from_message (DBusMessage *message, DBusMessageIter *iter, struct point *p)
 
static DBusHandlerResult request_navit_add_message (DBusConnection *connection, DBusMessage *message)
 Shows up a message. More...
 
static DBusHandlerResult request_navit_set_center (DBusConnection *connection, DBusMessage *message)
 Centers the screen on a specified position pc on the world. More...
 
static DBusHandlerResult request_navit_set_center_screen (DBusConnection *connection, DBusMessage *message)
 Centers the screen on a specified position p shown on the screen. More...
 
static DBusHandlerResult request_navit_set_layout (DBusConnection *connection, DBusMessage *message)
 Sets the layout to new_layout_name extracted from message. More...
 
static DBusHandlerResult request_navit_quit (DBusConnection *connection, DBusMessage *message)
 Gracefully exit Navit by registering a one-second callback to allow clean shutdown of the dbus connection. More...
 
static DBusHandlerResult request_navit_traffic_export_gpx (DBusConnection *connection, DBusMessage *message)
 Exports currently active traffic distortions as a GPX file. More...
 
static DBusHandlerResult request_navit_traffic_inject (DBusConnection *connection, DBusMessage *message)
 Injects a traffic feed. More...
 
static DBusHandlerResult request_navit_zoom (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_zoom_to_route (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_route_export_gpx (DBusConnection *connection, DBusMessage *message)
 Exports the current route as a GPX file. More...
 
static DBusHandlerResult request_navit_route_export_geojson (DBusConnection *connection, DBusMessage *message)
 Exports the current route as a GeoJSON file. More...
 
static DBusHandlerResult request_navit_block (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_resize (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_attr_iter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_attr_iter_destroy (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_add_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_remove_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_set_position (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_set_destination (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_clear_destination (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_navit_evaluate (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_search_list_destroy (DBusConnection *connection, DBusMessage *message)
 
static void request_search_list_common (struct search_list_common *slc, DBusMessageIter *iter4)
 
static DBusHandlerResult request_search_list_get_result (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_search_list_new (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_search_list_search (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_search_list_select (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_tracking_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_vehicle_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_vehicleprofile_get_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_vehicleprofile_set_attr (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_vehicleprofile_attr_iter (DBusConnection *connection, DBusMessage *message)
 
static DBusHandlerResult request_vehicleprofile_attr_iter_destroy (DBusConnection *connection, DBusMessage *message)
 
static char * introspect_path (const char *object)
 
static char * generate_navitintrospectxml (const char *object)
 
static DBusHandlerResult navit_handler_func (DBusConnection *connection, DBusMessage *message, void *user_data)
 
DBusHandlerResult filter (DBusConnection *connection, DBusMessage *message, void *user_data)
 
static int dbus_cmd_send_signal (struct navit *navit, char *command, struct attr **in, struct attr ***out)
 
static void dbus_main_navit (struct navit *navit, int added)
 
void plugin_init (void)
 

Variables

static DBusConnection * connection
 
static dbus_uint32_t dbus_serial
 
static char * service_name = "org.navit_project.navit"
 
static char * object_path = "/org/navit_project/navit"
 
char * navitintrospectxml_head1
 
char * navitintrospectxml_head2
 
GHashTable * object_hash
 
GHashTable * object_hash_rev
 
GHashTable * object_count
 
struct dbus_method dbus_methods []
 
static DBusObjectPathVTable dbus_navit_vtable
 
static struct command_table commands []
 

Macro Definition Documentation

◆ DBUS_API_SUBJECT_TO_CHANGE

#define DBUS_API_SUBJECT_TO_CHANGE

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Function Documentation

◆ attr_type_get_from_message()

static enum attr_type attr_type_get_from_message ( DBusMessageIter *  iter)
static

References resolve_object(), and type.

Referenced by request_callback_new(), and request_get_attr().

◆ dbus_callback_emit_signal()

static void dbus_callback_emit_signal ( struct dbus_callback dbus_callback)
static

◆ dbus_cmd_send_signal()

static int dbus_cmd_send_signal ( struct navit navit,
char *  command,
struct attr **  in,
struct attr ***  out 
)
static

◆ dbus_dump()

static void dbus_dump ( DBusMessage *  message)
static

References dbus_dump_iter().

◆ dbus_dump_iter()

static void dbus_dump_iter ( char *  prefix,
DBusMessageIter *  iter 
)
static

References dbg, and lvl_debug.

Referenced by dbus_dump().

◆ dbus_error()

◆ dbus_error_invalid_attr_type()

static DBusHandlerResult dbus_error_invalid_attr_type ( DBusConnection *  connection,
DBusMessage *  message 
)
static

References connection, and dbus_error().

Referenced by request_get_attr().

◆ dbus_error_invalid_object_path()

◆ dbus_error_invalid_object_path_parameter()

static DBusHandlerResult dbus_error_invalid_object_path_parameter ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ dbus_error_invalid_parameter()

◆ dbus_error_navigation_not_configured()

static DBusHandlerResult dbus_error_navigation_not_configured ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ dbus_error_no_data_available()

static DBusHandlerResult dbus_error_no_data_available ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ dbus_error_traffic_not_configured()

static DBusHandlerResult dbus_error_traffic_not_configured ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ dbus_main_navit()

static void dbus_main_navit ( struct navit navit,
int  added 
)
static

◆ decode_attr()

static int decode_attr ( DBusMessage *  message,
struct attr attr 
)
static

◆ decode_attr_from_iter()

◆ decode_attr_type_from_iter()

static enum attr_type decode_attr_type_from_iter ( DBusMessageIter *  iter)
static

◆ destroy_attr()

static void destroy_attr ( struct attr attr)
static

◆ empty_reply()

◆ encode_attr()

static int encode_attr ( DBusMessageIter *  iter1,
struct attr attr 
)
static

◆ encode_dict_string_variant_string()

static void encode_dict_string_variant_string ( DBusMessageIter *  iter,
char *  key,
char *  value 
)
static

◆ encode_variant_string()

static void encode_variant_string ( DBusMessageIter *  iter,
char *  str 
)
static

◆ filter()

DBusHandlerResult filter ( DBusConnection *  connection,
DBusMessage *  message,
void *  user_data 
)

References dbg, and lvl_debug.

◆ generate_navitintrospectxml()

static char* generate_navitintrospectxml ( const char *  object)
static

◆ get_iter_name()

static char* get_iter_name ( char *  type)
static

◆ introspect_path()

static char* introspect_path ( const char *  object)
static

References dbg, lvl_debug, and object_path.

Referenced by generate_navitintrospectxml().

◆ navit_handler_func()

static DBusHandlerResult navit_handler_func ( DBusConnection *  connection,
DBusMessage *  message,
void *  user_data 
)
static

◆ object_destroy()

static void object_destroy ( const char *  path,
void *  object 
)
static

◆ object_get()

static void* object_get ( const char *  path)
static

References object_hash.

Referenced by decode_attr_from_iter(), and resolve_object().

◆ object_get_from_message()

◆ object_get_from_message_arg()

static void* object_get_from_message_arg ( DBusMessageIter *  iter,
char *  type 
)
static

◆ object_new()

◆ pcoord_encode()

static void pcoord_encode ( DBusMessageIter *  iter,
struct pcoord pc 
)
static

◆ pcoord_get_from_message()

static int pcoord_get_from_message ( DBusMessage *  message,
DBusMessageIter *  iter,
struct pcoord pc 
)
static

Extracts a struct pcoord from a DBus message

Parameters
messageThe DBus message
iterSort of pointer that points on that (iii)-object in the message
pcPointer where the data should get stored
Returns
Returns 1 when everything went right, otherwise 0

References pcoord_parse(), pcoord::pro, projection_mg, pcoord::x, and pcoord::y.

Referenced by request_navit_set_center(), request_navit_set_destination(), and request_navit_set_position().

◆ plugin_init()

◆ point_get_from_message()

static int point_get_from_message ( DBusMessage *  message,
DBusMessageIter *  iter,
struct point p 
)
static

Extracts a struct point from a DBus message

Parameters
messageThe DBus message
iterSort of pointer that points on that (ii)-object in the message
pPointer where the data should get stored
Returns
Returns 1 when everything went right, otherwise 0

References dbg, lvl_debug, and p.

Referenced by request_navit_route_export_geojson(), request_navit_set_center_screen(), and request_navit_zoom().

◆ request_attr_iter()

static DBusHandlerResult request_attr_iter ( DBusConnection *  connection,
DBusMessage *  message,
char *  type,
struct attr_iter *(*)(void *)  func 
)
static

◆ request_attr_iter_destroy()

static DBusHandlerResult request_attr_iter_destroy ( DBusConnection *  connection,
DBusMessage *  message,
char *  type,
void(*)(struct attr_iter *)  func 
)
static

◆ request_callback_destroy()

static DBusHandlerResult request_callback_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_callback_destroy_do()

static void request_callback_destroy_do ( struct dbus_callback data)
static

References callback_destroy(), and data.

Referenced by request_callback_destroy().

◆ request_callback_new()

static DBusHandlerResult request_callback_new ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_command()

static DBusHandlerResult request_command ( DBusConnection *  connection,
DBusMessage *  message,
char *  type,
void *  data,
int(*)(void *data, enum attr_type type, struct attr *attr, struct attr_iter *iter)  func 
)
static

◆ request_config_attr_iter()

static DBusHandlerResult request_config_attr_iter ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_config_attr_iter_destroy()

static DBusHandlerResult request_config_attr_iter_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_config_get_attr()

static DBusHandlerResult request_config_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_destroy()

static DBusHandlerResult request_destroy ( DBusConnection *  connection,
DBusMessage *  message,
char *  type,
void *  data,
void(*)(void *)  func 
)
static

◆ request_dup()

static DBusHandlerResult request_dup ( DBusConnection *  connection,
DBusMessage *  message,
char *  type,
void *  data,
void *(*)(void *)  func 
)
static

◆ request_get_attr()

◆ request_graphics_get_data()

static DBusHandlerResult request_graphics_get_data ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_graphics_set_attr()

static DBusHandlerResult request_graphics_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_gui_command()

static DBusHandlerResult request_gui_command ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_gui_get_attr()

static DBusHandlerResult request_gui_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_layout_get_attr()

static DBusHandlerResult request_layout_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_map_dump()

static DBusHandlerResult request_map_dump ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_map_get_attr()

static DBusHandlerResult request_map_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_map_set_attr()

static DBusHandlerResult request_map_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_mapset_attr_iter()

static DBusHandlerResult request_mapset_attr_iter ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_mapset_attr_iter_destroy()

static DBusHandlerResult request_mapset_attr_iter_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_mapset_get_attr()

static DBusHandlerResult request_mapset_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navigation_get_attr()

static DBusHandlerResult request_navigation_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_add_attr()

static DBusHandlerResult request_navit_add_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_add_message()

static DBusHandlerResult request_navit_add_message ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Shows up a message.

Parameters
connectionThe DBusConnection object through which message arrived
messageThe DBusMessage containing the coordinates
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References connection, dbus_error_invalid_object_path(), empty_reply(), eval::navit, navit_add_message(), and object_get_from_message().

◆ request_navit_attr_iter()

static DBusHandlerResult request_navit_attr_iter ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_attr_iter_destroy()

static DBusHandlerResult request_navit_attr_iter_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_block()

static DBusHandlerResult request_navit_block ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_clear_destination()

static DBusHandlerResult request_navit_clear_destination ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_draw()

static DBusHandlerResult request_navit_draw ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_evaluate()

static DBusHandlerResult request_navit_evaluate ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_get_attr()

static DBusHandlerResult request_navit_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_quit()

static DBusHandlerResult request_navit_quit ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Gracefully exit Navit by registering a one-second callback to allow clean shutdown of the dbus connection.

Parameters
connectionThe DBusConnection object through which message arrived
messageThe DBusMessage
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References callback_cast, callback_new_1, config_remove_attr(), connection, dbg, dbus_error_invalid_object_path(), empty_reply(), event_add_timeout(), event_main_loop_quit(), lvl_debug, and object_get_from_message().

◆ request_navit_remove_attr()

static DBusHandlerResult request_navit_remove_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_resize()

static DBusHandlerResult request_navit_resize ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_route_export_geojson()

static DBusHandlerResult request_navit_route_export_geojson ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Exports the current route as a GeoJSON file.

Parameters
connectionThe DBusConnection object through which a message arrived
messageThe DBusMessage including the 'filename' parameter
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References c, connection, dbg, dbus_error(), dbus_error_invalid_object_path(), dbus_error_invalid_parameter(), dbus_error_navigation_not_configured(), empty_reply(), filename, g_strconcat_printf(), item_attr_get(), item_coord_get(), coord_geo::lat, coord_geo::lng, lvl_debug, item::map, map_convert_string_tmp(), map_rect_get_item(), map_rect_new(), navigation_get_map(), eval::navit, navit_get_navigation(), object_get_from_message(), p, point_get_from_message(), projection_mg, attr::str, transform_to_geo(), and attr::u.

◆ request_navit_route_export_gpx()

static DBusHandlerResult request_navit_route_export_gpx ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Exports the current route as a GPX file.

Parameters
connectionThe DBusConnection object through which a message arrived
messageThe DBusMessage including the filename parameter
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References c, connection, dbg, dbus_error(), dbus_error_invalid_object_path(), dbus_error_navigation_not_configured(), empty_reply(), filename, item_attr_get(), item_coord_get(), item_to_name(), coord_geo::lat, coord_geo::lng, lvl_debug, item::map, map_convert_string_tmp(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), navigation_get_map(), eval::navit, navit_get_navigation(), object_get_from_message(), projection_mg, attr::str, transform_to_geo(), item::type, and attr::u.

◆ request_navit_set_attr()

static DBusHandlerResult request_navit_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_set_center()

static DBusHandlerResult request_navit_set_center ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Centers the screen on a specified position pc on the world.

Parameters
connectionThe DBusConnection object through which message arrived
messageThe DBusMessage containing the coordinates
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References connection, dbus_error_invalid_object_path(), dbus_error_invalid_parameter(), empty_reply(), eval::navit, navit_set_center(), object_get_from_message(), and pcoord_get_from_message().

◆ request_navit_set_center_screen()

static DBusHandlerResult request_navit_set_center_screen ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Centers the screen on a specified position p shown on the screen.

Parameters
connectionThe DBusConnection object through which message arrived
messageThe DBusMessage containing the x and y value
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References connection, dbus_error_invalid_object_path(), dbus_error_invalid_parameter(), empty_reply(), eval::navit, navit_set_center_screen(), object_get_from_message(), p, and point_get_from_message().

◆ request_navit_set_destination()

static DBusHandlerResult request_navit_set_destination ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_set_layout()

static DBusHandlerResult request_navit_set_layout ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Sets the layout to new_layout_name extracted from message.

Parameters
connectionThe DBusConnection object through which message arrived
messageThe DBusMessage containing the name of the layout
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References connection, dbus_error_invalid_object_path(), dbus_error_invalid_parameter(), empty_reply(), attr_iter::iter, attr::layout, layout::name, eval::navit, navit_attr_iter_new(), navit_get_attr(), navit_set_attr(), object_get_from_message(), and attr::u.

◆ request_navit_set_position()

static DBusHandlerResult request_navit_set_position ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_traffic_export_gpx()

static DBusHandlerResult request_navit_traffic_export_gpx ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Exports currently active traffic distortions as a GPX file.

Parameters
connectionThe DBusConnection object through which a message arrived
messageThe DBusMessage including the filename parameter
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References AF_ONEWAY, AF_ONEWAYREV, c, connection, traffic_point::coord, dbg, dbus_error(), dbus_error_invalid_object_path(), dbus_error_traffic_not_configured(), empty_reply(), filename, item_attr_get(), item_attr_rewind(), item_coord_get(), item_coord_rewind(), coord_geo::lat, coord_geo::lng, lvl_debug, eval::navit, navit_attr_iter_destroy(), navit_attr_iter_new(), navit_get_attr(), attr::navit_object, attr::num, object_get_from_message(), projection_mg, traffic_get_stored_messages(), traffic_message_get_items(), transform_to_geo(), attr::u, coord::x, pcoord::x, coord::y, and pcoord::y.

◆ request_navit_traffic_inject()

static DBusHandlerResult request_navit_traffic_inject ( DBusConnection *  connection,
DBusMessage *  message 
)
static

Injects a traffic feed.

Parameters
connectionThe DBusConnection object through which a message arrived
messageThe DBusMessage including the filename parameter
Returns
An empty reply if everything went right, otherwise DBUS_HANDLER_RESULT_NOT_YET_HANDLED

References connection, dbg, dbus_error_invalid_object_path(), dbus_error_traffic_not_configured(), empty_reply(), filename, lvl_debug, eval::navit, navit_attr_iter_destroy(), navit_attr_iter_new(), navit_get_attr(), attr::navit_object, object_get_from_message(), traffic_get_messages_from_xml_file(), traffic_process_messages(), and attr::u.

◆ request_navit_zoom()

static DBusHandlerResult request_navit_zoom ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_navit_zoom_to_route()

static DBusHandlerResult request_navit_zoom_to_route ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_osd_get_attr()

static DBusHandlerResult request_osd_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_osd_set_attr()

static DBusHandlerResult request_osd_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_roadprofile_attr_iter()

static DBusHandlerResult request_roadprofile_attr_iter ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_roadprofile_attr_iter_destroy()

static DBusHandlerResult request_roadprofile_attr_iter_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_roadprofile_get_attr()

static DBusHandlerResult request_roadprofile_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_roadprofile_set_attr()

static DBusHandlerResult request_roadprofile_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_route_add_attr()

static DBusHandlerResult request_route_add_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_route_destroy()

static DBusHandlerResult request_route_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_route_dup()

static DBusHandlerResult request_route_dup ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_route_get_attr()

static DBusHandlerResult request_route_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_route_remove_attr()

static DBusHandlerResult request_route_remove_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_route_set_attr()

static DBusHandlerResult request_route_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_search_list_common()

static void request_search_list_common ( struct search_list_common slc,
DBusMessageIter *  iter4 
)
static

◆ request_search_list_destroy()

static DBusHandlerResult request_search_list_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_search_list_get_result()

◆ request_search_list_new()

static DBusHandlerResult request_search_list_new ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_search_list_search()

static DBusHandlerResult request_search_list_search ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_search_list_select()

static DBusHandlerResult request_search_list_select ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_set_add_remove_attr()

◆ request_tracking_get_attr()

static DBusHandlerResult request_tracking_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_vehicle_set_attr()

static DBusHandlerResult request_vehicle_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_vehicleprofile_attr_iter()

static DBusHandlerResult request_vehicleprofile_attr_iter ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_vehicleprofile_attr_iter_destroy()

static DBusHandlerResult request_vehicleprofile_attr_iter_destroy ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_vehicleprofile_get_attr()

static DBusHandlerResult request_vehicleprofile_get_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ request_vehicleprofile_set_attr()

static DBusHandlerResult request_vehicleprofile_set_attr ( DBusConnection *  connection,
DBusMessage *  message 
)
static

◆ resolve_object()

Variable Documentation

◆ commands

struct command_table commands[]
static
Initial value:
= {
{"dbus_send_signal",command_cast(dbus_cmd_send_signal)},
}
static int dbus_cmd_send_signal(struct navit *navit, char *command, struct attr **in, struct attr ***out)
Definition: binding_dbus.c:2183
#define command_cast(x)
Definition: command.h:32

Referenced by dbus_main_navit().

◆ connection

DBusConnection* connection
static

Referenced by dbus_callback_emit_signal(), dbus_error(), dbus_error_invalid_attr_type(), dbus_error_invalid_object_path(), dbus_error_invalid_object_path_parameter(), dbus_error_invalid_parameter(), dbus_error_navigation_not_configured(), dbus_error_no_data_available(), dbus_error_traffic_not_configured(), dbus_main_navit(), empty_reply(), navit_handler_func(), plugin_init(), request_attr_iter(), request_attr_iter_destroy(), request_callback_destroy(), request_callback_new(), request_command(), request_config_attr_iter(), request_config_attr_iter_destroy(), request_config_get_attr(), request_destroy(), request_dup(), request_get_attr(), request_graphics_get_data(), request_graphics_set_attr(), request_gui_command(), request_gui_get_attr(), request_layout_get_attr(), request_map_dump(), request_map_get_attr(), request_map_set_attr(), request_mapset_attr_iter(), request_mapset_attr_iter_destroy(), request_mapset_get_attr(), request_navigation_get_attr(), request_navit_add_attr(), request_navit_add_message(), request_navit_attr_iter(), request_navit_attr_iter_destroy(), request_navit_block(), request_navit_clear_destination(), request_navit_draw(), request_navit_evaluate(), request_navit_get_attr(), request_navit_quit(), request_navit_remove_attr(), request_navit_resize(), request_navit_route_export_geojson(), request_navit_route_export_gpx(), request_navit_set_attr(), request_navit_set_center(), request_navit_set_center_screen(), request_navit_set_destination(), request_navit_set_layout(), request_navit_set_position(), request_navit_traffic_export_gpx(), request_navit_traffic_inject(), request_navit_zoom(), request_navit_zoom_to_route(), request_osd_get_attr(), request_osd_set_attr(), request_roadprofile_attr_iter(), request_roadprofile_attr_iter_destroy(), request_roadprofile_get_attr(), request_roadprofile_set_attr(), request_route_add_attr(), request_route_destroy(), request_route_dup(), request_route_get_attr(), request_route_remove_attr(), request_route_set_attr(), request_search_list_destroy(), request_search_list_get_result(), request_search_list_new(), request_search_list_search(), request_search_list_select(), request_set_add_remove_attr(), request_tracking_get_attr(), request_vehicle_set_attr(), request_vehicleprofile_attr_iter(), request_vehicleprofile_attr_iter_destroy(), request_vehicleprofile_get_attr(), and request_vehicleprofile_set_attr().

◆ dbus_methods

struct dbus_method dbus_methods[]

◆ dbus_navit_vtable

DBusObjectPathVTable dbus_navit_vtable
static
Initial value:
= {
NULL,
NULL
}
static DBusHandlerResult navit_handler_func(DBusConnection *connection, DBusMessage *message, void *user_data)
Definition: binding_dbus.c:2133

Referenced by plugin_init().

◆ dbus_serial

dbus_uint32_t dbus_serial
static

◆ navitintrospectxml_head1

char* navitintrospectxml_head1
Initial value:
= "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n"
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
"<node name=\""

Referenced by generate_navitintrospectxml().

◆ navitintrospectxml_head2

char* navitintrospectxml_head2
Initial value:
= "\">\n"
" <interface name=\"org.freedesktop.DBus.Introspectable\">\n"
" <method name=\"Introspect\">\n"
" <arg direction=\"out\" type=\"s\" />\n"
" </method>\n"
" </interface>\n"

Referenced by generate_navitintrospectxml().

◆ object_count

GHashTable* object_count

Referenced by object_new(), and plugin_init().

◆ object_hash

GHashTable* object_hash

◆ object_hash_rev

GHashTable* object_hash_rev

◆ object_path

char* object_path = "/org/navit_project/navit"
static

◆ service_name

char* service_name = "org.navit_project.navit"
static