1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
11 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 #ifndef EASYSETUP_ENROLLEE_H__
23 #define EASYSETUP_ENROLLEE_H__
30 * This file contains Enrollee APIs
38 * Callback function for updating the Enrollee OnBoarding and Provisioning status result
41 * @param esResult ESResult provides the current state of the Enrollee Device
43 typedef void (*ESEnrolleeEventCallback)(ESResult esResult, ESEnrolleeState enrolleeState);
46 * This function Initializes the EasySetup. This API must be called prior to invoking any other API
48 * @param networkType NetworkType on which OnBoarding has to be performed.
49 * @param ssid SSID of the target SoftAP network to which the Enrollee is connecting.
50 * @param passwd Password of the target SoftAP network to which the Enrollee is
52 * @param isSecured True if the Enrollee is operating in secured mode.
53 * @param eventCallback ESEnrolleeEventCallback for for updating the Enrollee OnBoarding status
54 * result to the application
55 * @return ::ES_OK on success, some other value upon failure.
57 ESResult ESInitEnrollee(OCConnectivityType networkType, const char *ssid, const char *passwd,
58 bool isSecured, ESEnrolleeEventCallback eventCallback);
61 * This function performs initialization of Provisioning and Network resources needed for EasySetup
63 * @return ::ES_OK on success, some other value upon failure.
65 ESResult ESInitProvisioning();
68 * This function performs termination of Provisioning and Network resources.
69 * Also terminates the IoTivity core stack.
71 * @return ::ES_OK on success, some other value upon failure.
73 ESResult ESTerminateEnrollee();
80 #endif /* EASYSETUP_ENROLLEE_H__ */