Merge branch 'tizen' into tizen_5.5
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / ip_adapter / caipnwmonitor_common.h
1 /******************************************************************
2  *
3  * Copyright 2019 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  * @file caipnwmonitor_common.h
23  * This file provides common APIs of IP network monitor modules.
24  */
25
26 #ifndef CA_IP_NW_INTERFACE_COMMON_H_
27 #define CA_IP_NW_INTERFACE_COMMON_H_
28
29 #include "cacommon.h"
30
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35
36 /**
37  * Enum for defining different platforms for internal usage.
38  */
39 typedef enum
40 {
41     CA_IP_NW_COMMON_ANDROID = 0,
42     CA_IP_NW_COMMON_LINUX,
43     CA_IP_NW_COMMON_TIZEN,
44     CA_IP_NW_COMMON_TIZENRT,
45     CA_IP_NW_COMMON_WINDOWS
46 } CAIPAdapterPlatform_t;
47
48 void CAIPPassNetworkChangesToAdapterInternal(CANetworkStatus_t status,
49                                          CAIPCBData_t *adapterCallbackList, CAIPAdapterPlatform_t platform);
50
51 CAResult_t CAIPSetNetworkMonitorCallbackInternal(CAIPAdapterStateChangeCallback callback,
52                                          CATransportAdapter_t adapter, CAIPCBData_t *adapterCallbackList);
53
54 CAResult_t CAIPUnSetNetworkMonitorCallbackInternal(CATransportAdapter_t adapter,
55                                          CAIPCBData_t *adapterCallbackList);
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61 #endif /* CA_IP_NW_INTERFACE_COMMON_H_ */