Add generic API for setting and getting defined tag values
authorHabib Virji <habib.virji@samsung.com>
Sun, 20 Nov 2016 22:54:46 +0000 (22:54 +0000)
committerHabib Virji <habib.virji@samsung.com>
Thu, 24 Nov 2016 09:17:51 +0000 (09:17 +0000)
commit9705d8cbf89e2e4875a27a71ed8c42c97d1c27b0
tree48cbdecdb74985596b21cc340144a1ad43c8a14c
parent9aac67cc4521e49e7ad5f4ec12ab90c1bf28bf18
Add generic API for setting and getting defined tag values

- Uses the resource attribute of OCResource for storing and retrieving device and platform values.
- Removed global savedDeviceInfo and savedPlatformInfo. The information passed via
OCSetDeviceInfo and OCSetPlatformInfo is stored in rsrcAttributes.
- OCAttribute type change from char * to void * to store generic value, this was part of OCResource but was not used.
- Payload type PAYLOAD_TYPE_DEVICE and PAYLOAD_TYPE_PLATFORM is removed from PAYLOAD_TYPE as this was used only internally.
- Payload convert and parse for payload type device and platform is removed, as device and payload uri uses
OCRepresentation payload type.
- Delete function to delete resource attributes.
- OCDevicePayloadCreate and OCPlatformCreate is removed as this was only used internally, all values are now stored in
resource attributes.
- Moves OCSetDeviceInfo and OCSetPlatformInfo from ocstack to ocresource to avoid duplicate checking.
- Add set and get API to set parameter for /oic/d and /oic/p.
- OCGetResourceHandleAtUri accesible without ifdef RD_CLIENT.
- Updated Unit test to test the functionality.
- Add the OCSSetParam and OCGetParam in C++ and Java

Change-Id: If822ae95a70e681121528679de8da1375718de0c
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14377
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
31 files changed:
android/android_api/base/jni/JniOcPlatform.cpp
android/android_api/base/jni/JniOcPlatform.h
android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java
resource/csdk/octbstack_product.def
resource/csdk/stack/include/internal/ocresource.h
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/include/ocstack.h
resource/csdk/stack/include/ocstackconfig.h
resource/csdk/stack/include/octypes.h
resource/csdk/stack/include/payload_logging.h
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp
resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/src/ocpayloadconvert.c
resource/csdk/stack/src/ocpayloadparse.c
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocstack.c
resource/csdk/stack/test/stacktests.cpp
resource/include/IServerWrapper.h
resource/include/InProcServerWrapper.h
resource/include/OCPlatform.h
resource/include/OCPlatform_impl.h
resource/include/OCRepresentation.h
resource/src/InProcClientWrapper.cpp
resource/src/InProcServerWrapper.cpp
resource/src/OCPlatform.cpp
resource/src/OCPlatform_impl.cpp
resource/src/OCRepresentation.cpp
resource/unittests/OCRepresentationEncodingTest.cpp
service/simulator/src/common/simulator_utils.cpp