Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / resource / csdk / connectivity / inc / caleadapter.h
1 /* ****************************************************************
2  *
3  * Copyright 2014 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************/
20
21
22 #ifndef CA_LEADAPTER_H_
23 #define CA_LEADAPTER_H_
24
25 #include "cacommon.h"
26 #include "caadapterinterface.h"
27 #include "cathreadpool.h"
28
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33
34
35 /**
36  * Initialize LE connectivity interface.
37  *
38  * @param[in]  registerCallback Callback to register LE interfaces to
39  *                              Connectivity Abstraction Layer.
40  * @param[in]  reqRespCallback  Callback to notify request and response
41  *                              messages from server(s) started at
42  *                              Connectivity Abstraction Layer.
43  * @param[in]  netCallback      Callback to notify the network additions
44  *                              to Connectivity Abstraction Layer.
45  * @param[in]  errorCallback    errorCallback to notify error to
46  *                              connectivity common logic layer from adapter.
47  * @param[in]  handle           Threadpool Handle.
48  *
49  * @return ::CA_STATUS_OK or Appropriate error code.
50  */
51 CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback,
52                           CANetworkPacketReceivedCallback reqRespCallback,
53                           CANetworkChangeCallback netCallback,
54                           CAErrorHandleCallback errorCallback,
55                           ca_thread_pool_t handle);
56
57
58 #ifdef __cplusplus
59 } /* extern "C" */
60 #endif
61
62 #endif /* CA_LEADAPTER_H_ */