Sei sulla pagina 1di 73

Wireless Communication Library

.NET Edition
WCLBLUETOOTHAPI....................................................................................................10
WCLTRANSPORT..........................................................................................................10
WCLAPI...........................................................................................................................10
Methods........................................................................................................................................................................10
Load..........................................................................................................................................................................10
Unload......................................................................................................................................................................10
IsBluetoothAPIExists...............................................................................................................................................11
IsTransportExists......................................................................................................................................................11
Properties.....................................................................................................................................................................11
Active.......................................................................................................................................................................11
Version.....................................................................................................................................................................11
Events...........................................................................................................................................................................11
AfterLoad.................................................................................................................................................................11
AfterUnload..............................................................................................................................................................12
OnChanged...............................................................................................................................................................12

WCLBLUETOOTHRADIO...............................................................................................12
Methods........................................................................................................................................................................12
GetAddress...............................................................................................................................................................12
GetConnectable........................................................................................................................................................12
GetDiscoverable.......................................................................................................................................................12
GetName..................................................................................................................................................................12
SetConnectable.........................................................................................................................................................13
SetDiscoverable........................................................................................................................................................13
SetName...................................................................................................................................................................13
Assign.......................................................................................................................................................................13
Properties.....................................................................................................................................................................13
API...........................................................................................................................................................................13

WCLBLUETOOTHRADIOS............................................................................................13
Methods........................................................................................................................................................................14
Add...........................................................................................................................................................................14
Clear.........................................................................................................................................................................14
Delete.......................................................................................................................................................................14
Assign.......................................................................................................................................................................14
Properties.....................................................................................................................................................................14
Count........................................................................................................................................................................14
Items.........................................................................................................................................................................14

WCLBLUETOOTHSERVICE..........................................................................................15

Methods........................................................................................................................................................................15
Assign.......................................................................................................................................................................15
Properties.....................................................................................................................................................................15
Channel....................................................................................................................................................................15
Comment..................................................................................................................................................................15
Handle......................................................................................................................................................................15
Name........................................................................................................................................................................15
UUID........................................................................................................................................................................16

WCLBLUETOOTHSERVICES........................................................................................16
Methods........................................................................................................................................................................16
Add...........................................................................................................................................................................16
Clear.........................................................................................................................................................................16
Delete.......................................................................................................................................................................16
Assign.......................................................................................................................................................................16
Properties.....................................................................................................................................................................17
Count........................................................................................................................................................................17
Items.........................................................................................................................................................................17

WCLBLUETOOTHDEVICE.............................................................................................17
Methods........................................................................................................................................................................17
GetClassOfDevice....................................................................................................................................................17
GetName..................................................................................................................................................................17
GetPaired..................................................................................................................................................................17
EnumServices...........................................................................................................................................................18
Pair...........................................................................................................................................................................18
Unpair.......................................................................................................................................................................18
Assign.......................................................................................................................................................................18
DecodeCOD.............................................................................................................................................................18
Properties.....................................................................................................................................................................18
Address.....................................................................................................................................................................18

WCLBLUETOOTHDEVICES..........................................................................................19
Methods........................................................................................................................................................................19
Add...........................................................................................................................................................................19
Clear.........................................................................................................................................................................19
Delete.......................................................................................................................................................................19
Assign.......................................................................................................................................................................19
Properties.....................................................................................................................................................................19
Count........................................................................................................................................................................19
Items.........................................................................................................................................................................20

WCLBLUETOOTHDISCOVERY.....................................................................................20
Methods........................................................................................................................................................................20
Discovery.................................................................................................................................................................20
EnumRadios.............................................................................................................................................................20
Terminate.................................................................................................................................................................20
Properties.....................................................................................................................................................................20
Active.......................................................................................................................................................................20

Events...........................................................................................................................................................................21
OnDiscoveryComplete.............................................................................................................................................21
OnDiscoveryStarted.................................................................................................................................................21

WCLERRORS.................................................................................................................21
WCLIRDADEVICE..........................................................................................................25
Properties.....................................................................................................................................................................25
Name........................................................................................................................................................................25
Address.....................................................................................................................................................................25

WCLIRDADEVICES........................................................................................................25
Methods........................................................................................................................................................................25
Add...........................................................................................................................................................................25
Clear.........................................................................................................................................................................25
Delete.......................................................................................................................................................................26
Properties.....................................................................................................................................................................26
Count........................................................................................................................................................................26
Items.........................................................................................................................................................................26

WCLIRDADISCOVERY...................................................................................................26
Methods........................................................................................................................................................................26
Discovery.................................................................................................................................................................26
Terminate.................................................................................................................................................................26
Properties.....................................................................................................................................................................27
Active.......................................................................................................................................................................27
Events...........................................................................................................................................................................27
OnComplete.............................................................................................................................................................27
OnStarted..................................................................................................................................................................27

WCLSERIALDEVICE......................................................................................................27
Properties.....................................................................................................................................................................27
FriendlyName...........................................................................................................................................................27
Modem.....................................................................................................................................................................28
Port...........................................................................................................................................................................28

WCLSERIALDEVICES....................................................................................................28
Methods........................................................................................................................................................................28
Add...........................................................................................................................................................................28
Clear.........................................................................................................................................................................28
Delete.......................................................................................................................................................................28
Properties.....................................................................................................................................................................29
Count........................................................................................................................................................................29
Items.........................................................................................................................................................................29

WCLSERIALDISCOVERY..............................................................................................29
Methods........................................................................................................................................................................29

EnumDevices...........................................................................................................................................................29
StartMonitoring........................................................................................................................................................29
Stop Monitoring.......................................................................................................................................................30
Properties.....................................................................................................................................................................30
Monitoring................................................................................................................................................................30
Events...........................................................................................................................................................................30
OnStarted..................................................................................................................................................................30
OnStopped................................................................................................................................................................30
OnFound...................................................................................................................................................................30
OnLost......................................................................................................................................................................30

WCLBUFFERS................................................................................................................31
Properties.....................................................................................................................................................................31
ReadBuffer...............................................................................................................................................................31
WriteBuffer..............................................................................................................................................................31

WCLCLIENTBLUETOOTHPARAMS.............................................................................31
Properties.....................................................................................................................................................................31
Authentication..........................................................................................................................................................31
Channel....................................................................................................................................................................32
Encryption................................................................................................................................................................32
Address.....................................................................................................................................................................32
Radio........................................................................................................................................................................32
Service......................................................................................................................................................................32

WCLCLIENTIRDAPARAMS...........................................................................................33
Properties.....................................................................................................................................................................33
NineWire..................................................................................................................................................................33
Service......................................................................................................................................................................33
Address.....................................................................................................................................................................33

WCLBAUDRATE.............................................................................................................33
WCLBYTESIZE...............................................................................................................34
WCLPARITY....................................................................................................................34
WCLSTOPBITS...............................................................................................................34
WCLCLIENTSERIALPARAMS.......................................................................................34
Properties.....................................................................................................................................................................35
BaudRate..................................................................................................................................................................35
BaudRateValue........................................................................................................................................................35
ByteSize...................................................................................................................................................................35
Parity........................................................................................................................................................................35
Port...........................................................................................................................................................................35
StopBits....................................................................................................................................................................36

WCLCLIENTSTATE........................................................................................................36

WCLCLIENTTRANSPORT.............................................................................................36
WCLCLIENT....................................................................................................................36
Methods........................................................................................................................................................................36
Write.........................................................................................................................................................................36
Connect....................................................................................................................................................................37
Disconnect................................................................................................................................................................37
Properties.....................................................................................................................................................................37
State..........................................................................................................................................................................37
BluetoothParams......................................................................................................................................................37
Buffers......................................................................................................................................................................37
ConnectTimeout.......................................................................................................................................................37
IrDAParams..............................................................................................................................................................38
SerialParams.............................................................................................................................................................38
Transport..................................................................................................................................................................38
Events...........................................................................................................................................................................38
OnData.....................................................................................................................................................................38
OnConnect................................................................................................................................................................38
OnDisconnect...........................................................................................................................................................39

WCLCLIENTOBEXPARAMS..........................................................................................39
Properties.....................................................................................................................................................................39
PacketSize................................................................................................................................................................39
Timeout....................................................................................................................................................................39
Target.......................................................................................................................................................................39
TargetAsString.........................................................................................................................................................40
Who..........................................................................................................................................................................40
WhoAsString............................................................................................................................................................40

WCLFILESYSTEMOBJECTTYPE..................................................................................40
WCLFILESYSTEMOBJECTPERMISSION.....................................................................40
WCLFILESYSTEMOBJECT...........................................................................................41
Methods........................................................................................................................................................................41
CheckPermission......................................................................................................................................................41
AddPermission.........................................................................................................................................................41
RemovePermission...................................................................................................................................................41
Properties.....................................................................................................................................................................41
CreateDateTime.......................................................................................................................................................41
ModifyDateTime......................................................................................................................................................42
Name........................................................................................................................................................................42
ObjectType...............................................................................................................................................................42
Size...........................................................................................................................................................................42

WCLFILESYSTEMOBJECTS.........................................................................................42
Methods........................................................................................................................................................................42
Add...........................................................................................................................................................................42
Clear.........................................................................................................................................................................43
Delete.......................................................................................................................................................................43

Properties.....................................................................................................................................................................43
Count........................................................................................................................................................................43
Items.........................................................................................................................................................................43

WCLOBEXSTATE...........................................................................................................43
WCLOBEXOPERATION.................................................................................................43
WCLOPPCLIENT............................................................................................................44
Methods........................................................................................................................................................................44
Put............................................................................................................................................................................44
Terminate.................................................................................................................................................................44
CloseOBEXSession..................................................................................................................................................44
OpenOBEXSession..................................................................................................................................................44
Disconnect................................................................................................................................................................45
Connect....................................................................................................................................................................45
Get............................................................................................................................................................................45
Properties.....................................................................................................................................................................45
OBEXParams...........................................................................................................................................................45
OBEXState...............................................................................................................................................................45
OBEXOperation.......................................................................................................................................................45
Transport..................................................................................................................................................................46
SerialParams.............................................................................................................................................................46
IrDAParams..............................................................................................................................................................46
ConnectTimeout.......................................................................................................................................................46
Buffers......................................................................................................................................................................46
BluetoothParams......................................................................................................................................................46
State..........................................................................................................................................................................47
Events...........................................................................................................................................................................47
OnConnect................................................................................................................................................................47
OnDisconnect...........................................................................................................................................................47
OnOBEXProgress....................................................................................................................................................47
OnOBEXPutComplete.............................................................................................................................................48
OnOBEXDisconnect................................................................................................................................................48
OnOBEXConnect.....................................................................................................................................................48
OnOBEXGetComplete.............................................................................................................................................48

WCLFTPCLIENT.............................................................................................................49
Methods........................................................................................................................................................................49
Put............................................................................................................................................................................49
Terminate.................................................................................................................................................................49
CloseOBEXSession..................................................................................................................................................49
OpenOBEXSession..................................................................................................................................................49
Disconnect................................................................................................................................................................49
Connect....................................................................................................................................................................49
Get............................................................................................................................................................................50
Delete.......................................................................................................................................................................50
Dir............................................................................................................................................................................50
MakeDir...................................................................................................................................................................50
SetPath......................................................................................................................................................................50
Properties.....................................................................................................................................................................50
OBEXParams...........................................................................................................................................................50
OBEXState...............................................................................................................................................................51
OBEXOperation.......................................................................................................................................................51

Transport..................................................................................................................................................................51
SerialParams.............................................................................................................................................................51
IrDAParams..............................................................................................................................................................51
ConnectTimeout.......................................................................................................................................................52
Buffers......................................................................................................................................................................52
BluetoothParams......................................................................................................................................................52
State..........................................................................................................................................................................52
Events...........................................................................................................................................................................52
OnConnect................................................................................................................................................................52
OnDisconnect...........................................................................................................................................................53
OnOBEXProgress....................................................................................................................................................53
OnOBEXPutComplete.............................................................................................................................................53
OnOBEXDisconnect................................................................................................................................................53
OnOBEXConnect.....................................................................................................................................................53
OnOBEXGetComplete.............................................................................................................................................54
OnOBEXDeleteComplete........................................................................................................................................54
OnOBEXDirComplete.............................................................................................................................................54
OnOBEXMakeDirComplete....................................................................................................................................55
OnOBEXSetPathComplete......................................................................................................................................55

WCLAUTHENTICATOR..................................................................................................55
Methods........................................................................................................................................................................55
Open.........................................................................................................................................................................55
Close.........................................................................................................................................................................55
Properties.....................................................................................................................................................................56
Active.......................................................................................................................................................................56
Radio........................................................................................................................................................................56
Events...........................................................................................................................................................................56
OnPINRequest..........................................................................................................................................................56

WCLPROXIMITYSENDER..............................................................................................56
Methods........................................................................................................................................................................57
Start..........................................................................................................................................................................57
Stop..........................................................................................................................................................................57
Properties.....................................................................................................................................................................57
Timeout....................................................................................................................................................................57
SleepInterval............................................................................................................................................................57
SendDelay................................................................................................................................................................57
Secure.......................................................................................................................................................................58
MaxConnections......................................................................................................................................................58
DiscoveryTimeout....................................................................................................................................................58
SendRadio................................................................................................................................................................58
DiscoveryRadio........................................................................................................................................................58
Active.......................................................................................................................................................................58
Events...........................................................................................................................................................................59
OnStopSleep.............................................................................................................................................................59
OnStopped................................................................................................................................................................59
OnStopDelay............................................................................................................................................................59
OnStartSleep............................................................................................................................................................59
OnStarted..................................................................................................................................................................59
OnStartDeay.............................................................................................................................................................59
OnSendStart.............................................................................................................................................................60
OnSendComplete.....................................................................................................................................................60
OnProgress...............................................................................................................................................................60

OnGetFiles...............................................................................................................................................................60
OnFileSendStarted...................................................................................................................................................61
OnFileSendComplete...............................................................................................................................................61
OnDiscoveryStarted.................................................................................................................................................61
OnDiscoveryComplete.............................................................................................................................................61
OnDevicesFound......................................................................................................................................................62
OnAcceptDevice......................................................................................................................................................62

WCLSERVERTRANSPORT...........................................................................................62
WCLSERVERSTATE......................................................................................................62
WCLSERVERBLUETOOTHPARAMS............................................................................63
Properties.....................................................................................................................................................................63
Authentication..........................................................................................................................................................63
Channel....................................................................................................................................................................63
Encryption................................................................................................................................................................63
Radio........................................................................................................................................................................63
Service......................................................................................................................................................................63
Name........................................................................................................................................................................64

WCLSERVERIRDAPARAMS.........................................................................................64
Properties.....................................................................................................................................................................64
NineWire..................................................................................................................................................................64
Service......................................................................................................................................................................64

WCLSERVER..................................................................................................................64
Methods........................................................................................................................................................................64
Close.........................................................................................................................................................................65
Listen........................................................................................................................................................................65
Write.........................................................................................................................................................................65
Properties.....................................................................................................................................................................65
Address.....................................................................................................................................................................65
DeviceName.............................................................................................................................................................65
State..........................................................................................................................................................................65
BluetoothParams......................................................................................................................................................66
IrDAParams..............................................................................................................................................................66
Transport..................................................................................................................................................................66
Buffers......................................................................................................................................................................66
Events...........................................................................................................................................................................66
OnClosed..................................................................................................................................................................66
OnConnected............................................................................................................................................................67
OnDisconnected.......................................................................................................................................................67
OnListen...................................................................................................................................................................67
OnData.....................................................................................................................................................................67

WCLOPPSERVER..........................................................................................................67
Methods........................................................................................................................................................................67
Close.........................................................................................................................................................................68
Listen........................................................................................................................................................................68
Terminate.................................................................................................................................................................68

Properties.....................................................................................................................................................................68
Address.....................................................................................................................................................................68
DeviceName.............................................................................................................................................................68
State..........................................................................................................................................................................68
BluetoothParams......................................................................................................................................................69
IrDAParams..............................................................................................................................................................69
Transport..................................................................................................................................................................69
Buffers......................................................................................................................................................................69
ObjectName..............................................................................................................................................................69
Events...........................................................................................................................................................................69
OnClosed..................................................................................................................................................................70
OnConnected............................................................................................................................................................70
OnDisconnected.......................................................................................................................................................70
OnListen...................................................................................................................................................................70
OnOBEXProgress....................................................................................................................................................70
OnOBEXObjectReceived........................................................................................................................................70

WCLCLASSOFDEVICE..................................................................................................71
Miscellaneous...............................................................................................................................................................71
Computers...................................................................................................................................................................71
Phones..........................................................................................................................................................................71
Audio............................................................................................................................................................................71
Peripheral....................................................................................................................................................................72
Imaging........................................................................................................................................................................72
Wearable......................................................................................................................................................................72
Toy................................................................................................................................................................................72
LAN..............................................................................................................................................................................73
Others...........................................................................................................................................................................73

wclBluetoothAPI
wclBluetoothAPI enumeration represents supported Bluetooth APIs.
baBlueSoleil
baMicrosoft
baToshiba
baWidComm

BlueSoleil Bluetooth drivers


Microsoft Bluetooth drivers
Toshiba Bluetooth drivers
WidComm Bluetooth drivers

wclTransport
wclTransport enumeration represents supported transports.
trActiveSync
trBluetooth
trIrDA
trSerial
trUSB
trWiFi

Microsoft ActiveSync
Bluetooth (see wclBluetoothAPIX)
IrDA
Serial ports
USB
WiFi

wclAPI
wclAPI class is the main class of the library. wclAPI manages low-level transports and drivers.
Application uses WCL must have at least one instance of the wclAPI class.

Methods
Load
Int32 Load()
This method loads low-level transports and APIs. Application must call this method before using
any other methods or classes of the library.
If the method completes with success it returns WCL_E_SUCCESS. Otherwise it returns one of
the error codes (see wclErrors for more details).

Unload
Int32 Unload()
This method unloads low-level transports and APIs. Application must call this method after
finished using the library.

If the method completes with success it returns WCL_E_SUCCESS. Otherwise it returns one of
the error codes (see wclError for more details).

IsBluetoothAPIExists
Boolean IsBluetoothAPIExists(wclBluetoothAPI API)
The method returns true if the specified Bluetooth API was detected and available for use.
Otherwise it returns false.

IsTransportExists
Boolean IsTransportExists(wclTransport Transport)
The method returns true if specified transport is available.

Properties
Active
Boolean Active
Read-Only
The Active property is true if API is loaded, otherwise it is false.

Version
String Version
Read-Only
The property returns current librarys version.

Events
AfterLoad
void AfterLoad(object sender, EventArgs e)
The event fires after low-level drivers and APIs were loaded and ready.

AfterUnload
void AfterUnload(object sender, EventArgs e)
The event fires after low-level drivers and APIs were unloaded.

OnChanged
void OnChanged(object sender, EventArgs e)
The event fires when configuration of low-level drivers and/or APIs was changed.

wclBluetoothRadio
The wclBluetoothRadio class represents local Bluetooth radio module (dongle).

Methods
GetAddress
Int32 GetAddress(ref String Address)
The method reads address of the local dongle and stores it into the Address parameter. If the
method completes with success it returns WCL_E_SUCCESS. Otherwise it returns one of the
error codes and Address parameter is undefined.

GetConnectable
Int32 GetConnectable(ref Boolean Connectable)
The method reads connectable state of the dongle and stores it into the Connectable parameter.
If the method completes with success it returns WCL_E_SUCCESS.

GetDiscoverable
Int32 GetDiscoverable(ref Boolean Discoverable)
The method reads discoverable state of the dongle and stores it into the Discoverable parameter.
If the method completes with success it returns WCL_E_SUCCESS.

GetName
Int32 GetName(ref String Name)

The method reads name of the local dongle and stores it into the Name parameter. If the method
completes with success it returns WCL_E_SUCCESS.

SetConnectable
Int32 SetConnectable(Boolean Connectable)
The method sets a connectable state of the dongle. If the method completes with success it
returns WCL_E_SUCCESS.

SetDiscoverable
Int32 SetDiscoverable(Boolean Discoverable)
The method sets discoverable mode of the dongle. If the method completes with success it
returns WCL_E_SUCCESS.

SetName
Int32 SetName(String Name)
The method sets the name of the dongle. If the method completes with success it returns
WCL_E_SUCCESS.

Assign
void Assign(wclBluetoothRadio Radio)
The method copies one instance of the wclBluetoothRadio object into current one.

Properties
API
wclBluetoothAPI API
Read-Write
The property manages the drivers (Bluetooth API) used by the dongle.

wclBluetoothRadios
The wclBluetoothRadios class represents list of local Bluetooth dongles.

Methods
Add
void Add(wclBluetoothRadio Radio)
The method adds Radio object to the list.

Clear
void Clear()
The method clears the list.

Delete
void Delete(UInt32 Index)
The method deletes the radio with given Index from the list.

Assign
void Assign(wclBluetoothRadios Radios)
The method copies one instance of the wclBluetoothRadios object into current one.

Properties
Count
UInt32 Count
Read-Only
The property returns the number of radios in the list.

Items
wclBluetoothRadio default[UInt32 Index]
Read-Only
The property returns Radio object by its Index.

wclBluetoothService
The class represents Bluetooth service.

Methods
Assign
void Assign(wclBluetoothService Service)
The method copies one instance of the wclBluetoothService into current one.

Properties
Channel
unsigned Byte Channel
Read-Only
The property contains the services RFCOMM channel number. Not all services have RFCOMM
channel number.

Comment
String Comment
Read-Only
The property contains the services comments. Usually it is empty.

Handle
UInt32 Handle
Read-Only
The property contains services service record handle.

Name
String Name

Read-Only
The property contains the services name.

UUID
Guid UUID
Read-Only
The property contains the services UUID.

wclBluetoothServices
The class represents a list of Bluetooth services.

Methods
Add
void Add(wclBluetoothService Service)
The method adds a service object to the list.

Clear
void Clear()
The method clears the list.

Delete
void Delete(UInt32 Index)
The method deletes a service object with given Index from the list.

Assign
void Assign(wclBluetoothServices Services)
The method copies one instance of the wclBluetoothServices class into the current one.

Properties
Count
UInt32 Count
Read-Only
The property returns items count in the list.

Items
wclBluetoothService default[UInt32 Index]
Read-Only
The property returns a wclBluetoothService object from the list by its Index.

wclBluetoothDevice
The class represents a remote Bluetooth device.

Methods
GetClassOfDevice
Int32 GetClassOfDevice(wclBluetoothRadio Radio, ref UInt32 COD)
The method reads Class Of remote Device (COD). The operation will perform on the specified
Radio. If the method completes with success it returns WCL_E_SUCCESS.

GetName
Int32 GetName(wclBluetoothRadio Radio, ref String Name)
The method reads the name of the remote device with using specified Radio. If the method
completes with success it returns WCL_E_SUCCESS.

GetPaired
Int32 GetPaired(wclBluetoothRadio Radio, ref Boolean Paired)
The method checks if the remote Bluetooth device is paired with local Bluetooth Radio.

EnumServices
Int32 EnumServices(wclBluetoothRadio Radio, wclBluetoothServices Services, Guid UUID)
The method enumerates services on the remote device with using specified Radio. The Services
parameter must be a valid wclBluetoothServices object. The method fills it with services list. If
the UUID parameter is null the method enumerates all services. If the UUID parameter is a
services UUID the method enumerates (checks) only specified service.
The method can be used for checking availability of the remote device by querying its services.

Pair
Int32 Pair(wclBluetoothRadio Radio, String PIN)
The method pairs local Bluetooth Radio with the remote device using specified PIN.

Unpair
Int32 Unpair(wclBluetoothRadio Radio)
The method unpairs the local Bluetooth Radio and the remote device.

Assign
void Assign(wclBluetoothDevice Device)
The method copies one instance of the wclBluetoothDevice object into the current one.

DecodeCOD
wclClassOfDevice DecodeCOD(UInt32 COD)
The method decodes COD to readable format.

Properties
Address
String Address
Read-Write

The property contains an address of the remote device.

wclBluetoothDevices
The class represents a list of remote Bluetooth devices.

Methods
Add
void Add(wclBluetoothDevice Device)
The method adds a wclBluetoothDevice object to the list.

Clear
void Clear()
The method clears the list.

Delete
void Delete(UInt32 Index)
The method deletes a wclBluetoothDevice object from the list by its Index.

Assign
void Assign(wclBluetoothDevices Devices)
The method copies one instance of the wclBluetoothDevices class into the current one.

Properties
Count
UInt32 Count
Read-Only
The property returns items count in the list.

Items
wclBluetoothDevice default[UInt32 Index]
Read-Only
The property returns a wclBluetoothDevice object from the list by its Index.

wclBluetoothDiscovery
The class allows your application to enumerate (discover) remote Bluetooth devices.

Methods
Discovery
Int32 Discovery(wclBluetoothRadio Radio, unsigned Byte Timeout)
The method starts discovering for remote Bluetooth devices on the given local Bluetooth radio
module. The Timeout parameter indicates how long discovering should execute.

EnumRadios
Int32 EnumRadios(wclBluetoothRadios Radios)
The method enumerates installed dongles and fills the Radios parameter. The Radios parameter
must be valid wclBluetoothRadios object.

Terminate
Int32 Terminate()
The method terminates discovering procedure.

Properties
Active
Boolean Active
Read-Only
The property returns true if discovering is active.

Events
OnDiscoveryComplete
public class wclBluetoothDiscoveryCompleteEventArgs : public EventArgs
{
public wclBluetoothRadio Radio;
public wclBluetoothDevices Devices;
}
void OnDiscoveryComplete(object sender, wclBluetoothDiscoveryCompleteEventArgs e)
The event fires when discovering for remote devices is completed. The Radio parameter is the
wclBluetoothRadio object indicates a dongle on which discovering was performed. If the
discovering was complete with success the Devices parameter is a valid wclBluetoothDevices
object contains a list of founded devices. If the discovering wad done with error the Devices
parameter is null.

OnDiscoveryStarted
public class wclBluetoothDiscoveryStartedEventArgs : public EventArgs
{
public wclBluetoothRadio Radio;
}
void OnDiscoveryStarted(object sender, wclBluetoothDiscoveryStartedEventArgs e)
The event fires when discovering for remote devices is started. The Radio parameter represents a
dongle on which the discovering is executing.

wclErrors
The class contains all possible error codes:
Constant

Value

WCL_E_SUCCESS

WCL_E_OUT_OF_RESOURCE

WCL_E_INTERNAL

WCL_E_NOT_IMPLEMENTED

WCL_E_FEATURE_NOT_SUPPORTED

WCL_E_INVALID_ARGUMENT

Description
Operation complete
success
Out of system
resources
Low-level driver
internal error
Feature is not
implemented yet
Feature is not
supported
Invalid argument

WCL_E_API_LOADED

10

WCL_E_API_EXIST

11

WCL_E_API_NOT_LOADED

12

WCL_E_TRANSPORT_NOT_AVAILABLE

13

WCL_E_BLUETOOTH_API_NOT_AVAILABLE

14

WCL_E_DISCOVERY_NOT_STARTED

20

WCL_E_DISCOVERY_ACTIVE

21

WCL_E_ALREADY_PAIRED
WCL_E_AUTHENTICATION_FAILED

30
31

WCL_E_CANCELLED_BY_USER

32

WCL_E_ACCESS_DENIED

33

WCL_E_NOT_CONNECTED

40

WCL_E_CONNECTION_ACTIVE

41

WCL_E_CONNECTION_EXISTS

42

WCL_E_TIMEOUT

43

WCL_E_SERVICE_NOT_FOUND

44

WCL_E_UNABLE_CONNECT

45

WCL_E_CONNECTION_REJECTED

46

WCL_E_CONNECTION_TERMINATED

47

Transports and APIs is


already loaded
Other instance of the
wclAPIX already
exists and is loaded
Transports and APIs is
not loaded
Specified transport is
not available
Specified Bluetooth
API is not available
Discovery operation
was not started when
the application called
Terminate method
Discovery operation is
active
Device already paired
Authentication failed
Operation was
cancelled by remote
device or remote
devices user
Access denied by
remote device
There is no active
connection to the
remote device
Connection is active
Connection already
exists
Time out
Specified service was
not found on target
device or is not
supported
Unable to connect to
remote device.
Unknown internal error
in low-level driver
Remote device rejected
the connection request
Connection was closed
by remote device
during OBEX
operation (device is out

of range or turned off)


WCL_E_OBEX_ACTIVE

100

WCL_E_OBEX_OPERATION_IN_PROGRESS

101

WCL_E_OBEX_NOT_ACTIVE

102

WCL_E_OBEX_NO_CONTENT

103

WCL_E_OBEX_OPERATION_NOT_ACTIVE

104

WCL_E_OBEX_RESET_CONTENT
WCL_E_OBEX_NON_AUTHORITATIVE
WCL_E_OBEX_PARTIAL_CONTENT
WCL_E_OBEX_MULTIPLE_CHOISES
WCL_E_OBEX_MOVED_PERMANENTLY
WCL_E_OBEX_MOVED_TEMPORARY
WCL_E_OBEX_SEE_OTHER
WCL_E_OBEX_NOT_MODIFIED
WCL_E_OBEX_USE_PROXY
WCL_E_OBEX_BAD_REQUEST
WCL_E_OBEX_UNAUTHORIZED
WCL_E_OBEX_PAYMENT_REQUIRED
WCL_E_OBEX_FORBIDDEN
WCL_E_OBEX_NOT_FOUND
WCL_E_OBEX_METHOD_NOT_ALLOWED
WCL_E_OBEX_NOT_ACCEPTABLE
WCL_E_OBEX_PROXY_AUTHENTICATION_REQUIRED
WCL_E_OBEX_REQUEST_TIME_OUT
WCL_E_OBEX_CONFLICT
WCL_E_OBEX_GONE
WCL_E_OBEX_LENGTH_REQUIRED
WCL_E_OBEX_PRECONDITION_FAILED
WCL_E_OBEX_REQUIESTED_ENTITY_TOO_LARGE
WCL_E_OBEX_REQUEST_URL_TOO_LARGE
WCL_E_OBEX_UNSUPPORTED_MEDIA_TYPE
WCL_E_OBEX_INTERNAL_SERVER_ERROR
WCL_E_OBEX_NOT_IMPLEMENTED
WCL_E_OBEX_BAD_GATEWAY
WCL_E_OBEX_SERVICES_UNAVAILABLE
WCL_E_OBEX_GATEWAY_TIME_OUT
WCL_E_OBEX_HTTP_VERSION_NOT_SUPPORTED
WCL_E_OBEX_DATABASE_FULL
WCL_E_OBEX_DATABASE_LOCKED
WCL_E_OBEX_UNKNOWN

105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
199

OBEX session already


established
OBEX operation is in
progress, unable to
start other OBEX
operation
OBEX session was not
established
There is no active
OBEX operation

WCL_E_AUTHENTICATOR_ACTIVE

200

WCL_E_AUTH_UNABLE_REGISTER_CALLBACK

201

WCL_E_USB_MONITOR_ACTIVE

300

WCL_E_PROXIMITY_SENDER_ACTIVE

400

WCL_E_PROXIMITY_SENDER_RUNNING

401

WCL_E_PROXIMITY_INVALID_SEND_RADIO

402

WCL_E_PROXIMITY_INVALID_DISCOVERY_RADIO

403

WCL_E_PROXIMITY_FILE_UNAVAILABLE

404

WCL_E_GSM_ERROR_EXECUTE_AT_COMMAND

500

WCL_E_GSM_UNKNOWN_AT_RESULT

501

WCL_E_GSM_OPERATION_IN_PROGRESS

502

WCL_E_WIFI_MANAGER_ACTIVE

600

WCL_E_WIFI_MANAGER_NOT_ACTIVE

601

WCL_E_WIFI_MANAGER_EXISTS

602

WCL_E_WIFI_MANAGER_NOT_FOUND

603

WCL_E_WIFI_NO_DATA

604

WCL_E_WIFI_UNABLE_SET_CALLBACK

605

wclAuthenticatorX
component is already
opened for specified
API
Unable setup PIN
request handler
USB Monitor is
already active
Proximity Sender is
running
Other instance of the
wclProximitySenderX
component is already
running on the same
radio
Send Radio was not
specified
Discovery Radio was
not specified
The specified file is not
available or Proximity
Sender cannt read the
file
General error while
executing AT
command
Unknown response on
AT command
Other AT command is
executing
WiFi Manager is
already active
(Opened)
WiFi Manager is not
active (Opened)
Other instance of the
wclWiFiManager is
already active
WiFi Manager was not
found
Operation was
completed with success
but no data was
returned
Unable to set callback
function for WiFi
notifications

WCL_E_MONITORING_ACTIVE

wclIrDADevice
The class represents an IrDA device.

Properties
Name
String Name
Read-Only
The property contains the name of an IrDA device.

Address
String Address
Read-Only
The property contains the address of an IrDA device.

wclIrDADevices
The class represents a list of IrDA devices.

Methods
Add
void Add(wclIrDADevice Device)
The method adds Device to the list.

Clear
void Clear()

700

Monitoring for serial


devices is already
started

The method clears the list.

Delete
void Delete(UInt32 Index)
The method deletes a device from the list by its Index.

Properties
Count
UInt32 Count
Read-Only
The property returns items count in the list.

Items
wclIrDADevice default[UInt32 Index]
Read-Only
The property returns wclIrDADevice object from the list by its Index.

wclIrDADiscovery
The class allows your application to discover IrDA devices.

Methods
Discovery
Int32 Discovery()
The method starts discovering for IrDA devices.

Terminate
Int32 Terminate()

The method terminates discovering for IrDA devices.

Properties
Active
Boolean Active
Read-Only
The property returns true if discovering is executing.

Events
OnComplete
public class wclIrDACompleteEventArgs : public EventArgs
{
public wclIrDADevices Devices;
}
void OnComplete(object sender, wclIrDACompleteEventArgs e)
The event fires when discovering is completed. The Devices parameter is a valid
wclIrDADevices list with founded devices. If the method completes with error then Devices
parameter is null.

OnStarted
void OnStarted(object sender, EventArgs e)
The event fires when discovering was started.

wclSerialDevice
The class represents serial port.

Properties
FriendlyName

String FriendlyName
Read-Only
The property returns a serial port friendly name (as it shown in Device Manager)

Modem
Boolean Modem
Read-Only
The property returns true if this serial port is associated with modem.

Port
UInt32 Port
Read-Only
The property returns a serial port number.

wclSerialDevices
The class represents a list of serial ports.

Methods
Add
void Add(wclSerialDevice Device)
The method adds a device to the list.

Clear
void Clear()
The method clears the list.

Delete
void Delete(UInt32 Index)

The method deletes a device from the list by its Index.

Properties
Count
UInt32 Count
Read-Only
The property returns devices count in the list.

Items
wclSerialDevice default[UInt32 Index]
Read-Only
The property returns a device from the list by its index.

wclSerialDiscovery
The class enumerates serial ports on PC.

Methods
EnumDevices
Int32 EnumDevices(wclSerialDevices Devices)
The method enumerates serial ports and fills the Devices list with wclSerialDevice objects. The
Devices parameter must be a valid wclSerialDevices object.
If the method completes with success it returns WCL_E_SUCCESS.

StartMonitoring
Int32 StartMonitoring()
The method starts monitoring for serial devices.

Stop Monitoring
void StopMonitoring()
The method stops monitoring for serial devices.

Properties
Monitoring
Boolen Monitoring
Read-Only
Returns True if monitoring is active.

Events
OnStarted
void OnStarted(object sender, EventHandler e)
The event fires when monitoring is started.

OnStopped
void OnStopped(object sender, EventHandler e)
The event fires when monitoring is stopped.

OnFound
public class wclSerialDeviceEventArgs public EventArgs
{
public:
wclSerialDevice Device;
};
void OnFound(object sender, wclSerialDeviceEventArgs e)
The event fires when new serial device is found.

OnLost

public class wclSerialDeviceEventArgs public EventArgs


{
public:
wclSerialDevice Device;
};
void OnLost(object sender, wclSerialDeviceEventArgs e)
The event fires when old serial device is lost.

wclBuffers
The class represents read and write buffers used for communication. Application must never
create object of this class and must never dispose objects of this class returned by reading
properties of other classes.

Properties
ReadBuffer
UInt32 ReadBuffer
Read-Write
The property manages a size of a read buffer size.

WriteBuffer
UInt32 WriteBuffer
Read-Write
The property manages a size of a write buffer.

wclClientBluetoothParams
This class manages parameters for a Bluetooth client connection. Application must never create
this class directly.

Properties
Authentication

Boolean Authentication
Read-Write
This property sets authentication mode for the connection. If Authentication is true then
connection will require pairing.

Channel
Byte Channel
Read-Write
The property manages the RFCOMM channel number. If it is 0 then component will detect
channel automatically by using services UUID.
If a target device has more than 1 service with the same UUID you must provide correct channel
number to avoid conflict.

Encryption
Boolean Encryption
Read-Write
The property manages connection data encryption.

Address
String Address
Read-Write
The property contains a remote devices address to connect to.

Radio
wclBluetoothRadio Radio
Read-Write
The property contains Radio object used for establish a connection to a target device.
Application must provide correct Radio.

Service

Guid Service
Read-Write
The services UUID in String representation. A client will connect to specified service.

wclClientIrDAParams
The class contains parameters for a IrDA client connection. Application must never create this
class directly.

Properties
NineWire
Boolean NineWire
Read-Write
The property manages NineWire mode for IrDA connection.

Service
String Service
Read-Write
The property contains a IrDA services name.

Address
String Address
Read-Write
The property contains an address of a remote IrDA device to connect to.

wclBaudRate
This enumeration represents a serial port baud rate.
br110
br300
br600

110 baud
300 baud
600 baud

br1200
br2400
br4800
br9600
br14400
br19200
br38400
br56000
br57600
br115200
br128000
br256000
brCustom

1200 baud
2400 baud
4800 baud
9600 baud
14400 baud
19200 baud
38400 baud
56000 baud
57600 baud
115200 baud
128000 baud
256000 baud
Custom baud rate (see
wclClientSerialParams.BaudRateValue
property)

wclByteSize
The enumeration represents a serial port Bytes size.
bs4
bs5
bs6
bs7
bs8

4 bits
5 bits
6 bits
7 bits
8 bits

wclParity
The enumeration represents a serial ports parity.
paNone
paOdd
paEven
paMark
paSpace

None
Odd
Even
Mark
Space

wclStopBits
The enumeration represents a serial ports stop bits.
sb1
sb15
sb2

wclClientSerialParams

1 stop bit
1.5 stop bit
2 stop bits

The class manages parameters for serial client connection. Application must never create this
class directly.

Properties
BaudRate
wclBaudRate BaudRate
Read-Write
The property manages a serial connection baud rate.

BaudRateValue
UInt32 BaudRateValue
Read-Write
The property manages a serial client connection baud rate. The property indicates actual baud
rate. If the BaudRate property set to predefined baud rate (except brCustom) then this property
contains its value (for example: BaudRate = br115200, BaudRateValue = 115200). If this
property contains non standard baud rate, the BaudRate property contains brCustom.

ByteSize
wclByteSize ByteSize
Read-Write
The property manages a serial client connection Byte size.

Parity
wclParity Parity
Read-Write
The property manages serial client connection parity.

Port
UInt32 Port
Read-Write

The property manages a serial port number used for connection.

StopBits
wclStopBits StopBits
Read-Write
The property manages a serial port stop bits.

wclClientState
The enumeration represents a client connection state.
csDisconnected
csConnecting
csConnected
csDisconnecting

Client is disconnected
Client is connecting to a remote device
Client is connected
Client is disconnecting from remote device

wclClientTransport
The enumeration represents a transport used by a client connection.
ctBluetooth
ctIrDA
ctSerial

Bluetooth client connection


IrDA client connection
Serial client connection

wclClient
The class implements a simple client connection.

Methods
Write
Int32 Write(Byte[] Buffer, UInt32 Size)
The method writes data (array of Byte) stored in Buffer parameter to a connection.
If the method completes with success it returns WCL_E_SUCCESS.

Connect
Int32 Connect()
The method connects to a remote device with using specified transport.

Disconnect
void Disconnect()
The method disconnects from a remote device.

Properties
State
wclClientState State
Read-Only
The property contains a clients connection state.

BluetoothParams
wclClientBluetoothParams BluetoothParams
Read-Only
The property contains a wclClientBluetoothParams object which manages properties for
Bluetooth connection.

Buffers
wclBuffers Buffers
Read-Only
The property manages a read and a write buffers used for a data communication.

ConnectTimeout
UInt32 ConnectTimeout
Read-Write

The property manages a connect timeout value (in milliseconds).

IrDAParams
wclClientIrDAParams IrDAParams
Read-Only
The property manages IrDA parameters for a connection.

SerialParams
wclClientSerialParams SerialParams
Read-Only
The property manages serial port parameters for a client connection.

Transport
wclClientTransport Transport
Read-Write
The property manages a transport used for connection.

Events
OnData
public class wclDataEventArgs : public EventArgs
{
public Byte[] Data;
public UInt32 Size;
}
void OnData(object sender, wclDataEventArgs e)
The event fires when data received from remote device. The Buffer parameter is a one
dimension array of Byte.

OnConnect
public class wclConnectEventArgs : public EventArgs
{

public Int32 Error;


}
void OnConnect(object sender, wclConnectEventArgs e)
The event fires when connect to a remote device is established. The Error parameter is
WCL_E_SUCCESS if connection established with success or an error code if connection was
not established.

OnDisconnect
void OnDisconnect(object sender, EventArgs e)
The event fires when remote device disconnects or after call of Disconnect() method.

wclClientOBEXParams
The class represents parameters for OBEX based clients. Application must never create this class
directly.

Properties
PacketSize
UInt16 PacketSize
Read-Write
The property manages the OBEX packet size used on PC side.

Timeout
UInt32 Timeout
Read-Write
The property manages timeout for OpenOBEXSession() and Put() operations in milliseconds.

Target
String Target
Read-Write

The property manages the OBEX TARGET attribute. It may be encoded in two ways: the first
way to use any String to identify the TARGET. The second way is to use GUID. How the
component will use this value depends on TargetAsString property.

TargetAsString
Boolean TargetAsString
Read-Write
If the property is True then the Target property is a simple String. If the property is False then
the Target property is a String representation of GUID.

Who
String Who
Read-Write
The property manages OBEX WHO attribute. It usage depends on WhoAsString propertys
value.

WhoAsString
Boolean WhoAsString
Read-Write
If the property is True then the Who property is a simple String. If the property is False then the
Who property is a String representation of GUID.

wclFileSystemObjectType
The enumeration represents the OBEX file system objects types.
otFile
otFolder

File
Directory (Folder)

wclFileSystemObjectPermission
The enumeration represents file system objects permissions.
opRead
opWrite
opDelete
opCreate

Object can be read


Object can be written
Object can be deleted
Object can be created

opExecute

Object can be executed

Not all devices support permissions and not all permissions are possible for devices.

wclFileSystemObject
The class represents a file system object of remote device.

Methods
CheckPermission
Boolean CheckPermission(wclFileSystemObjectPermission Permission) As Boolean
The method checks the specified Permission and if it exists for the object the method returns
True.

AddPermission
void AddPermission(wclFileSystemObjectPermission Permission)
The method adds the specified Permission to the objects permissions list. Please note that it
does not change any actual objects permissions.

RemovePermission
void RemovePermission(wclFileSystemObjectPermission Permission)
The method removes the specified Permission from the objects permissions list. Please note,
that it does not change any actual objects permissions.

Properties
CreateDateTime
DateTime CreateDateTime
Read-Write
The property contains an objects creation date and time. Note, that not all devices support this
property.

ModifyDateTime
DateTime ModifyDateTime
Read-Write
The property contains an objects modification date and time.

Name
String Name
Read-Write
The property contains an objects name.

ObjectType
wclFileSystemObjectType ObjectType
Read-Write
The property indicates an object type.

Size
UInt32 Size
Read-Write
The property contains an objects size in Bytes (for otFile only).

wclFileSystemObjects
The class represents a file system objects list.

Methods
Add
void Add(wclFileSystemObject FileSystemObject)
The method adds FileSystemObject into the list.

Clear
void Clear()
The method clears the list.

Delete
void Delete(UInt32 Index)
The method deletes a object from the list by its index.

Properties
Count
UInt32 Count
Read-Only
The property returns objects count in the list.

Items
wclFileSystemObject default[UInt32 Index)
Read-Only
The property returns an object from the list by its index.

wclOBEXState
The enumeration represents a state of the OBEX based clients.
osDisconnected
osConnecting
osConnected
osDisconnecting

OBEX session is closed


Opening OBEX session
OBEX session is opened
Closing OBEX session

wclOBEXOperation
The enumeration represents an OBEX operation.
ooNone

No operation is executing

ooOpenSession
ooCloseSession
ooPut
ooGet
ooDelete
ooSetPath
ooMakeDir
ooDir
ooTerminate

Opening OBEX session


Closing OBEX session
Put is executing
Get is executing
Delete is executing
SetPath is executing
Creating directory
Dir is executing
Terminating current operation

wclOPPClient
The class is used for sending data to a target device with using OBEX Object Push Profile.

Methods
Put
Int32 Put(String ObjectName, Stream Stream)
The method send the object represented as a Byte array (Stream parameter) to a target device.
The object will be saved on a target device with ObjectName. The ObjectName parameter
usually is a file name with extension and without path.

Terminate
Int32 Terminate()
The method terminates current sending operation. It works for Put operation only and must be
called only when Put is active.

CloseOBEXSession
Int32 CloseOBEXSession()
The method closes an existing OBEX session.

OpenOBEXSession
Int32 OpenOBEXSession()
The method opens an OBEX session. It is required to open an OBEX session before any other
OBEX operations.

Disconnect
void Disconnect()
The method closes a connection to with a target device.

Connect
Int32 Connect()
The method connects to the target device with using specified transport.

Get
Int32 Get(String ObjectName, String MIME)
The method requests the object with ObjectName from the remote device. The MIME
parameter indicates the content MIME type.

Properties
OBEXParams
wclClientOBEXParams OBEXParams
Read-Only
The property contains the OBEXParams object.

OBEXState
wclOBEXState OBEXState
Read-Only
The property contains the current components state.

OBEXOperation
wclOBEXOperation OBEXOperation
Read-Only
The property returns the currently executing OBEX operation.

Transport
wclClientTransport Transport
Read-Write
The property manages the transport used by the class to connect to a remote device.

SerialParams
wclClientSerialParams SerialParams
Read-Only
The property returns an instance of the wclClientSerialParams object which allows you to
manage settings for serial connection.

IrDAParams
wclClientIrDAParams IrDAParams
Read-Only
The property returns an instance of the wclClientIrDAParams object which allows you to
manage settings for IrDA connection.

ConnectTimeout
UInt32 ConnectTimeout
Read-Write
The property manages connect timeout.

Buffers
wclBuffers Buffers
Read-Only
The property returns an instance of the wclBuffers object which allows you to manage buffers
settings for send and receive operations.

BluetoothParams
wclClientBluetoothParams BluetoothParams

Read-Only
The property returns an instance of the wclClientBluetoothParams object which allows you to
manage settings for Bluetooth connection.

State
wclClientState State
Read-Only
The property returns current state of the component.

Events
OnConnect
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnConnect(object sender, wclConnectEventArgs e)
The event fires when connect to a remote device is established. The Error parameter is
WCL_E_SUCCESS if connection established with success or an error code if connection was
not established.

OnDisconnect
void OnDisconnect(object sender, EventArgs e)
The event fires when remote device disconnects or after call of Disconnect() method.

OnOBEXProgress
public class wclOBEXProgressEventArgs : public EventArgs
{
public UInt32 Position;
public UInt32 Size;
}
void OnOBEXProgress(object sender, wclOBEXProgressEventArgs e)

The event fires during Put or Get operations. The Position parameter indicates a current position
in a transferring object (in Bytes), the Size parameter is a complete objects size (in Bytes).

OnOBEXPutComplete
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnOBEXPutComplete(object sender, wclConnectEventArgs e)
The event fires when Put operation is completed. The Error parameter indicates an operation
result code.

OnOBEXDisconnect
void OnOBEXDisconnect(object sender, EventArgs e)
The event fires when an OBEX session is closed.

OnOBEXConnect
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnOBEXConnect(object sender, wclConnectEventArgs e)
The event fires when an OBEX session is established (with or without success). The Error
parameter indicates an operations result code.

OnOBEXGetComplete
public class wclOBEXGetCompleteEventArgs : public EventArgs
{
public MemoryStream Stream;
public Int32 Error;
}
void OnOBEXGetComplete(object sender, wclOBEXGetCompleteEventArgs e)
The event fires when a GET operation is completed (with or without success). The Error
parameter indicates an operations result. The Stream parameter contains an objects data stream
as a Byte array. If the Error parameter is not WCL_E_SUCCESS then the Stream parameter is
invalid and can not be used.

wclFTPClient
The class is used for managing files on a target device with using OBEX File Transfer Profile.

Methods
Put
Int32 Put(String ObjectName, Stream Stream)
The method send the object represented as a Byte array (Stream parameter) to a target device.
The object will be saved on a target device with ObjectName. The ObjectName parameter
usually is a file name with extension and without path.

Terminate
Int32 Terminate()
The method terminates current sending operation. It works for Put operation only and must be
called only when Put is active.

CloseOBEXSession
Int32 CloseOBEXSession()
The method closes an existing OBEX session.

OpenOBEXSession
Int32 OpenOBEXSession()
The method opens an OBEX session. It is required to open an OBEX session before any other
OBEX operations.

Disconnect
void Disconnect()
The method closes a connection to with a target device.

Connect
Int32 Connect()

The method connects to the target device with using specified transport.

Get
Int32 Get(String ObjectName, String MIME)
The method requests the object with ObjectName from the remote device. The MIME
parameter indicates the content MIME type.

Delete
Int32 Delete(String ObjectName)
The method deletes an object with ObjectName.

Dir
Int32 Dir()
The method enumerates files and directories on a remote device.

MakeDir
Int32 MakeDir(String ObjectName)
Call this method to create new directory on a target device. The ObjectName parameter is a
name of a new directory. If a directory is created with success then it becomes a current
directory.

SetPath
Int32 SetPath(String ObjectName)
The method changes a current directory to new one specified as the ObjectName parameter.
You should know that OBEX does not support paths. You have to change current directly one
by one. You may use predefined directories names, like: .. moves one level up, . moves
to a root directory.

Properties
OBEXParams
wclClientOBEXParams OBEXParams

Read-Only
The property contains the OBEXParams object.

OBEXState
wclOBEXState OBEXState
Read-Only
The property contains the current components state.

OBEXOperation
wclOBEXOperation OBEXOperation
Read-Only
The property returns the currently executing OBEX operation.

Transport
wclClientTransport Transport
Read-Write
The property manages the transport used by the class to connect to a remote device.

SerialParams
wclClientSerialParams SerialParams
Read-Only
The property returns an instance of the wclClientSerialParams object which allows you to
manage settings for serial connection.

IrDAParams
wclClientIrDAParams IrDAParams
Read-Only
The property returns an instance of the wclClientIrDAParams object which allows you to
manage settings for IrDA connection.

ConnectTimeout
UInt32 ConnectTimeout
Read-Write
The property manages connect timeout.

Buffers
wclBuffers Buffers
Read-Only
The property returns an instance of the wclBuffers object which allows you to manage buffers
settings for send and receive operations.

BluetoothParams
wclClientBluetoothParams BluetoothParams
Read-Only
The property returns an instance of the wclClientBluetoothParams object which allows you to
manage settings for Bluetooth connection.

State
wclClientState State
Read-Only
The property returns current state of the component.

Events
OnConnect
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnConnect(object sender, wclConnectEventArgs e)

The event fires when connect to a remote device is established. The Error parameter is
WCL_E_SUCCESS if connection established with success or an error code if connection was
not established.

OnDisconnect
void OnDisconnect(object sender, EventArgs e)
The event fires when remote device disconnects or after call of Disconnect() method.

OnOBEXProgress
public class wclOBEXProgressEventArgs : public EventArgs
{
public UIint32 Position;
public UInt32 Size;
}
void OnOBEXProgress(object sender, wclOBEXProgressEventArgs e)
The event fires during Put or Get operations. The Position parameter indicates a current position
in a transferring object (in Bytes), the Size parameter is a complete objects size (in Bytes).

OnOBEXPutComplete
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnOBEXPutComplete(object sender, wclConnectEventArgs e)
The event fires when Put operation is completed. The Error parameter indicates an operation
result code.

OnOBEXDisconnect
void OnOBEXDisconnect(object sender, EventArgs e)
The event fires when an OBEX session is closed.

OnOBEXConnect
public class wclConnectEventArgs : public EventArgs
{

public Int32 Error;


}
void OnOBEXConnect(object sender, wclConnectEventArgs e)
The event fires when an OBEX session is established (with or without success). The Error
parameter indicates an operations result code.

OnOBEXGetComplete
public class wclOBEXGetCompleteEventArgs : public EventArgs
{
public MemoryStream Stream;
public Int32 Error;
}
void OnOBEXGetComplete(object sender, wclOBEXGetCompleteEventArgs e)
The event fires when the GET operation is completed (with or without success). The Error
parameter indicates an operations result. The Stream parameter contains an objects data stream
as a Byte array. If the Error parameter is not WCL_E_SUCCESS then the Stream parameter is
invalid and can not be used.

OnOBEXDeleteComplete
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnOBEXDeleteComplete(object sender, wclConnectEventArgs e)
The event fires when the Delete operation is completed. The Error parameter indicates an
operations result code.

OnOBEXDirComplete
public class wclOBEXDirCompleteEventArgs : public EventArgs
{
public wclFileSystemObjects Objects;
public Int32 Error;
}
void OnOBEXDirComplete(object sender, wclOBEXDirCompleteEventArgs e)
The event fires when the Dir operation is completed. The Objects parameter is a file systems
objects list. The Error parameter indicates a result code of the operation. If the Error parameter
is not WCL_E_SUCCESS then the Objects parameter is not valid and can not be used.

OnOBEXMakeDirComplete
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnOBEXMakeDirComplete(object sender, wclConnectEventArgs e)
The event fires when the MakeDir operation is completed. The Error parameter contains an
operations result code.

OnOBEXSetPathComplete
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnOBEXSetPathComplete(object sender, wclConnectEventArgs e)
The event fires when the SetPath operation is completed. The Error parameter contains a result
of the operation.

wclAuthenticator
This object is used for handling authentication (PIN) requests. wclAuthenticator supports
BlueSoileil, Microsoft and partially Toshiba Bluetooth stacks. You can use more than 1 instance
of this object in your applications. Each instance must run for different radios.

Methods
Open
Int32 Open()
The method starts PIN requests handling for specified radio.

Close
void Close()
The method stops PIN requests handling for specified radio.

Properties
Active
Boolean Active
Read-Only
The property returns true if wclAuthenticator is active and handling PIN requests.

Radio
wclBluetoothRadio Radio
Read-Write
The property manages Radio object on which handling should run.

Events
OnPINRequest
public class wclPINRequestEventArgs : public EventArgs
{
public wclBluetoothDevice Device;
public String PIN;
}
void OnPINRequest(object sender, wclPINRequestEventArgs e )
The event fires when a remote (or local) device requires authentication (PIN). The Device
parameter is a wclBluetoothDevice instance represents remote device which asks for PIN.
Application must provide PIN as the PIN parameter. This PIN will be send to device for
authentication.

wclProximitySender
The wclProximitySender object is used for developing Bluetooth Proximity Marketing
applications. It implements all the things required for such applications as:

discovering devices;
managing processed devices;
managing files for send
parallel (concurrent) connections to several devices at the same time;
controlling operation process;

controlling result for each send operation.

Methods
Start
Int32 Start()
The method starts sending process

Stop
void Stop()
The method stops sending process

Properties
Timeout
Byte Timeout
Read-Write
The property controls a connect timeout (in seconds).

SleepInterval
Byte SleepInterval
Read-Write
The property controls interval between each sending loop (sending loop includes discovering for
devices and sending files to it). The value must be in seconds.

SendDelay
Byte SendDelay
Read-Write
The property controls a delay (in seconds) between discovering for the devices is finished and
sending to the devices will be started.

Secure
Boolean Secure
Read-Write
If this property is true then authenticated connection will be used (with PIN). It is recommended
to use wclAuthenticator to handle PIN requests in this case.

MaxConnections
Byte MaxConnections
Read-Write
The property controls a maximum number of concurrent connections. Most dongles can not
work with more than 7 concurrent connections.

DiscoveryTimeout
Byte DiscoveryTimeout
Read-Write
The property controls a maximum time (in seconds) for discovering remote devices.

SendRadio
wclBluetoothRadio SendRadio
Read-Write
The property manages the local radio which should be used for sending files. It is possible to use
the same radio for sending and discovering. Or you may use different radios.

DiscoveryRadio
wclBluetoothRadio DiscoveryRadio
Read-Write
The property manages the local radio which should be used for discovering. It is possible to use
the same radio for sending and discovering. Or you may use different radios.

Active

Boolean Active
Read-Only
The property returns true if wclProximitySender is active and discovering/sending.

Events
OnStopSleep
void OnStopSeep(object sender, EventArgs e)
The event fires when sleep interval is expired.

OnStopped
void OnStopped(object sender, EventArgs e)
The event fires when sending is stopped.

OnStopDelay
void OnStopDelay(object sender, EventArgs e)
The event fires when delay interval is expired.

OnStartSleep
void OnStartSleep(object sender, EventArgs e)
The event fires when sleep is started.

OnStarted
void OnStarted(object sender, EventArgs e)
The event fires when sending is started.

OnStartDeay
void OnStartDelay(object sender, EventArgs e)
The event fires when delay is started.

OnSendStart
public class wclFileSendStartedEventArgs : public EventArgs
{
public wclBluetoothDevice Device;
public String FileName;
}
void OnSendStarted(object sender, wclFileSendStartedEventArgs e )
The event fires when sending to a device is started. The Device parameter represents a
processing device.

OnSendComplete
public class wclFileSendCompleteEventArgs : public EventArgs
{
public wclBluetoothDevice Device;
public String FileName;
public Int32 Error;
}
void OnSendComplete(object sender, wclFileSendCompleteEventArgs e)
The event fires when sending to a device is complete. The Device parameter represents a
processed device and the Error parameter contains the result code.

OnProgress
public class wclSendProgressEventArgs : public EventArgs
{
public wclBluetoothDevice Device;
public String FileName;
public UInt32 Position;
public UInt32 Size;
}
void OnProgress(object sender, wclSendProgressEventArg e)
The event fires during sending a file to a device. The Device parameter represents a target
device, the FileName parameter is a name of a sending file, the Position parameter is a current
position of file (in Bytes) and the Size parameter is a files size (in Bytes).

OnGetFiles
public class wclGetFilesEventArgs : public EventArgs
{
public wclBluetoothDevice Device;

public List< String> Files;


}
void OnGetFiles(object sender, wclGetFilesEventArgs e )
The event fires when the Proximity Sender requires a files list for a device. The Device
parameter represents a target device and the Files parameter is an empty files list. An application
must fill the list with full path to the files which the Proximity Sender must send to device.

OnFileSendStarted
public class wclFileSendStartedEventArgs : public EventArgs
{
public wclBluetoothDevice Device;
public String FileName;
}
void OnFileSendStarted(object sender, wclFileSendStartedEventArgs e)
The event fires when the Proximity Sender started sending file to a device. The Device
parameter represents a target device and the FileName is the name of a sending file.

OnFileSendComplete
public class wclFileSendCompleteEventArgs : public EventArgs
{
public wclBluetoothDevice Device;
public String FileName;
public Int32 Error;
}
void OnFileSendComplete(object sender, wclFileSendCompleteEventArgs e )
The event fires when a specified file has been sent to a device. The Device parameter represents
a target device, the FileName parameter is the name of a sent file and the Error parameter is a
result code.

OnDiscoveryStarted
void OnDiscoveryStarted(object sender, EventArgs e)
The event fires when the Proximity Sender starts discovering for remote devices.

OnDiscoveryComplete
void OnDiscoveryComplete(object sender, EventArgs e)
The event fires when the Proximity Sender discovered remote devices.

OnDevicesFound
public class wclDevicesFoundEventArgs : public EventArgs
{
public wclBluetoothDevices Devices;
}
void OnDevicesFound(object sender, wclDevicesFoundEventArgs e)
The event fires to notify an application about discovered devices.

OnAcceptDevice
public class wclAcceptDeviceEventArgs : public EventArgs
{
public wclBluetoothDevice^ Device;
public Boolean Accept;
}
void OnAcceptDevice(object sender, wclAcceptDeviceEventArgs e)
The event fires when the Proximity Sender is building a devices list. An application must set
Accept = true if sending to device is required, or Accept = false when the Proximity Sender
must skip device.

wclServerTransport
The enumeration represents a transport used by a server connection.
stBluetooth
stIrDA

Bluetooth server connection


IrDA server connection

wclServerState
The enumeration represents a server connection state.
ssClosed
ssOpening
ssListen
ssConnected
ssDisconnecting
ssClosing

Server is closed
Server is opening
Server is listening (waiting for client
connection)
Client is connected to server
Client is disconnecting from server
Server is closing

wclServerBluetoothParams
This class manages parameters for a Bluetooth server connection. Application must never create
this class directly.

Properties
Authentication
Boolean Authentication
Read-Write
This property sets authentication mode for the connection. If Authentication is true then
connection will require pairing.

Channel
Byte Channel
Read-Write
The property manages the RFCOMM channel number. If it is 0 then component will use autogenerated channel number. It is recommended to use 0.

Encryption
Boolean Encryption
Read-Write
The property manages connection data encryption.

Radio
wclBluetoothRadio Radio
Read-Write
The property contains Radio object used for waiting a connection from a target device.
Application must provide correct Radio.

Service
Guid Service

Read-Write
The services UUID. A client will connect to this service.

Name
String Name
Read-Write
The services name. Can be empty.

wclServerIrDAParams
The class contains parameters for a IrDA server connection. Application must never create this
class directly.

Properties
NineWire
Boolean NineWire
Read-Write
The property manages NineWire mode for IrDA connection.

Service
String Service
Read-Write
The property contains an IrDA services name.

wclServer
The class implements a simple server.

Methods

Close
void Close()
The method closes the server.

Listen
Int32 Listen()
The method opens server for incoming connection.

Write
Int32 Write(Byte[] Buffer, UInt32 Size)
The method writes data (array of Byte) stored in Buffer parameter to a connection.

Properties
Address
String Address
Read-Only
When remote device (client) is connected to the server the property contains a remote devices
address.

DeviceName
String DeviceName
Read-Only
When remote device (client) is connected to the server the property contains a remote devices
name.

State
wclServerState State
Read-Only
The property contains the servers state.

BluetoothParams
wclServerBluetoothParams BluetoothParams
Read-Only
The property returns an instance of wclServerBluetoothParams object which allows managing
settings for Bluetooth server.

IrDAParams
wclServerIrDAParams IrDAParams
Read-Only
The property returns an instance of wclServerIrDAParams object which allows to manage
settings for IrDA server.

Transport
wclServerTransport Transport
Read-Write
The property manages servers transport.

Buffers
wclBuffers Buffers
Read-Only
The property manages a read and a write buffers used for a data communication.

Events
OnClosed
void OnClosed(object sender, EvetArgs e)
The event fires when server is closed.

OnConnected
void OnConnected(object sender, EventArgs e)
The event fires when a remote device (client) is connected to the server.

OnDisconnected
void OnDisconnected(object sender, EventArgs e)
The event fires when a remote device (client) is disconnected from the server.

OnListen
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnListen(object sender, wclConnectEventArgs e)
The event fires when server is ready for listen (wait) for incoming connection. The Error
parameter contains a result code.

OnData
public class wclDataEventArgs : public EventArgs
{
public Byte[] Data;
public UInt32 Size;
}
void OnData(object sender, wclDataEventArgs e)
The event fires when data received from remote device. The Buffer parameter is a one
dimension array of Byte.

wclOPPServer
The class allows you to create a server which will receive files from client (phone or any other
device) over Bluetooth or IrDA.

Methods

Close
void Close()
The method closes the server.

Listen
Int32 Listen()
The method opens server for incoming connection.

Terminate
Int32 Terminate()
The method terminates current transferring operation.

Properties
Address
String Address
Read-Only
When remote device (client) is connected to the server the property contains a remote devices
address.

DeviceName
String DeviceName
Read-Only
When remote device (client) is connected to the server the property contains a remote devices
name.

State
wclServerState State
Read-Only
The property contains the servers state.

BluetoothParams
wclServerBluetoothParams BluetoothParams
Read-Only
The property returns an instance of wclServerBluetoothParams object which allows to manage
settings for Bluetooth server.

IrDAParams
wclServerIrDAParams IrDAParams
Read-Only
The property returns an instance of wclServerIrDAParams object which allows to manage
settings for IrDA server.

Transport
wclServerTransport Transport
Read-Write
The property manages servers transport.

Buffers
wclBuffers Buffers
Read-Only
The property manages a read and a write buffers used for a data communication.

ObjectName
String ObjectName
Read-Only
The property contains a name of currently transferring (receiving) object (file).

Events

OnClosed
void OnClosed(object sender, EventArgs e)
The event fires when server is closed.

OnConnected
void OnConnected(object sender, EventArgs e)
The event fires when a remote device (client) is connected to the server.

OnDisconnected
void OnDisconnected(object sender, EventArgs e)
The event fires when a remote device (client) is disconnected from the server.

OnListen
public class wclConnectEventArgs : public EventArgs
{
public Int32 Error;
}
void OnListen(object sender, wclConnectEventArgs e)
The event fires when server is ready for listen (wait) for incoming connection. The Error
parameter contains a result code.

OnOBEXProgress
public class wclOBEXProgressEventArgs : public EventArgs
{
public UInt32 Position;
public UInt32 Size;
}
void OnOBEXProgress(object sender, wclOBEXProgressEventArgs e)
The event fires during receiving an object. The Position parameter indicates a current position in
a transferring object (in Bytes), the Size parameter is a complete objects size (in Bytes).

OnOBEXObjectReceived
public class wclOBEXObjectReceivedEventArgs : public EventArgs

{
public MemoryStream Stream;
public String ObjectName;
}
void OnOBEXObjectReceived(object sender, wclOBEXObjectReceivedEventArgs e)
The event fires when an object received. The ObjectName is an objects name. The Stream
parameter contains an objects data (as Bytes array).

wclClassOfDevice
The enumeration represents a COD (Class Of Device) into readable format.

Miscellaneous
codMisc

Computers
codComputer
codDesktop
codServer
codLaptop
codHandheld
codPalm
codWearable

Phones
codPhone
codCellurar
codCordLess
codSmart
codWiredModem
codISDN

Audio
codAudio
codHeadSet
codHandsFree
codHeadSetHandsFree
codMicrophone
codLoudspeaker
codHeadphones

codPortableAudio
codCarAudio
codSetTopBox
codHiFiAudio
codVCR
codVideoCamera
codCamcoder
codVideoMonitor
codDisplayLoudspeaker
codDisplayConferencing
codGamingToy

Peripheral
codPeripheral
codJoystick
codGamepad
codRemoteControl
codSensing
codDigitizerTablet
codCardReader
codKeyboard
codPointer

Imaging
codDisplay
codCamera
codScanner
codPrinter
codImaging

Wearable
codWristWatch
codPager
codJacket
codHelmet
codGlasses
codWearableOther

Toy
codRobot
codVehicle
codDollActionFigure
codController

codGame
codToy

LAN
codLAN

Others
codUnknown

Potrebbero piacerti anche