|
IoTivity-Lite
|
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 | |
| int | oc_add_session_event_callback (session_event_handler_t cb) |
| Add the callback to receive session event notifications. More... | |
| int | oc_add_session_event_callback_v1 (session_event_handler_v1_t cb, void *user_data) |
| Add the callback to receive session event notifications. More... | |
| int | oc_remove_session_event_callback (session_event_handler_t cb) |
| Remove the callback to receive session event notifications. More... | |
| int | oc_remove_session_event_callback_v1 (session_event_handler_v1_t cb, void *user_data, bool ignore_user_data) |
| Remove the callback with to receive session event notifications. More... | |
| void | oc_session_events_set_event_delay (int secs) |
| set delay for events More... | |
| 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.
| endpoint | endpoint info which the session event is happened. |
| state | enum values in oc_session_state_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.
| endpoint | endpoint info which the session event is happened |
| state | enum values in oc_session_state_t |
| user_data | user data provided by the user to oc_add_session_event_callback_v1 |
| enum oc_session_state_t |
| int oc_add_session_event_callback | ( | session_event_handler_t | cb | ) |
Add the callback to receive session event notifications.
| cb | The callback to be added. Must not be NULL. |
| int oc_add_session_event_callback_v1 | ( | session_event_handler_v1_t | cb, |
| void * | user_data | ||
| ) |
Add the callback to receive session event notifications.
| cb | The callback to be added (cannot be NULL). |
| user_data | user data passed to the callback when invoked |
| int oc_remove_session_event_callback | ( | session_event_handler_t | cb | ) |
Remove the callback to receive session event notifications.
| cb | The callback to be removed. Must not be NULL. |
| int oc_remove_session_event_callback_v1 | ( | session_event_handler_v1_t | cb, |
| void * | user_data, | ||
| bool | ignore_user_data | ||
| ) |
Remove the callback with to receive session event notifications.
| cb | The callback to be removed. |
| user_data | user data provided to the callback by oc_add_session_event_callback_v1 |
| ignore_user_data | ignore user_data and match only the function pointer |
| void oc_session_events_set_event_delay | ( | int | secs | ) |
set delay for events
| secs | delay in seconds |