Convert a data structure to class object which can be extensible for carrying more... 33/9733/4
authorJihun Ha <jihun.ha@samsung.com>
Wed, 27 Jul 2016 07:56:35 +0000 (16:56 +0900)
committerUze Choi <uzchoi@samsung.com>
Thu, 28 Jul 2016 08:14:21 +0000 (08:14 +0000)
commita6b13bc90e6f940e65109bb9fe3fe01a76cea208
tree2384c9ac9a06f0a576b94c8629bc57fd6ea05c27
parent7c53888193952f71976cd5f11c4bf9add27efe0d
Convert a data structure to class object which can be extensible for carrying more data

The current design for storing data to be delivered to enrollee and to
be arrived from Enrollee has a limitation of extensibility in case
where a vendor specific property is added to one of easy setup resources.
To overcome this situation which would happen, we convert all data structures
to class objects which can be inheritible if needed.

For example, if you add a vender specific property in DevConf resource and
want to be retrieved by getConfiguration() API, you just create NewEnrolleeConf
class inherited from EnrolleeConf class like below:
class NewEnrolleeConf : public EnrolleeConf {
   int getNewIntValue() {
       return m_DevConfRep.getValue<type>("propertykey");
} }

Change-Id: I2fa8cf53e8339c211b6b1b722bada699f5a70940
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9733
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongho Park <jh8397.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/easy-setup/mediator/richsdk/inc/ESRichCommon.h
service/easy-setup/mediator/richsdk/inc/EnrolleeResource.h
service/easy-setup/mediator/richsdk/src/CloudResource.cpp
service/easy-setup/mediator/richsdk/src/EnrolleeResource.cpp
service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp
service/easy-setup/sampleapp/mediator/linux/richsdk_sample/mediator_cpp.cpp