Add links and rep in the response for the collection
authorHabib Virji <habib.virji@samsung.com>
Wed, 30 Nov 2016 21:24:52 +0000 (21:24 +0000)
committerZiran Sun <ziran.sun@samsung.com>
Fri, 9 Dec 2016 14:30:25 +0000 (14:30 +0000)
commitc132a7faff07433a30330a3519f5f66c3f79cf2a
tree66b988689284c162c3f13ee96236bbac7e972c56
parent2749ff9dff85a4d035630f17668819d86de86cbe
Add links and rep in the response for the collection

- Use common ExtractParamFromQuery in ocresource and occollection to extract query parameters.
- Added links tag to the oic.if.ll and oic.if.baseline.
- Added rts tag in the payload for the baseline. - Added rep tag for oic.if.b response.
- occollection was using extra structure to differentiate ll, baseline, batch and group. Simplified the code to use
a simpler code and removed unwanted structure.
- oic.wk.col added in the types.
- OCStackIfTypes is removed as it was used only internally. This is not needed due to usage of ExtractParamFromQuery.
- BuildResponseRepresentation is updated as it is used in collection. For inner payload, these
values were not being used by ocpayloadconvert.
- oic.if.ll has been updated to give response in form of {links:[{href:"", rt:[""], if:[""]}]}
- oic.if.baseline has been updated to give response in form of {rt:[], if:[], rts:[], links:[{href:"", rt:[""], if:[""]}]}
- oic.if.b has been to response in form of [{"href": "", "rep": {""}}]
- in case of wrong query it will respond with error message.

Change-Id: I98489ac9923ab3c63012ddfe6b55c2b3064c3f28
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14621
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13999
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/stack/include/internal/occollection.h
resource/csdk/stack/include/internal/ocresource.h
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/include/octypes.h
resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp
resource/csdk/stack/src/occollection.c
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocserverrequest.c