blueZync

Synchronize Bluetooth phone with Thunderbird

Develpers' detailed documentation for the Thunderbird Extension for synchronizing a bluetooth phone with Thunderbird/Lightning/Sunbird.
A part of blueZync.

BZBluetoothThread.cpp File Reference


Detailed Description

Thread to scan for bluetooth devices.


Classes

class  BZBluetoothException
 exception thrown by thread in case of errors More...

Defines

#define myLogLevel   pbz->myLogLevel
#define myMutex   pbz->myMutex
#define SAY(level, message)
#define SAYA(level, message...)

Functions

gpointer BZBluetoothThreadFunc (gpointer data) throw ()
static int discover_service (BZBluetooth *pbz, int dev, bdaddr_t local_bdaddr, inquiry_info *pInfo)
static uint16_t get_dev_id (BZBluetooth *pbz, int ctl, bdaddr_t *p_local_bdaddr)
static void print_dev_info (int ctl, struct hci_dev_info *di)
static int remote_scan (BZBluetooth *pbz, uint16_t dev_id, bdaddr_t local_bdaddr)
static int scan (BZBluetooth *pbz)

Define Documentation

#define myLogLevel   pbz->myLogLevel

#define myMutex   pbz->myMutex

#define SAY ( level,
message   ) 

Value:

{\
        LOG(level, message); \
        LOCK; \
        pbz->myStatus.Assign(message); \
        UNLOCK; }

#define SAYA ( level,
message...   ) 

Value:

{\
        char* sz=g_strdup_printf(message); \
        LOG(level, sz); \
        LOCK; \
        pbz->myStatus.Assign(sz); \
        UNLOCK; }


Function Documentation

gpointer BZBluetoothThreadFunc ( gpointer  data  )  throw ()

Function called when thread is started

static int discover_service ( BZBluetooth pbz,
int  dev,
bdaddr_t  local_bdaddr,
inquiry_info *  pInfo 
) [static]

Discover services

static uint16_t get_dev_id ( BZBluetooth pbz,
int  ctl,
bdaddr_t *  p_local_bdaddr 
) [static]

Get device id for local bluetooth HCI interface

static void print_dev_info ( int  ctl,
struct hci_dev_info *  di 
) [static]

Print info about local bluetooth HCI device

static int remote_scan ( BZBluetooth pbz,
uint16_t  dev_id,
bdaddr_t  local_bdaddr 
) [static]

Actually scan for remote devices

static int scan ( BZBluetooth pbz  )  [static]

Main function to open local bluetooth HCI device and scan for remote devices on it