Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ext_user_callback.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2016 CyberVision, Inc.
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  */
16 
23 #ifndef EXT_USER_CALLBACK_H_
24 #define EXT_USER_CALLBACK_H_
25 
26 #include "kaa_common.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
33 
34 typedef enum {
41  OTHER = 6
43 
44 
45 
55 typedef kaa_error_t (*on_attached_fn)(void *context, const char *user_external_id, const char *endpoint_access_token);
56 
57 
66 typedef kaa_error_t (*on_detached_fn)(void *context, const char *endpoint_access_token);
67 
68 
77 typedef kaa_error_t (*on_attach_success_fn)(void *context);
78 
88 typedef kaa_error_t (*on_attach_failed_fn)(void *context, user_verifier_error_code_t error_code, const char *reason);
89 
90 
91 
95 typedef struct {
96  void *context;
102 
103 
112 typedef kaa_error_t (*on_endpoint_attached_fn)(void *context, const kaa_endpoint_id_p endpoint_key_hash);
113 
114 
122 typedef kaa_error_t (*on_endpoint_detached_fn)(void *context);
123 
124 
132 typedef kaa_error_t (*on_endpoint_failed_fn)(void *context);
133 
134 
138 typedef struct {
139  void *context;
145 
146 
147 #ifdef __cplusplus
148 } /* extern "C" */
149 #endif
150 
151 #endif /* EXT_USER_CALLBACK_H_ */
kaa_error_t(* on_endpoint_failed_fn)(void *context)
Notifies about attach attempt was failed.
Definition: ext_user_callback.h:132
Definition: ext_user_callback.h:36
Definition: ext_user_callback.h:39
Interface for the endpoint attachment status receiver.
Definition: ext_user_callback.h:138
on_endpoint_attached_fn on_attached
Called when the current endpoint attach another endpoint to the user.
Definition: ext_user_callback.h:140
Common C EP SDK definitions and small utilities.
kaa_error_t(* on_endpoint_detached_fn)(void *context)
Notifies about detach attempt of endpoint was sucssed.
Definition: ext_user_callback.h:122
on_attach_success_fn on_attach_success
Called when the current endpoint was successfully attached to the user.
Definition: ext_user_callback.h:99
kaa_error_t
Definition: kaa_error.h:31
kaa_error_t(* on_attached_fn)(void *context, const char *user_external_id, const char *endpoint_access_token)
Notifies about the successful attachment of the current endpoint to some user.
Definition: ext_user_callback.h:55
Definition: ext_user_callback.h:37
kaa_error_t(* on_detached_fn)(void *context, const char *endpoint_access_token)
Indicates that current endpoint was detached from a user.
Definition: ext_user_callback.h:66
Definition: ext_user_callback.h:38
on_endpoint_detached_fn on_detached
Called when the current endpoint detach another endpoint from the user.
Definition: ext_user_callback.h:141
Definition: ext_user_callback.h:35
on_attach_failed_fn on_attach_failed
Called the attach attempt is failed.
Definition: ext_user_callback.h:100
kaa_error_t(* on_attach_success_fn)(void *context)
Notifies about attach status changes.
Definition: ext_user_callback.h:77
void * context
Context to pass to all functions below.
Definition: ext_user_callback.h:139
on_detached_fn on_detached
Called when the current endpoint was detached from the user by another endpoint.
Definition: ext_user_callback.h:98
user_verifier_error_code_t
Definition: ext_user_callback.h:34
Interface for the user attachment status receiver.
Definition: ext_user_callback.h:95
const uint8_t * kaa_endpoint_id_p
Definition: kaa_common.h:96
on_attached_fn on_attached
Called when the current endpoint was attached to the user by another endpoint.
Definition: ext_user_callback.h:97
Definition: ext_user_callback.h:40
kaa_error_t(* on_endpoint_attached_fn)(void *context, const kaa_endpoint_id_p endpoint_key_hash)
Notifies about attach attempt of endpoint was sucssed.
Definition: ext_user_callback.h:112
kaa_error_t(* on_attach_failed_fn)(void *context, user_verifier_error_code_t error_code, const char *reason)
Notifies about attach attempt was failed.
Definition: ext_user_callback.h:88
on_endpoint_failed_fn on_detach_failed
Called the detach attempt is failed.
Definition: ext_user_callback.h:143
Definition: ext_user_callback.h:41
void * context
Context to pass to all functions below.
Definition: ext_user_callback.h:96
on_endpoint_failed_fn on_attach_failed
Called the attach attempt is failed.
Definition: ext_user_callback.h:142