navit  0.5.3-trunk
vehicle_gypsy.c File Reference
#include <config.h>
#include <gypsy/gypsy-device.h>
#include <gypsy/gypsy-control.h>
#include <gypsy/gypsy-course.h>
#include <gypsy/gypsy-position.h>
#include <gypsy/gypsy-satellite.h>
#include <string.h>
#include <glib.h>
#include <math.h>
#include "debug.h"
#include "callback.h"
#include "plugin.h"
#include "coord.h"
#include "item.h"
#include "vehicle.h"

Data Structures

struct  vehicle_priv
 

Macros

#define DEFAULT_RETRY_INTERVAL   10
 
#define MIN_RETRY_INTERVAL   1
 

Functions

static void vehicle_gypsy_fixstatus_changed (GypsyDevice *device, gint fixstatus, gpointer userdata)
 When the fixstatus has changed, this function get called. More...
 
static void vehicle_gypsy_position_changed (GypsyPosition *position, GypsyPositionFields fields_set, int timestamp, double latitude, double longitude, double altitude, gpointer userdata)
 When the position has changed, this function get called. More...
 
static void vehicle_gypsy_satellite_changed (GypsySatellite *satellite, GPtrArray *satellites, gpointer userdata)
 Everytime any Sat-Details are changed, this function get called. More...
 
static void vehicle_gypsy_course_changed (GypsyCourse *course, GypsyCourseFields fields, int timestamp, double speed, double direction, double climb, gpointer userdata)
 When the course or speed has changed, this function get called. More...
 
static gboolean vehicle_gypsy_try_open (gpointer *data)
 Attempt to open the gypsy device. More...
 
static void vehicle_gypsy_open (struct vehicle_priv *priv)
 Open a connection to gypsy. Will re-try the connection if it fails. More...
 
static void vehicle_gypsy_close (struct vehicle_priv *priv)
 Stop retry timer; Free alloced memory. More...
 
static void vehicle_gypsy_destroy (struct vehicle_priv *priv)
 Free the gypsy_vehicle. More...
 
static int vehicle_gypsy_position_attr_get (struct vehicle_priv *priv, enum attr_type type, struct attr *attr)
 Provide the outside with information. More...
 
static struct vehicle_privvehicle_gypsy_new_gypsy (struct vehicle_methods *meth, struct callback_list *cbl, struct attr **attrs)
 Create gypsy_vehicle. More...
 
void plugin_init (void)
 register vehicle_geoclue More...
 

Variables

static struct vehicle_privvehicle_last
 
struct vehicle_methods vehicle_gypsy_methods