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)
committerUze Choi <uzchoi@samsung.com>
Thu, 24 Nov 2016 00:50:43 +0000 (00:50 +0000)
commit338044812ecee35167a8b7a3f77d763a864f384f
treee7ff26a3ec1db727f3b6ab4f2c5da5275b789e7c
parent10c287fa62763927619d5fb0a20c8a43f2e41e62
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/14525
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
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