wcWebCamClient lib  v0.8.2
Library functions and typedefs to set callbacks for client

Typedefs

typedef enum wcCallback wcCallback
 The list of callbacks. More...
 
typedef void(* EmptyNotifyLibFunc) (wcHandle client)
 Notification callback. More...
 
typedef void(* NotifyEventLibFunc) (wcHandle client, void *data)
 Notification callback with an additional data. More...
 
typedef void(* TaskNotifyLibFunc) (wcHandle client, wcTask tsk)
 Notification callback from the specific task. More...
 
typedef void(* ConnNotifyEventLibFunc) (wcHandle client, int state)
 Notification callback that the connection status has been changed. More...
 
typedef void(* CStringNotifyLibFunc) (wcHandle client, const char *value)
 Notification callback that returned a C-style string. More...
 
typedef void(* DataNotifyEventLibFunc) (wcHandle client, wcTask tsk, void *strm)
 Notification callback that returned a wcCustomStream. More...
 
typedef void(* DataAltNotifyEventLibFunc) (wcHandle client, wcTask tsk, void *data, size_t sz)
 Notification callback that returned a sized data buffer. More...
 
typedef void(* JSONStrNotifyEventLibFunc) (wcHandle client, wcTask tsk, const char *jsonStr)
 Notification callback that task is completed and returns a C-style string with a response in JSON format. More...
 

Enumerations

enum  wcCallback {
  wccbkInitCURL =0 , wccbkSuccessAuth , wccbkConnected , wccbkDisconnect ,
  wccbkSIDSetted , wccbkAddLog , wccbkSynchroUpdateTask , wccbkAfterLaunchInStream ,
  wccbkAfterLaunchOutStream , wccbkSuccessIOStream , wccbkSuccessSaveRecord , wccbkSuccessRequestRecord ,
  wccbkSuccessUpdateRecords , wccbkSuccessUpdateDevices , wccbkSuccessUpdateStreams , wccbkSuccessUpdateMsgs ,
  wccbkSuccessSendMsg , wccbkSuccessRequestRecordMeta , wccbkSuccessGetConfig , wccbkSuccessDeleteRecords ,
  wccbkLast
}
 The list of callbacks. More...
 

Functions

wcRCode DLLEXPORT wcSetNotifyCallback (wcHandle client, wcCallback callbackId, NotifyEventLibFunc func)
 Set specified notify callback for client. More...
 
wcRCode DLLEXPORT wcSetTaskCallback (wcHandle client, wcCallback callbackId, TaskNotifyLibFunc func)
 Set specified task notify callback for client. More...
 
wcRCode DLLEXPORT wcSetConnCallback (wcHandle client, ConnNotifyEventLibFunc func)
 Set specified connection notify callback for client. More...
 
wcRCode DLLEXPORT wcSetCStringCallback (wcHandle client, wcCallback callbackId, CStringNotifyLibFunc func)
 Set specified notify callback for client to handling the C-style string values. More...
 
wcRCode DLLEXPORT wcSetAltDataCallback (wcHandle client, wcCallback callbackId, DataAltNotifyEventLibFunc func)
 Set specified notify callback for client to handling the sized data values. More...
 
wcRCode DLLEXPORT wcSetJSONStrCallback (wcHandle client, wcCallback callbackId, JSONStrNotifyEventLibFunc func)
 Set specified notify callback for client to process the JSON-formatted response results represented as a C-style string. More...
 

Detailed Description

Typedef Documentation

◆ wcCallback

typedef enum wcCallback wcCallback

The list of callbacks.

◆ EmptyNotifyLibFunc

typedef void(* EmptyNotifyLibFunc) (wcHandle client)

Notification callback.

Parameters
clientThe client handle.

◆ NotifyEventLibFunc

typedef void(* NotifyEventLibFunc) (wcHandle client, void *data)

Notification callback with an additional data.

Parameters
clientThe client handle.
dataThe additional data.

◆ TaskNotifyLibFunc

typedef void(* TaskNotifyLibFunc) (wcHandle client, wcTask tsk)

Notification callback from the specific task.

Parameters
clientThe client handle.
tskThe task that is the source of the notification.

◆ ConnNotifyEventLibFunc

typedef void(* ConnNotifyEventLibFunc) (wcHandle client, int state)

Notification callback that the connection status has been changed.

Parameters
clientThe client handle.
stateThe connection state value.

◆ CStringNotifyLibFunc

typedef void(* CStringNotifyLibFunc) (wcHandle client, const char *value)

Notification callback that returned a C-style string.

Parameters
clientThe client handle.
valueThe incoming C-style string value.

◆ DataNotifyEventLibFunc

typedef void(* DataNotifyEventLibFunc) (wcHandle client, wcTask tsk, void *strm)

Notification callback that returned a wcCustomStream.

Parameters
clientThe client handle.
tskThe task that is the source of the notification.
strmPointer to the incoming wcCustomStream object.

◆ DataAltNotifyEventLibFunc

typedef void(* DataAltNotifyEventLibFunc) (wcHandle client, wcTask tsk, void *data, size_t sz)

Notification callback that returned a sized data buffer.

Parameters
clientThe client handle.
tskThe task that is the source of the notification.
dataPointer to the incoming buffer.
szThe size of the buffer

◆ JSONStrNotifyEventLibFunc

typedef void(* JSONStrNotifyEventLibFunc) (wcHandle client, wcTask tsk, const char *jsonStr)

Notification callback that task is completed and returns a C-style string with a response in JSON format.

Parameters
clientThe client handle.
tskThe task that is the source of the notification.
jsonStrThe C-style string with a response in JSON format.

Enumeration Type Documentation

◆ wcCallback

enum wcCallback

The list of callbacks.

Enumerator
wccbkInitCURL 

Successful initialization of the multiCURL handle.

See also
wcSetNotifyCallback
wccbkSuccessAuth 

Successful authorization.

This callback is called during wcClientTasksProceed.

See also
wcSetTaskCallback
wccbkConnected 

The connection state has been changed.

See also
wcSetConnCallback
wccbkDisconnect 

Client has been disconnected.

See also
wcSetNotifyCallback
wccbkSIDSetted 

The session id has been changed.

See also
wcSetCStringCallback
wccbkAddLog 

Added new log entry.

See also
wcSetCStringCallback
wccbkSynchroUpdateTask 

The IO streaming task signals that a change has occurred.

This callback is called during wcClientTasksProceed.

See also
wcSetTaskCallback
wccbkAfterLaunchInStream 

Incoming stream started.

See also
wcSetTaskCallback
wccbkAfterLaunchOutStream 

Outgoing stream started.

See also
wcSetTaskCallback
wccbkSuccessIOStream 

IO stream terminated for some reason.

This callback is called during wcClientTasksProceed.

See also
wcSetTaskCallback
wccbkSuccessSaveRecord 

The request to save the media record has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetTaskCallback
wccbkSuccessRequestRecord 

The request to get the media record has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetDataCallback, wcSetAltDataCallback
wccbkSuccessUpdateRecords 

The request to update list of records has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessUpdateDevices 

The request to update list of online devices has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessUpdateStreams 

The request to update list of streaming devices has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessUpdateMsgs 

The request to update list of messages has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessSendMsg 

The request to send message has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessRequestRecordMeta 

The request to get metadata for the media record has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessGetConfig 

The request to get actual config has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkSuccessDeleteRecords 

The request to delete records has been completed.

The response has arrived. This callback is called during wcClientTasksProceed.

See also
wcSetJSONStrCallback, wcSetcJSONCallback, wcSetJSONCallback
wccbkLast 

Function Documentation

◆ wcSetNotifyCallback()

wcRCode DLLEXPORT wcSetNotifyCallback ( wcHandle  client,
wcCallback  callbackId,
NotifyEventLibFunc  func 
)

Set specified notify callback for client.

Acceptable values of the callback id are:
wccbkInitCURL,
wccbkDisconnect.

Parameters
clientThe client handle.
callbackIdThe specified callback id.
funcPointer to callback.
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcCallback
Examples
lib_test/main.cpp, media_test/main.cpp, multithread_test/main.cpp, theora_test/input_strm/main.cpp, and theora_test/output_strm/main.cpp.

◆ wcSetTaskCallback()

wcRCode DLLEXPORT wcSetTaskCallback ( wcHandle  client,
wcCallback  callbackId,
TaskNotifyLibFunc  func 
)

Set specified task notify callback for client.

Acceptable values of the callback id are:
wccbkSuccessAuth,
wccbkSynchroUpdateTask,
wccbkAfterLaunchInStream,
wccbkAfterLaunchOutStream,
wccbkSuccessIOStream,
wccbkSuccessSaveRecord.

Parameters
clientThe client handle.
callbackIdThe specified callback id.
funcPointer to callback.
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcCallback, wcClientTasksProceed
Examples
lib_test/main.cpp, media_test/main.cpp, multithread_test/main.cpp, theora_test/input_strm/main.cpp, and theora_test/output_strm/main.cpp.

◆ wcSetConnCallback()

wcRCode DLLEXPORT wcSetConnCallback ( wcHandle  client,
ConnNotifyEventLibFunc  func 
)

Set specified connection notify callback for client.

Parameters
clientThe client handle.
funcPointer to callback.
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcCallback, wccbkConnected
Examples
lib_test/main.cpp, media_test/main.cpp, theora_test/input_strm/main.cpp, and theora_test/output_strm/main.cpp.

◆ wcSetCStringCallback()

wcRCode DLLEXPORT wcSetCStringCallback ( wcHandle  client,
wcCallback  callbackId,
CStringNotifyLibFunc  func 
)

Set specified notify callback for client to handling the C-style string values.

Acceptable values of the callback id are:
wccbkAddLog,
wccbkSIDSetted.

Parameters
clientThe client handle.
callbackIdThe specified callback id.
funcPointer to callback.
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcCallback
Examples
lib_test/main.cpp, media_test/main.cpp, multithread_test/main.cpp, theora_test/input_strm/main.cpp, and theora_test/output_strm/main.cpp.

◆ wcSetAltDataCallback()

wcRCode DLLEXPORT wcSetAltDataCallback ( wcHandle  client,
wcCallback  callbackId,
DataAltNotifyEventLibFunc  func 
)

Set specified notify callback for client to handling the sized data values.

Acceptable value of the callback id is:
wccbkSuccessRequestRecord.

Parameters
clientThe client handle.
callbackIdThe specified callback id.
funcPointer to callback.
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcCallback, wcClientTasksProceed
Examples
media_test/main.cpp.

◆ wcSetJSONStrCallback()

wcRCode DLLEXPORT wcSetJSONStrCallback ( wcHandle  client,
wcCallback  callbackId,
JSONStrNotifyEventLibFunc  func 
)

Set specified notify callback for client to process the JSON-formatted response results represented as a C-style string.

Acceptable values of the callback id are:
wccbkSuccessUpdateRecords,
wccbkSuccessUpdateDevices,
wccbkSuccessUpdateStreams,
wccbkSuccessUpdateMsgs,
wccbkSuccessRequestRecordMeta,
wccbkSuccessGetConfig,
wccbkSuccessDeleteRecords.

Parameters
clientThe client handle.
callbackIdThe specified callback id.
funcPointer to callback.
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcCallback, wcClientTasksProceed
Examples
lib_test/main.cpp, media_test/main.cpp, multithread_test/main.cpp, and theora_test/input_strm/main.cpp.