Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / resource / csdk / connectivity / inc / canetworkconfigurator.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  * @file
23  *
24  * This file contains  utility function for network configurations.
25  */
26
27 #ifndef NETWORK_CONFIGURATOR_H_
28 #define NETWORK_CONFIGURATOR_H_
29
30 #include "cacommon.h"
31 #include "uarraylist.h"
32
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37
38 /**
39  * Add network type to the selected networks for network packets reception.
40  * @param[in]   transportAdapter      Adapter that needs to be added.
41  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
42  */
43 CAResult_t CAAddNetworkType(CATransportAdapter_t transportAdapter);
44
45 /**
46  * Remove network type from the selected configuration.
47  * @param[in]   transportAdapter       Adapter that needs to be removed.
48  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
49  */
50 CAResult_t CARemoveNetworkType(CATransportAdapter_t transportAdapter);
51
52 /**
53  * Get selected network information.
54  * @return array list having the connectivity types.
55  */
56 u_arraylist_t *CAGetSelectedNetworkList();
57
58 /**
59  * Get network informations of the selected networks.
60  * @param[out]   info       LocalConnectivity objects.
61  * @param[out]   size       No Of Array objects.
62  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
63  */
64 CAResult_t CAGetNetworkInformationInternal(CAEndpoint_t **info, uint32_t *size);
65
66 /**
67  * Terminate network type from selected configuration.
68  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
69  */
70 CAResult_t CATerminateNetworkType();
71
72
73 #ifdef __cplusplus
74 } /* extern "C" */
75 #endif
76
77 #endif /* NETWORK_CONFIGURATOR_H_ */
78