navit 0.5.3-trunk
Loading...
Searching...
No Matches
vehicle_wince.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <glib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <math.h>
#include "config.h"
#include "debug.h"
#include "callback.h"
#include "plugin.h"
#include "coord.h"
#include "item.h"
#include "event.h"
#include "vehicle.h"
#include <windows.h>
#include <windowsx.h>
#include <io.h>
#include <winioctl.h>
#include <winbase.h>
#include <wchar.h>

Data Structures

struct  gps_sat
 
struct  vehicle_priv
 

Macros

#define SwitchToThread()   Sleep(0)
 
#define W2A(lpw)
 
#define A2W(lpa)
 
#define IOCTL_SERVICE_REFRESH   0x4100000C
 
#define IOCTL_SERVICE_START   0x41000004
 

Typedefs

typedef int(WINAPI * PFN_BthSetMode) (DWORD pBthMode)
 
typedef int(WINAPI * PFN_BthGetMode) (DWORD *pBthMode)
 

Enumerations

enum  file_type { file_type_pipe = 1 , file_type_device , file_type_file , file_type_socket }
 

Functions

static void vehicle_wince_disable_watch (struct vehicle_priv *priv)
 
static void vehicle_wince_enable_watch (struct vehicle_priv *priv)
 
static int vehicle_wince_parse (struct vehicle_priv *priv, char *buffer)
 
static int vehicle_wince_open (struct vehicle_priv *priv)
 
static void vehicle_wince_close (struct vehicle_priv *priv)
 
static void initBth (struct vehicle_priv *priv)
 
static int initDevice (struct vehicle_priv *priv)
 
static int read_win32 (struct vehicle_priv *priv, char *buffer, size_t size)
 
static DWORD WINAPI wince_reader_thread (LPVOID lParam)
 
static int vehicle_wince_available_ports (void)
 
static void vehicle_wince_fix_timeout_cb (struct vehicle_priv *priv)
 This is a callback function, called when the fix timeout is done. Set the position to invalid.
 
static void vehicle_wince_restart_fix_timeout (struct vehicle_priv *priv)
 Cancel previous fix timeout event and add a new one.
 
static void vehicle_wince_io (struct vehicle_priv *priv)
 
static void vehicle_wince_destroy (struct vehicle_priv *priv)
 Frees the wince_vehicle.
 
static int vehicle_wince_position_attr_get (struct vehicle_priv *priv, enum attr_type type, struct attr *attr)
 Retrieves a vehicle attribute.
 
static int vehicle_wince_sat_attr_get (void *priv_data, enum attr_type type, struct attr *attr)
 
static struct vehicle_privvehicle_wince_new (struct vehicle_methods *meth, struct callback_list *cbl, struct attr **attrs)
 Creates a new wince_vehicle.
 
void plugin_init (void)
 Registers the vehicle_wince plugin.
 

Variables

char * _convert = NULL
 
wchar_t * _wconvert = NULL
 
static int buffer_size = 1024
 
static struct item_methods vehicle_wince_sat_methods
 
struct vehicle_methods vehicle_wince_methods
 

Macro Definition Documentation

◆ IOCTL_SERVICE_REFRESH

#define IOCTL_SERVICE_REFRESH   0x4100000C

◆ IOCTL_SERVICE_START

#define IOCTL_SERVICE_START   0x41000004