KNX IoT
KNX IoT Point API stack implementation
oc_session_events.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) 2018 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
20 #ifndef OC_SESSION_EVENTS_H
21 #define OC_SESSION_EVENTS_H
22 
23 #include "oc_endpoint.h"
25 #include "util/oc_process.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 typedef enum {
39 
47 typedef void (*session_event_handler_t)(const oc_endpoint_t *endpoint,
48  oc_session_state_t state);
49 
53 typedef struct oc_session_event_cb
54 {
55  struct oc_session_event_cb *next;
58 
59 OC_PROCESS_NAME(oc_session_events);
60 
67 
74 
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* OC_SESSION_EVENTS_H */
end point implementation, e.g.
OC_PROCESS_NAME(oc_network_events)
process network events
platform abstraction of networking events (mutexes)
void oc_session_end_event(oc_endpoint_t *endpoint)
session end event
void oc_session_start_event(oc_endpoint_t *endpoint)
session start event
void oc_session_events_set_event_delay(int secs)
set delay for events
void(* session_event_handler_t)(const oc_endpoint_t *endpoint, oc_session_state_t state)
Callback function to pass the session event information to the Application.
struct oc_session_event_cb oc_session_event_cb_t
Structure to manage session event handler list.
oc_session_state_t
session states
@ OC_SESSION_DISCONNECTED
session disconnected
@ OC_SESSION_CONNECTED
session connected
the endpoint information
Definition: oc_endpoint.h:78
Structure to manage session event handler list.