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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
29 #include "RemoteEnrollee.h"
38 * This provides methods for Mediator devices to perform EasySetup of Enrollee devices.
40 * 1) Ownership transfer for enabling secured communication between Mediator and Enrollee
42 * 2) Provisioning of Enrollee devices using the credentails of target Enroller devices.
48 * API for getting the instance of EasySetup singleton class.
49 * @return EasySetup instance.
51 static EasySetup* getInstance();
54 * This API is used for creating a remote Enrollee device instance.
55 * @param enrolleeNWProvIndo Provisioning information for configuring the Enrollee.
57 * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same
58 * provisioning information.
60 * @return Pointer to RemoteEnrollee instance.
62 std::shared_ptr<RemoteEnrollee> createEnrolleeDevice (
63 const EnrolleeNWProvInfo& enrolleeNWProvInfo);
68 RemoteEnrollee::shared_ptr findDeviceInProvisioningList(
69 const EnrolleeNWProvInfo& enrolleeNWProvInfo);
70 bool addDeviceToProvisioningList(const RemoteEnrollee::shared_ptr remoteEnrollee);
71 bool deleteDeviceFromProvisioningList (const EnrolleeNWProvInfo& enrolleeNWProvInfo);
73 std::vector< RemoteEnrollee::shared_ptr > m_activeEnrolleeList;
74 static EasySetup *s_instance;
79 #endif /* EASYSETUP_H_ */