OpenSync Plugin Connection Options
[OpenSync Plugin Module]

Functions to get and set a plugin's connection options. More...


Typedefs

typedef OSyncPluginConnectionType OSyncPluginConnectionSupportedFlag
 Connection type.
typedef unsigned int OSyncPluginConnectionSupportedFlags
 Set of OSyncPluginConnectionType values.
typedef unsigned int OSyncPluginConnectionOptionSupportedFlags
 Set of OSyncPluginConnectionOptionSupportedFlag values.

Enumerations

enum  OSyncPluginConnectionType {
  OSYNC_PLUGIN_CONNECTION_UNKNOWN = 0, OSYNC_PLUGIN_CONNECTION_BLUETOOTH = (1 << 0), OSYNC_PLUGIN_CONNECTION_USB = (1 << 1), OSYNC_PLUGIN_CONNECTION_NETWORK = (1 << 2),
  OSYNC_PLUGIN_CONNECTION_SERIAL = (1 << 3), OSYNC_PLUGIN_CONNECTION_IRDA = (1 << 4)
}
 Connection type support flags. More...
enum  OSyncPluginConnectionOptionSupportedFlag {
  OSYNC_PLUGIN_CONNECTION_BLUETOOTH_ADDRESS = (1 << 0), OSYNC_PLUGIN_CONNECTION_BLUETOOTH_RFCOMM = (1 << 1), OSYNC_PLUGIN_CONNECTION_BLUETOOTH_SDPUUID = (1 << 2), OSYNC_PLUGIN_CONNECTION_USB_VENDORID = (1 << 3),
  OSYNC_PLUGIN_CONNECTION_USB_PRODUCTID = (1 << 4), OSYNC_PLUGIN_CONNECTION_USB_INTERFACE = (1 << 5), OSYNC_PLUGIN_CONNECTION_NETWORK_ADDRESS = (1 << 6), OSYNC_PLUGIN_CONNECTION_NETWORK_PORT = (1 << 7),
  OSYNC_PLUGIN_CONNECTION_NETWORK_PROTOCOL = (1 << 8), OSYNC_PLUGIN_CONNECTION_NETWORK_DNSSD = (1 << 9), OSYNC_PLUGIN_CONNECTION_SERIAL_SPEED = (1 << 10), OSYNC_PLUGIN_CONNECTION_SERIAL_DEVICENODE = (1 << 11),
  OSYNC_PLUGIN_CONNECTION_IRDA_SERVICE = (1 << 12)
}
 Connection option support flags. More...

Functions

OSYNC_EXPORT
OSyncPluginConnection
osync_plugin_connection_new (OSyncError **error)
 Create a new OSyncPluginConnection object.
OSYNC_EXPORT void osync_plugin_connection_unref (OSyncPluginConnection *connection)
 Decrease the reference count on an OSyncPluginConnection object.
OSYNC_EXPORT
OSyncPluginConnection
osync_plugin_connection_ref (OSyncPluginConnection *connection)
 Increase the reference count on an OSyncPluginConnection object.
OSYNC_EXPORT
OSyncPluginConnectionType 
osync_plugin_connection_get_type (OSyncPluginConnection *connection)
 Get the type of a connection.
OSYNC_EXPORT void osync_plugin_connection_set_type (OSyncPluginConnection *connection, OSyncPluginConnectionType type)
 Set the type of a connection.
OSYNC_EXPORT osync_bool osync_plugin_connection_is_supported (OSyncPluginConnection *connection, OSyncPluginConnectionSupportedFlag flag)
 Check if a type of connection is supported.
OSYNC_EXPORT void osync_plugin_connection_set_supported (OSyncPluginConnection *connection, OSyncPluginConnectionSupportedFlags flags)
 Set the types of a connection that are supported.
OSYNC_EXPORT osync_bool osync_plugin_connection_option_is_supported (OSyncPluginConnection *connection, OSyncPluginConnectionOptionSupportedFlag flag)
 Check if a connection option is supported.
OSYNC_EXPORT void osync_plugin_connection_option_set_supported (OSyncPluginConnection *connection, OSyncPluginConnectionOptionSupportedFlags flags)
 Set the connection options that are supported.
OSYNC_EXPORT const char * osync_plugin_connection_bt_get_addr (OSyncPluginConnection *connection)
 Get the Bluetooth address.
OSYNC_EXPORT void osync_plugin_connection_bt_set_addr (OSyncPluginConnection *connection, const char *address)
 Set the Bluetooth address.
OSYNC_EXPORT unsigned int osync_plugin_connection_bt_get_channel (OSyncPluginConnection *connection)
 Get the Bluetooth RFCOMM channel.
OSYNC_EXPORT void osync_plugin_connection_bt_set_channel (OSyncPluginConnection *connection, unsigned int channel)
 Set the Bluetooth RFCOMM channel.
OSYNC_EXPORT const char * osync_plugin_connection_bt_get_sdpuuid (OSyncPluginConnection *connection)
 Get the Bluetooth SDP UUID.
OSYNC_EXPORT void osync_plugin_connection_bt_set_sdpuuid (OSyncPluginConnection *connection, const char *sdpuuid)
 Set the Bluetooth SDP UUID.
OSYNC_EXPORT const char * osync_plugin_connection_usb_get_vendorid (OSyncPluginConnection *connection)
 Get the USB vendor ID.
OSYNC_EXPORT void osync_plugin_connection_usb_set_vendorid (OSyncPluginConnection *connection, const char *vendorid)
 Set the USB vendor ID.
OSYNC_EXPORT const char * osync_plugin_connection_usb_get_productid (OSyncPluginConnection *connection)
 Get the USB product ID.
OSYNC_EXPORT void osync_plugin_connection_usb_set_productid (OSyncPluginConnection *connection, const char *productid)
 Set the USB product ID.
OSYNC_EXPORT unsigned int osync_plugin_connection_usb_get_interface (OSyncPluginConnection *connection)
 Get the USB interface number.
OSYNC_EXPORT void osync_plugin_connection_usb_set_interface (OSyncPluginConnection *connection, unsigned int interf)
 Set the USB interface number.
OSYNC_EXPORT const char * osync_plugin_connection_net_get_address (OSyncPluginConnection *connection)
 Get the network address (IP address or hostname).
OSYNC_EXPORT void osync_plugin_connection_net_set_address (OSyncPluginConnection *connection, const char *address)
 Set the network address (IP address or hostname).
OSYNC_EXPORT unsigned int osync_plugin_connection_net_get_port (OSyncPluginConnection *connection)
 Get the network port.
OSYNC_EXPORT void osync_plugin_connection_net_set_port (OSyncPluginConnection *connection, unsigned int port)
 Set the network port.
OSYNC_EXPORT const char * osync_plugin_connection_net_get_protocol (OSyncPluginConnection *connection)
 Get the network protocol.
OSYNC_EXPORT void osync_plugin_connection_net_set_protocol (OSyncPluginConnection *connection, const char *protocol)
 Set the network protocol.
OSYNC_EXPORT const char * osync_plugin_connection_net_get_dnssd (OSyncPluginConnection *connection)
 Get the network DNS-SD service type.
OSYNC_EXPORT void osync_plugin_connection_net_set_dnssd (OSyncPluginConnection *connection, const char *dnssd)
 Set the network DNS-SD service type.
OSYNC_EXPORT unsigned int osync_plugin_connection_serial_get_speed (OSyncPluginConnection *connection)
 Get the serial port speed.
OSYNC_EXPORT void osync_plugin_connection_serial_set_speed (OSyncPluginConnection *connection, unsigned int speed)
 Set the serial port speed.
OSYNC_EXPORT const char * osync_plugin_connection_serial_get_devicenode (OSyncPluginConnection *connection)
 Get the serial port device.
OSYNC_EXPORT void osync_plugin_connection_serial_set_devicenode (OSyncPluginConnection *connection, const char *devicenode)
 Set the serial port device.
OSYNC_EXPORT const char * osync_plugin_connection_irda_get_service (OSyncPluginConnection *connection)
 Get the IrDA identifier (service) string.
OSYNC_EXPORT void osync_plugin_connection_irda_set_service (OSyncPluginConnection *connection, const char *irdaservice)
 Set the IrDA identifier (service) string.


Detailed Description

Functions to get and set a plugin's connection options.

Typedef Documentation

Connection type.

Definition at line 54 of file opensync_plugin_connection.h.

Set of OSyncPluginConnectionType values.

Definition at line 59 of file opensync_plugin_connection.h.

Set of OSyncPluginConnectionOptionSupportedFlag values.

Definition at line 96 of file opensync_plugin_connection.h.


Enumeration Type Documentation

Connection type support flags.

Enumerator:
OSYNC_PLUGIN_CONNECTION_UNKNOWN  Unknown
OSYNC_PLUGIN_CONNECTION_BLUETOOTH  Bluetooth
OSYNC_PLUGIN_CONNECTION_USB  USB
OSYNC_PLUGIN_CONNECTION_NETWORK  Network
OSYNC_PLUGIN_CONNECTION_SERIAL  Serial
OSYNC_PLUGIN_CONNECTION_IRDA  IrDA

Definition at line 36 of file opensync_plugin_connection.h.

Connection option support flags.

Enumerator:
OSYNC_PLUGIN_CONNECTION_BLUETOOTH_ADDRESS  Bluetooth (MAC) address
OSYNC_PLUGIN_CONNECTION_BLUETOOTH_RFCOMM  Bluetooth RFCOMM channel
OSYNC_PLUGIN_CONNECTION_BLUETOOTH_SDPUUID  Bluetooth SDP UUID
OSYNC_PLUGIN_CONNECTION_USB_VENDORID  USB Vendor ID
OSYNC_PLUGIN_CONNECTION_USB_PRODUCTID  USB Product ID
OSYNC_PLUGIN_CONNECTION_USB_INTERFACE  USB interface ???
OSYNC_PLUGIN_CONNECTION_NETWORK_ADDRESS  Network address (IP/hostname)
OSYNC_PLUGIN_CONNECTION_NETWORK_PORT  Network port
OSYNC_PLUGIN_CONNECTION_NETWORK_PROTOCOL  Network protocol
OSYNC_PLUGIN_CONNECTION_NETWORK_DNSSD  Network DNS-SD service type
OSYNC_PLUGIN_CONNECTION_SERIAL_SPEED  Serial port speed (bps) eg. 115200
OSYNC_PLUGIN_CONNECTION_SERIAL_DEVICENODE  Serial device node (e.g. /dev/ttyS0, /dev/ttyUSB0, ...)
OSYNC_PLUGIN_CONNECTION_IRDA_SERVICE  IrDA Identifier (Service) String

Definition at line 64 of file opensync_plugin_connection.h.


Function Documentation

OSYNC_EXPORT OSyncPluginConnection* osync_plugin_connection_new ( OSyncError **  error  ) 

Create a new OSyncPluginConnection object.

Parameters:
error Pointer to an error struct
Returns:
the newly created object, or NULL in case of an error.

Definition at line 38 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_unref ( OSyncPluginConnection connection  ) 

Decrease the reference count on an OSyncPluginConnection object.

Parameters:
connection Pointer to the OSyncPluginConnection object

Definition at line 59 of file opensync_plugin_connection.c.

Referenced by osync_plugin_config_set_connection(), and osync_plugin_config_unref().

OSYNC_EXPORT OSyncPluginConnection* osync_plugin_connection_ref ( OSyncPluginConnection connection  ) 

Increase the reference count on an OSyncPluginConnection object.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The OSyncPluginConnection object passed in

Definition at line 50 of file opensync_plugin_connection.c.

Referenced by osync_plugin_config_set_connection().

OSYNC_EXPORT OSyncPluginConnectionType osync_plugin_connection_get_type ( OSyncPluginConnection connection  ) 

Get the type of a connection.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The connection type

Definition at line 95 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_set_type ( OSyncPluginConnection connection,
OSyncPluginConnectionType  type 
)

Set the type of a connection.

Parameters:
connection Pointer to the OSyncPluginConnection object
type The connection type to set

Definition at line 102 of file opensync_plugin_connection.c.

OSYNC_EXPORT osync_bool osync_plugin_connection_is_supported ( OSyncPluginConnection connection,
OSyncPluginConnectionSupportedFlag  flag 
)

Check if a type of connection is supported.

Parameters:
connection Pointer to the OSyncPluginConnection object
flag The connection type to check
Returns:
true if the connection type is supported, false otherwise.

Definition at line 124 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_set_supported ( OSyncPluginConnection connection,
OSyncPluginConnectionSupportedFlags  flags 
)

Set the types of a connection that are supported.

Parameters:
connection Pointer to the OSyncPluginConnection object
flags The set of connection types to set as supported

Definition at line 133 of file opensync_plugin_connection.c.

OSYNC_EXPORT osync_bool osync_plugin_connection_option_is_supported ( OSyncPluginConnection connection,
OSyncPluginConnectionOptionSupportedFlag  flag 
)

Check if a connection option is supported.

Parameters:
connection Pointer to the OSyncPluginConnection object
flag The connection option to check
Returns:
true if the connection option is supported, false otherwise.

Definition at line 139 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_option_set_supported ( OSyncPluginConnection connection,
OSyncPluginConnectionOptionSupportedFlags  flags 
)

Set the connection options that are supported.

Parameters:
connection Pointer to the OSyncPluginConnection object
flags The set of connection options to set as supported

Definition at line 148 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_bt_get_addr ( OSyncPluginConnection connection  ) 

Get the Bluetooth address.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The bluetooth address or NULL if not set

Definition at line 155 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_bt_set_addr ( OSyncPluginConnection connection,
const char *  address 
)

Set the Bluetooth address.

Parameters:
connection Pointer to the OSyncPluginConnection object
address The bluetooth address to set

Definition at line 162 of file opensync_plugin_connection.c.

OSYNC_EXPORT unsigned int osync_plugin_connection_bt_get_channel ( OSyncPluginConnection connection  ) 

Get the Bluetooth RFCOMM channel.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The RFCOMM channel

Definition at line 173 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_bt_set_channel ( OSyncPluginConnection connection,
unsigned int  channel 
)

Set the Bluetooth RFCOMM channel.

Parameters:
connection Pointer to the OSyncPluginConnection object
channel The RFCOMM channel to set

Definition at line 180 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_bt_get_sdpuuid ( OSyncPluginConnection connection  ) 

Get the Bluetooth SDP UUID.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The SDP UUID or NULL if not set

Definition at line 187 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_bt_set_sdpuuid ( OSyncPluginConnection connection,
const char *  sdpuuid 
)

Set the Bluetooth SDP UUID.

Parameters:
connection Pointer to the OSyncPluginConnection object
sdpuuid The SDP UUID to set

Definition at line 194 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_usb_get_vendorid ( OSyncPluginConnection connection  ) 

Get the USB vendor ID.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The USB vendor ID

Definition at line 205 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_usb_set_vendorid ( OSyncPluginConnection connection,
const char *  vendorid 
)

Set the USB vendor ID.

Parameters:
connection Pointer to the OSyncPluginConnection object
vendorid The USB vendor ID to set

Definition at line 212 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_usb_get_productid ( OSyncPluginConnection connection  ) 

Get the USB product ID.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The USB product ID

Definition at line 222 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_usb_set_productid ( OSyncPluginConnection connection,
const char *  productid 
)

Set the USB product ID.

Parameters:
connection Pointer to the OSyncPluginConnection object
productid The USB product ID to set

Definition at line 229 of file opensync_plugin_connection.c.

OSYNC_EXPORT unsigned int osync_plugin_connection_usb_get_interface ( OSyncPluginConnection connection  ) 

Get the USB interface number.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The USB interface number

Definition at line 239 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_usb_set_interface ( OSyncPluginConnection connection,
unsigned int  interf 
)

Set the USB interface number.

Parameters:
connection Pointer to the OSyncPluginConnection object
interf The USB interface number to set

Definition at line 246 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_net_get_address ( OSyncPluginConnection connection  ) 

Get the network address (IP address or hostname).

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The network address

Definition at line 253 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_net_set_address ( OSyncPluginConnection connection,
const char *  address 
)

Set the network address (IP address or hostname).

Parameters:
connection Pointer to the OSyncPluginConnection object
address The network address to set

Definition at line 260 of file opensync_plugin_connection.c.

OSYNC_EXPORT unsigned int osync_plugin_connection_net_get_port ( OSyncPluginConnection connection  ) 

Get the network port.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The network port

Definition at line 271 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_net_set_port ( OSyncPluginConnection connection,
unsigned int  port 
)

Set the network port.

Parameters:
connection Pointer to the OSyncPluginConnection object
port The network port to set

Definition at line 278 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_net_get_protocol ( OSyncPluginConnection connection  ) 

Get the network protocol.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The network protocol

Definition at line 286 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_net_set_protocol ( OSyncPluginConnection connection,
const char *  protocol 
)

Set the network protocol.

Parameters:
connection Pointer to the OSyncPluginConnection object
protocol The network protocol to set

Definition at line 293 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_net_get_dnssd ( OSyncPluginConnection connection  ) 

Get the network DNS-SD service type.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The DNS-SD service type or NULL if not set

Definition at line 304 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_net_set_dnssd ( OSyncPluginConnection connection,
const char *  dnssd 
)

Set the network DNS-SD service type.

Parameters:
connection Pointer to the OSyncPluginConnection object
dnssd The DNS-SD service type to set

Definition at line 311 of file opensync_plugin_connection.c.

OSYNC_EXPORT unsigned int osync_plugin_connection_serial_get_speed ( OSyncPluginConnection connection  ) 

Get the serial port speed.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The serial port speed, in bps

Definition at line 322 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_serial_set_speed ( OSyncPluginConnection connection,
unsigned int  speed 
)

Set the serial port speed.

Parameters:
connection Pointer to the OSyncPluginConnection object
speed The serial port speed to set, in bps

Definition at line 329 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_serial_get_devicenode ( OSyncPluginConnection connection  ) 

Get the serial port device.

The serial port device node, eg. /dev/ttyS0, /dev/ttyUSB0 etc.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The serial port device node

Definition at line 337 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_serial_set_devicenode ( OSyncPluginConnection connection,
const char *  devicenode 
)

Set the serial port device.

The serial port device node, eg. /dev/ttyS0, /dev/ttyUSB0 etc.

Parameters:
connection Pointer to the OSyncPluginConnection object
devicenode The serial port device node to set

Definition at line 344 of file opensync_plugin_connection.c.

OSYNC_EXPORT const char* osync_plugin_connection_irda_get_service ( OSyncPluginConnection connection  ) 

Get the IrDA identifier (service) string.

Parameters:
connection Pointer to the OSyncPluginConnection object
Returns:
The IrDA service string

Definition at line 355 of file opensync_plugin_connection.c.

OSYNC_EXPORT void osync_plugin_connection_irda_set_service ( OSyncPluginConnection connection,
const char *  irdaservice 
)

Set the IrDA identifier (service) string.

Parameters:
connection Pointer to the OSyncPluginConnection object
irdaservice The IrDA service string to set

Definition at line 362 of file opensync_plugin_connection.c.


Generated on Fri Feb 13 13:33:30 2009 for OpenSync by  doxygen 1.5.7.1