1 //******************************************************************
\r
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
\r
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
7 // Licensed under the Apache License, Version 2.0 (the "License");
\r
8 // you may not use this file except in compliance with the License.
\r
9 // You may obtain a copy of the License at
\r
11 // http://www.apache.org/licenses/LICENSE-2.0
\r
13 // Unless required by applicable law or agreed to in writing, software
\r
14 // distributed under the License is distributed on an "AS IS" BASIS,
\r
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 // See the License for the specific language governing permissions and
\r
17 // limitations under the License.
\r
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
21 #ifndef EASYSETUP_H_
\r
22 #define EASYSETUP_H_
\r
27 #include "escommon.h"
\r
28 #include "RemoteEnrollee.h"
\r
34 class RemoteEnrollee;
\r
37 * This provides methods for Mediator devices to perform EasySetup of Enrollee devices.
\r
38 * EasySetup involves
\r
39 * 1) Ownership transfer for enabling secured communication between Mediator and Enrollee
\r
41 * 2) Provisioning of Enrollee devices using the credentails of target Enroller devices.
\r
47 * API for getting the instance of EasySetup singleton class.
\r
48 * @return EasySetup instance.
\r
50 static EasySetup* getInstance();
\r
53 * This API is used for creating a remote Enrollee device instance.
\r
54 * @param enrolleeNWProvIndo Provisioning information for configuring the Enrollee.
\r
56 * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same
\r
57 * provisioning information.
\r
59 * @return Pointer to RemoteEnrollee instance.
\r
61 std::shared_ptr<RemoteEnrollee> createEnrolleeDevice (
\r
62 const EnrolleeNWProvInfo& enrolleeNWProvInfo);
\r
67 RemoteEnrollee::shared_ptr findDeviceInProvisioningList(
\r
68 const EnrolleeNWProvInfo& enrolleeNWProvInfo);
\r
69 bool addDeviceToProvisioningList(const RemoteEnrollee::shared_ptr remoteEnrollee);
\r
70 bool deleteDeviceFromProvisioningList (const EnrolleeNWProvInfo& enrolleeNWProvInfo);
\r
72 std::vector< RemoteEnrollee::shared_ptr > m_activeEnrolleeList;
\r
73 static EasySetup *s_instance;
\r
78 #endif /* EASYSETUP_H_ */
\r