Modified discovery payload to be spec compliant.
authorMandeep Shetty <mandeep.shetty@intel.com>
Mon, 14 Dec 2015 22:52:53 +0000 (14:52 -0800)
committerJon A. Cruz <jonc@osg.samsung.com>
Tue, 15 Dec 2015 01:50:17 +0000 (01:50 +0000)
commit69661b0c98125497ff32cf8b3b8c9c11a6b4b3c0
tree20d27b00aa6e76da599ec3cd8e2c5f7c0ad74541
parent30c25f5488fa19f686cdfe68d82d14842af1f7a3
Modified discovery payload to be spec compliant.

The discovery oic/res payload had the device id "di" and "links"
being repeated for every resource. The payload itself was not structured
in a spec compliant way.

Plucked out di and links from every resource and put in the root map.
The format for the payload is "modelled" as JSON.
[
    {
        "di" : UUID,
        links :[
                    {
                        href, rt, if, policy        // Resource 1
                    },
                    {
                        href, rt, if, policy        // Resource 2
                    },
                    .
                    .
                    .
                ]
    }
]

Change-Id: I2c50a7cc1ee46df633810372e446ac92c5e496f5
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4543
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Markus Jung <markus.jung85@gmail.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/security/src/amsmgr.c
resource/csdk/stack/include/octypes.h
resource/csdk/stack/include/payload_logging.h
resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.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/include/OCSerialization.h
resource/unittests/OCRepresentationEncodingTest.cpp