DataSource for C SDK  7.1.28.98838-0467ac22
ds5_connectionlistener_t Struct Reference

Implement this interface to receive connection status information when using the DSv5 API. More...

Data Fields

void(* peer_status )(void *context, int peer_index, const char *peer_name, int state)
 Callback invoked when the state of a DataSource peer changes. More...
 
void(* service_status )(void *context, const char *service_name, int state)
 Callback invoked when the state of a Data Service changes. More...
 

Detailed Description

Implement this interface to receive connection status information when using the DSv5 API.

Call the ds5_add_connectionlistener() function to register your implementation with the DataSource library.

Note
Each callback method is a finction defined in a data field of the ds5_connectionlistener_t structure. You only need to impelemnt the methods that are of interest to your DataSource application. You do not need to implement any methods of the interface if your application doesn't need to know about connection status changes.
See also
ds5_add_connectionlistener()

Field Documentation

void(* ds5_connectionlistener_t::peer_status) (void *context, int peer_index, const char *peer_name, int state)

Callback invoked when the state of a DataSource peer changes.

Parameters
context- The callback context that was supplied to ds5_add_connectionlistener().
peer_index- The index of the peer that has changed state.
peer_name- The name of peer that has changed state.
state- The state of the peer.

The value of the state parameter will be one of DS_MSG_CONNECT or DS_MSG_DISCONNECT

void(* ds5_connectionlistener_t::service_status) (void *context, const char *service_name, int state)

Callback invoked when the state of a Data Service changes.

Parameters
context- The callback context that was supplied to ds5_add_connectionlistener().
service_name= The name of the service that has changed state.
state- The new state of the service

The value of the state parameter is oone of SVC_STATUS_OK, SVC_STATUS_DOWN or SVC_STATUS_LIMITED.


Generated on Fri Jan 20 2023 17:49:17 for DataSource for C SDK