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.

settings_window.js File Reference


Detailed Description

Functionality for the blueZync preferences window.

Todo:
If settings window is closed, thread should be aborted


Classes

class  BluezyncPreferences
 status for the blueZync preferences window More...

Functions

void bluetoothScanComplete (BluezyncPreferences env)
 Bluetooth thread has completed.
void bluetoothScanTimeout (BluezyncPreferences env)
 Bluetooth scan timed out.
void bluetoothShowDevSel (BluezyncPreferences env)
 show device selection dialog
void createGroup (string name, string bdaddr, string channel, BluezyncPreferences env)
 create an OpenSync group
void discoverGroup (BluezyncPreferences env, string groupName)
 start the discovery of object types for an OpenSync group
void loadOneGroup (BluezyncPreferences env, string groupName)
 Load specified group into the settings box.
void loadOpenSyncGroups (BluezyncPreferences env)
 load groups from the OpenSync library
void loadOpenSyncLib (BluezyncPreferences env)
 load and initialize OpenSync library
void loadOpenSyncPlugins (BluezyncPreferences env)
 load names of plugins from the OpenSync library
void loadPreferences (BluezyncPreferences env)
 load preferences
string makeBTxml (string bdaddr, string channel)
 Make XML configuration for the bluetooth device.
string makeTBxml (string abName)
 Make XML configuration for Thunderbird.
void monitorBluetoothScan (BluezyncPreferences env)
 monitor status of the bluetooth scan
void monitorDiscovery (BluezyncPreferences env)
 check status of OpenSync discover thread
void saveGroup (BluezyncPreferences env, string groupName)
 save an OpenSync group
void startBluetoothScan (BluezyncPreferences env)
 start bluetooth scan

Variables

BluezyncPreferences bluezyncPreferences
 global variable holding the status for the blueZync preferences window

Function Documentation

void bluetoothScanComplete ( BluezyncPreferences  env  ) 

Bluetooth thread has completed.

Called when xpcom scan thread has completed

Parameters:
env BluezyncPreferences
Todo:
If there is only one device there is no need to show device selection

void bluetoothScanTimeout ( BluezyncPreferences  env  ) 

Bluetooth scan timed out.

Called when xpcom scan thread did not finish in a long time

Parameters:
env BluezyncPreferences

void bluetoothShowDevSel ( BluezyncPreferences  env  ) 

show device selection dialog

Called to show device selection dialog

Parameters:
env BluezyncPreferences

void createGroup ( string  name,
string  bdaddr,
string  channel,
BluezyncPreferences  env 
)

create an OpenSync group

Called to create an OpenSync group

Parameters:
name The group name
bdaddr MAC address of the bluetooth device
channel number for SyncML
env BluezyncPreferences

void discoverGroup ( BluezyncPreferences  env,
string  groupName 
)

start the discovery of object types for an OpenSync group

Called to start the discovery of object types for an OpenSync group

Parameters:
env BluezyncPreferences
groupName The original group name

void loadOneGroup ( BluezyncPreferences  env,
string  groupName 
)

Load specified group into the settings box.

Load specified group into the settings box

Parameters:
env BluezyncPreferences
groupName The group name

void loadOpenSyncGroups ( BluezyncPreferences  env  ) 

load groups from the OpenSync library

Called to load groups from the OpenSync library

Parameters:
env BluezyncPreferences

void loadOpenSyncLib ( BluezyncPreferences  env  ) 

load and initialize OpenSync library

Called to load and initialize OpenSync library

Parameters:
env BluezyncPreferences

void loadOpenSyncPlugins ( BluezyncPreferences  env  ) 

load names of plugins from the OpenSync library

Called to load names of plugins from the OpenSync library

Parameters:
env BluezyncPreferences

void loadPreferences ( BluezyncPreferences  env  ) 

load preferences

Called to load thunderbird preferences from prefs.js etc

Parameters:
env BluezyncPreferences

string makeBTxml ( string  bdaddr,
string  channel 
)

Make XML configuration for the bluetooth device.

Make XML configuration for Bluetooth

Parameters:
bdaddr MAC address of the bluetooth device
channel number for SyncML

string makeTBxml ( string  abName  ) 

Make XML configuration for Thunderbird.

Make XML configuration for Thunderbird

Parameters:
abName name of the addressbook (e.g. abook.mab) to synchronize

void monitorBluetoothScan ( BluezyncPreferences  env  ) 

monitor status of the bluetooth scan

Called regularly to check status of xpcom scan thread

  • if timeout, "call" bluetoothScanTimeout
  • if finished, TODO
  • if not finished, just "recursively call" self

Parameters:
env BluezyncPreferences

void monitorDiscovery ( BluezyncPreferences  env  ) 

check status of OpenSync discover thread

Called regularly to check status of OpenSync discover thread

Parameters:
env BluezyncPreferences

void saveGroup ( BluezyncPreferences  env,
string  groupName 
)

save an OpenSync group

Called to save an OpenSync group

Parameters:
env BluezyncPreferences
groupName The original group name

void startBluetoothScan ( BluezyncPreferences  env  ) 

start bluetooth scan

Called once to start the xpcom scan thread

Parameters:
env BluezyncPreferences


Variable Documentation

global variable holding the status for the blueZync preferences window

Global variable holding the status for the blueZync preferences window