Merge branch 'upstream' into tizen
[platform/upstream/iotivity.git] / service / easy-setup / enrollee / src / onboarding.h
1 //******************************************************************
2 //
3 // Copyright 2015 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 EASYSETUP_ENROLLEE_ONBOARDING_H__
23 #define EASYSETUP_ENROLLEE_ONBOARDING_H__
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif // __cplusplus:$
28
29 #include "networkhandler.h"
30
31 /**
32  * @file
33  *
34  * This file contains APIs to on-board ( connect ) Enrollee device into Ad-hoc network
35  * @Note :  Some of the APIs of this file need to be modified by the OEM according to the
36  *          device configuration
37  */
38
39 /**
40  * This function on-board Enrollee device onto ad-hoc network.
41  * @param ssid                              SSID of the target SoftAP network to which the Enrollee
42  *                                          is connecting.
43  * @param passwd                            Password of the target SoftAP network to which the
44  *                                          Enrollee is connecting.
45  * @param ESEnrolleeNetworkEventCallback    Callback function for result update
46  * @return ::True, if on-boarding is successful.
47  */
48
49 bool ESOnboard(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb);
50
51 /**
52  * This function verify if the on-boarding is through SoftAP.
53  * @return ::True, if Soft AP on-boarding enabled.
54  * @Note : This API to be modified by the OEM according to the device configuration
55  */
56 bool ESSoftapOnboarding();
57
58 /**
59  * This function verify if the on-boarding is through Ble beacons.
60  * @return ::True, if Ble beacons enabled.
61  * @Note : This API to be modified by the OEM according to the device configuration
62  */
63 bool ESBleOnboarding();
64
65 #ifdef __cplusplus
66 }
67 #endif // __cplusplus
68
69
70 #endif /* EASYSETUP_ENROLLEE_ONBOARDING_H__ */