Example
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
CDeviceLocator.h File Reference
#include "Capsule/CClient.h"
#include "Capsule/CDefinesPrivate.h"
#include "Capsule/CDeviceInfoList.h"
Include dependency graph for CDeviceLocator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum clCDeviceLocatorFailReason clCDeviceLocatorFailReason
 Device locator error.
 
typedef void(* clCDeviceLocatorHandlerDeviceInfoList) (clCDeviceLocator, clCDeviceInfoList, clCDeviceLocatorFailReason)
 

Enumerations

enum  clCDeviceLocatorFailReason { clC_DeviceLocatorFailReason_OK = 0 , clC_DeviceLocatorFailReason_BluetoothDisabled , clC_DeviceLocatorFailReason_Unknown }
 Device locator error. More...
 

Functions

 CLC_CLASS_WN (DeviceLocatorPrivate, clCDeviceLocator)
 Device locator.
 
 CLC_STRUCT (clCDeviceLocatorDelegateDeviceInfoList)
 Device callback for the list of device info.
 
CL_DLL void clCDeviceLocatorDelegateDeviceInfoList_Set (clCDeviceLocatorDelegateDeviceInfoList delegate, clCDeviceLocatorHandlerDeviceInfoList callback) NOEXCEPT
 
CL_DLL clCDeviceLocator clCClient_ChooseDeviceType (clCClient client, clCDeviceType deviceType) NOEXCEPT
 
CL_DLL void clCDeviceLocator_Destroy (clCDeviceLocator locator) NOEXCEPT
 
CL_DLL void clCDeviceLocator_RequestDevices (clCDeviceLocator locator, int32_t searchTime) NOEXCEPT
 Find available devices. Search time is in seconds. Non-blocking - OnDevices event is fired when timeout expires.
 
CL_DLL clCDeviceLocatorDelegateDeviceInfoList clCDeviceLocator_GetOnDevicesEvent (clCDeviceLocator locator) NOEXCEPT
 

Typedef Documentation

◆ clCDeviceLocatorFailReason

Device locator error.

◆ clCDeviceLocatorHandlerDeviceInfoList

typedef void(* clCDeviceLocatorHandlerDeviceInfoList) (clCDeviceLocator, clCDeviceInfoList, clCDeviceLocatorFailReason)

Enumeration Type Documentation

◆ clCDeviceLocatorFailReason

Device locator error.

Enumerator
clC_DeviceLocatorFailReason_OK 

No error.

clC_DeviceLocatorFailReason_BluetoothDisabled 

Bluetooth adapter not found or disabled.

clC_DeviceLocatorFailReason_Unknown 

Unknown error.

Function Documentation

◆ CLC_CLASS_WN()

CLC_CLASS_WN ( DeviceLocatorPrivate  ,
clCDeviceLocator   
)

Device locator.

Searches for available devices of chosen type

◆ CLC_STRUCT()

CLC_STRUCT ( clCDeviceLocatorDelegateDeviceInfoList  )

Device callback for the list of device info.

◆ clCClient_ChooseDeviceType()

CL_DLL clCDeviceLocator clCClient_ChooseDeviceType ( clCClient  client,
clCDeviceType  deviceType 
)

Creates locator for Neiry devices of the chosen type.

Parameters
clientclient handle
deviceTypedevice type
Returns
device locator handle

◆ clCDeviceLocator_Destroy()

CL_DLL void clCDeviceLocator_Destroy ( clCDeviceLocator  locator)

Release device locator.

Parameters
locatordevice locator handle

◆ clCDeviceLocator_GetOnDevicesEvent()

CL_DLL clCDeviceLocatorDelegateDeviceInfoList clCDeviceLocator_GetOnDevicesEvent ( clCDeviceLocator  locator)

Get delegate for available devices event.

Parameters
locatordevice locator handle
Returns
device list delegate

◆ clCDeviceLocator_RequestDevices()

CL_DLL void clCDeviceLocator_RequestDevices ( clCDeviceLocator  locator,
int32_t  searchTime 
)

Find available devices. Search time is in seconds. Non-blocking - OnDevices event is fired when timeout expires.

Parameters
locatordevice locator handle
searchTimesearch time in seconds

◆ clCDeviceLocatorDelegateDeviceInfoList_Set()

CL_DLL void clCDeviceLocatorDelegateDeviceInfoList_Set ( clCDeviceLocatorDelegateDeviceInfoList  delegate,
clCDeviceLocatorHandlerDeviceInfoList  callback 
)