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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef ENROLLEE_RESOURCE_H_
22 #define ENROLLEE_RESOURCE_H_
27 #include "ESRichCommon.h"
38 class EnrolleeSecurity;
41 * This class contains the resource discovery methods.
43 * @see EnrolleeResource
45 class EnrolleeResource
47 friend class EnrolleeSecurity;
50 EnrolleeResource(std::shared_ptr< OC::OCResource > resource);
52 ~EnrolleeResource() = default;
54 void registerGetStatusCallback(const GetStatusCb callback);
55 void registerGetConfigurationStatusCallback(
56 const GetConfigurationStatusCb callback);
57 void registerDevicePropProvStatusCallback(
58 const DevicePropProvStatusCb callback);
60 void getConfiguration();
63 void provisionProperties(const DeviceProp& deviceProp);
66 std::shared_ptr< OC::OCResource > m_ocResource;
68 GetStatusCb m_getStatusCb;
69 GetConfigurationStatusCb m_getConfigurationStatusCb;
70 DevicePropProvStatusCb m_devicePropProvStatusCb;
73 void onGetStatusResponse(const HeaderOptions& headerOptions,
74 const OCRepresentation& rep,
76 void onGetConfigurationResponse(const HeaderOptions& headerOptions,
77 const OCRepresentation& rep,
79 void onProvisioningResponse(const HeaderOptions& headerOptions,
80 const OCRepresentation& rep,