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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
27 #include "ESRichCommon.h"
28 #include "RemoteEnrollee.h"
38 * This provides an API to instanciate a new RemoteEnrollee object correspondent to Enrollee
45 * API for getting the instance of EasySetup singleton class.
46 * @return EasySetup instance.
48 static EasySetup* getInstance();
51 * This API is used for creating a remote Enrollee instance.
53 * @param enrolleeResource an OCResource object corresponding to enrollee resource
54 * discovered in a network. The OCResource object can be obtained by calling
55 * OCPlatform.findResource() API. What resource you have to discover with
56 * the OCPlatform.findResource() API is a "provisioning" resource with a certain
57 * resource type, i.e. ocf.wk.prov
59 * @throws ESBadRequestException If createEnrolleeDevice is invoked with the same
60 * provisioning information.
62 * @return Pointer to RemoteEnrollee instance.
64 std::shared_ptr<RemoteEnrollee> createRemoteEnrollee(
65 std::shared_ptr< OC::OCResource > enrolleeResource);
72 std::shared_ptr< OC::OCResource > m_ocResource;
73 static EasySetup *s_instance;
78 #endif /* EASYSETUP_H_ */