IoTivity-Lite
oc_session_events.h File Reference
#include "oc_export.h"
#include "oc_endpoint.h"

Macros

#define OC_ERR_SESSION_EVENT_HANDLER_NOT_FOUND   (-2)
 

Typedefs

typedef void(* session_event_handler_t) (const oc_endpoint_t *endpoint, oc_session_state_t state)
 Callback function to pass the session event infomation to App. More...
 
typedef void(* session_event_handler_v1_t) (const oc_endpoint_t *endpoint, oc_session_state_t state, void *user_data)
 Callback function to pass the session event infomation to App. More...
 

Enumerations

enum  oc_session_state_t { OC_SESSION_CONNECTED , OC_SESSION_DISCONNECTED }
 session states More...
 

Functions

void oc_session_events_set_event_delay (int secs)
 set delay for events More...
 

Detailed Description

Author
Kishen Maloor
Daniel Adam

Typedef Documentation

◆ session_event_handler_t

typedef void(* session_event_handler_t) (const oc_endpoint_t *endpoint, oc_session_state_t state)

Callback function to pass the session event infomation to App.

Parameters
endpointendpoint info which the session event is happened.
stateenum values in oc_session_state_t.
Note
will be removed with deprecated functions oc_add_session_event_callback and oc_remove_session_event_callback in the future

◆ session_event_handler_v1_t

typedef void(* session_event_handler_v1_t) (const oc_endpoint_t *endpoint, oc_session_state_t state, void *user_data)

Callback function to pass the session event infomation to App.

Parameters
endpointendpoint info which the session event is happened
stateenum values in oc_session_state_t
user_datauser data provided by the user to oc_add_session_event_callback_v1
See also
oc_add_session_event_callback_v1

Enumeration Type Documentation

◆ oc_session_state_t

session states

Enumerator
OC_SESSION_CONNECTED 

session connected

OC_SESSION_DISCONNECTED 

session disconnected

Function Documentation

◆ oc_session_events_set_event_delay()

void oc_session_events_set_event_delay ( int  secs)

set delay for events

Parameters
secsdelay in seconds