[IOT-2430] add eps from OCLinksPayloadValueCreate
authoruzchoi <uzchoi@samsung.com>
Mon, 26 Jun 2017 09:18:07 +0000 (18:18 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 24 Aug 2017 06:03:19 +0000 (06:03 +0000)
commitba260bb6dfbb22334b1c531b85af19ba9adc7bd6
tree49f32ff791569e37a93c1dbf1d05b487e398382b
parentce7387ef3400e0b384e32e37002f5078ce564c1b
[IOT-2430] add eps from OCLinksPayloadValueCreate

Previous OCLinksPayloadValueCreate function just create the payload
without eps info in links parameter and with tls and tcp port info
for cbor as media format request.
If user input the OCEntityHandleRequest from entity handler callback,
this function will parse whether this is request from vnd.ocf/cbor or
cbor media format using newly created function OCRequestIsOCFContentFormat
here, and create the links payload accordingly with eps info for vnd.ocf
media format request and tls/tcp for legacy cbor type request.

This patch has the seperated handling logic according to ll interface
and baseline interface in HandleLinkListInterface function.
ll interface requires links array payload instead of object with links.

OCLinksPayloadValueCreate API is changed as below.
:return type has PayloadValue to align to other create API.
:ehRequest is added as param. to receive the request media format and so on.

This change also include the fix to exclude the parent node from links
and the fix for tcp and tls property fill-in logic in vnd.ocf/cbor case.

This change add CreateEndpointPayloadList API change to add *epCount
param to return the count of endpoint.

Change-Id: I8f4c5905f35a7ed2286514926385921e407ff674
Signed-off-by: uzchoi <uzchoi@samsung.com>
Signed-off-by: Uze <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20987
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/stack/include/internal/occollection.h
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/src/occollection.c
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/test/stacktests.cpp