Merge branch '1.3-rel' (5fdb8a1) 33/22733/9
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 17 Nov 2017 00:19:39 +0000 (01:19 +0100)
committerPhil Coval <philippe.coval@osg.samsung.com>
Fri, 17 Nov 2017 21:58:11 +0000 (21:58 +0000)
Change-Id: I3040a9e4ab81d6b4485bcb390a643955719ab8f5
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
646 files changed:
.ctags [new file with mode: 0644]
.gitattributes
.gitignore
CONTRIBUTING.md [new file with mode: 0644]
SConstruct
auto_build.py
bridging/SConscript
bridging/common/ConcurrentIotivityUtils.cpp
bridging/common/SConscript
bridging/common/curlClient.cpp
bridging/common/messageHandler.cpp
bridging/common/pipeHandler.cpp
bridging/common/pluginIf.cpp
bridging/common/pluginServer.cpp
bridging/include/IotivityWorkItem.h
bridging/mini_plugin_manager/SConscript
bridging/mini_plugin_manager/miniPluginManager.cpp
bridging/mpm_client/MPMSampleClient.cpp
bridging/mpm_client/SConscript
bridging/plugins/hue_plugin/SConscript
bridging/plugins/hue_plugin/hue_auth_spec.cpp
bridging/plugins/hue_plugin/hue_file.cpp
bridging/plugins/hue_plugin/hue_objects/hue_bridge.cpp
bridging/plugins/hue_plugin/hue_objects/hue_light.cpp
bridging/plugins/hue_plugin/hue_resource.cpp
bridging/plugins/lifx_plugin/SConscript
bridging/plugins/lifx_plugin/lifxResource.cpp
bridging/plugins/lifx_plugin/lifx_objects/lifx.cpp
bridging/plugins/lyric_plugin/SConscript
bridging/plugins/lyric_plugin/honeywellHelpers.cpp
bridging/plugins/lyric_plugin/honeywellResource.cpp
bridging/plugins/lyric_plugin/honeywell_objects/honeywell.cpp
bridging/plugins/lyric_plugin/honeywell_objects/honeywellLyric.cpp
bridging/plugins/lyric_plugin/honeywell_objects/honeywellThermostat.cpp
bridging/plugins/nest_plugin/SConscript
bridging/plugins/nest_plugin/nestResource.cpp
bridging/plugins/nest_plugin/nest_objects/nest.cpp
bridging/plugins/nest_plugin/nest_objects/nestThermostat.cpp
bridging/plugins/stub_plugin/stub_plugin.cpp
build_common/SConscript
build_common/android/SConscript
build_common/arduino/SConscript
build_common/darwin/SConscript
build_common/external_builders.scons
build_common/external_libs.scons
build_common/iotivityconfig/__init__.py
build_common/iotivityconfig/compiler/default_configuration.py
build_common/iotivityconfig/compiler/factory.py
build_common/iotivityconfig/compiler/gcc_configuration.py
build_common/linux/SConscript
build_common/tizen/SConscript
build_common/tools/UnpackAll.py
build_common/windows/SConscript
extlibs/android/gradle/SConscript
extlibs/android/ndk/SConscript
extlibs/android/sdk/SConscript
extlibs/arduino/SConscript
extlibs/boost/SConscript
extlibs/gtest/SConscript
extlibs/hippomocks/SConscript
extlibs/libcoap/SConscript
extlibs/libstrophe/SConscript
extlibs/mbedtls/SConscript
extlibs/raxmpp/SConscript
extlibs/sqlite3/SConscript
extlibs/tinycbor/SConscript
extlibs/wksxmppxep/SConscript
iotivity.pc.in
java/SConscript
java/jni/JniCaInterface.c
java/jni/JniConfirmNumListener.cpp
java/jni/JniConfirmNumListener.h
java/jni/JniCreateAciIdListener.cpp
java/jni/JniCreateAciIdListener.h
java/jni/JniDisplayVerifyNumListener.cpp
java/jni/JniDisplayVerifyNumListener.h
java/jni/JniEntityHandler.h
java/jni/JniGetAclIdByDeviceListener.cpp
java/jni/JniGetAclIdByDeviceListener.h
java/jni/JniListenerManager.h
java/jni/JniOcCloudProvisioning.cpp
java/jni/JniOcCloudProvisioning.h
java/jni/JniOcCloudResultListener.cpp
java/jni/JniOcCloudResultListener.h
java/jni/JniOcPlatform.h
java/jni/JniOcPresenceHandle.cpp
java/jni/JniOcPresenceHandle.h
java/jni/JniOcProvisioning.cpp
java/jni/JniOcProvisioning.h
java/jni/JniOcRepresentation.cpp
java/jni/JniOcRepresentation.h
java/jni/JniOcRequestHandle.cpp
java/jni/JniOcRequestHandle.h
java/jni/JniOcResource.cpp
java/jni/JniOcResource.h
java/jni/JniOcResourceHandle.cpp
java/jni/JniOcResourceHandle.h
java/jni/JniOcResourceIdentifier.cpp
java/jni/JniOcResourceIdentifier.h
java/jni/JniOcResourceRequest.cpp
java/jni/JniOcResourceRequest.h
java/jni/JniOcResourceResponse.cpp
java/jni/JniOcResourceResponse.h
java/jni/JniOcSecureResource.cpp
java/jni/JniOcSecureResource.h
java/jni/JniOcStack.cpp
java/jni/JniOcStack.h
java/jni/JniOnDeleteListener.cpp
java/jni/JniOnDeleteListener.h
java/jni/JniOnDeviceInfoListener.cpp
java/jni/JniOnDeviceInfoListener.h
java/jni/JniOnGetListener.cpp
java/jni/JniOnGetListener.h
java/jni/JniOnObserveListener.cpp
java/jni/JniOnObserveListener.h
java/jni/JniOnPlatformInfoListener.cpp
java/jni/JniOnPlatformInfoListener.h
java/jni/JniOnPostListener.cpp
java/jni/JniOnPostListener.h
java/jni/JniOnPresenceListener.cpp
java/jni/JniOnPresenceListener.h
java/jni/JniOnPutListener.cpp
java/jni/JniOnPutListener.h
java/jni/JniOnResourceFoundListener.cpp
java/jni/JniOnResourceFoundListener.h
java/jni/JniOnResourcesFoundListener.cpp
java/jni/JniOnResourcesFoundListener.h
java/jni/JniPinCheckListener.cpp
java/jni/JniPinCheckListener.h
java/jni/JniProvisionResultListner.cpp
java/jni/JniProvisionResultListner.h
java/jni/JniSecureUtils.cpp
java/jni/JniSecureUtils.h
java/jni/JniUtils.cpp
java/jni/JniUtils.h
java/jni/SConscript
plugins/SConscript
plugins/samples/linux/IotivityandZigbeeClient.c
plugins/samples/linux/IotivityandZigbeeClient.h
plugins/samples/linux/IotivityandZigbeeServer.c
plugins/samples/linux/SConscript
plugins/src/SConscript
plugins/src/plugininterface.c
plugins/src/pluginlist.c
plugins/unittests/SConscript
plugins/zigbee_wrapper/SConscript
plugins/zigbee_wrapper/src/SConscript
plugins/zigbee_wrapper/src/zigbee_wrapper.c
plugins/zigbee_wrapper/telegesis_wrapper/SConscript
plugins/zigbee_wrapper/telegesis_wrapper/src/SConscript
plugins/zigbee_wrapper/telegesis_wrapper/src/telegesis_socket.c
plugins/zigbee_wrapper/telegesis_wrapper/src/telegesis_wrapper.c
plugins/zigbee_wrapper/telegesis_wrapper/src/twsocketlist.c
resource/IPCA/SConscript
resource/IPCA/samples/ElevatorClient/SConscript
resource/IPCA/samples/ElevatorServer/SConscript
resource/IPCA/samples/ElevatorServer/elevatorserver.cpp
resource/IPCA/samples/ipcaapp/SConscript
resource/IPCA/src/SConscript
resource/IPCA/src/app.cpp
resource/IPCA/src/inc/ipcainternal.h
resource/IPCA/src/ipca.cpp
resource/IPCA/src/ocfframework.cpp
resource/IPCA/unittests/IPCAElevatorClient.cpp
resource/IPCA/unittests/IPCAUnitTest.dat
resource/IPCA/unittests/SConscript
resource/IPCA/unittests/ipcaunittests.cpp
resource/IPCA/unittests/mockOCProvision.cpp
resource/IPCA/unittests/testelevatorserver.cpp
resource/SConscript
resource/c_common/SConscript
resource/c_common/iotivity_commontypes.h [new file with mode: 0644]
resource/c_common/ocatomic/include/ocatomic.h
resource/c_common/ocatomic/src/arduino/ocatomic.c
resource/c_common/ocatomic/src/others/ocatomic.c
resource/c_common/ocatomic/src/windows/ocatomic.c
resource/c_common/ocevent/include/ocevent.h [new file with mode: 0644]
resource/c_common/ocevent/src/others/ocevent.c [new file with mode: 0644]
resource/c_common/ocevent/src/windows/ocevent.c [new file with mode: 0644]
resource/c_common/ocevent/test/SConscript [new file with mode: 0644]
resource/c_common/ocevent/test/eventtest.cpp [new file with mode: 0644]
resource/c_common/ocrandom/include/experimental/ocrandom.h [moved from resource/c_common/ocrandom/include/ocrandom.h with 100% similarity]
resource/c_common/ocrandom/src/ocrandom.c
resource/c_common/ocrandom/test/android/randomtest.cpp
resource/c_common/ocrandom/test/arduino/randomtest.cpp
resource/c_common/ocrandom/test/randomtest.cpp
resource/c_common/octhread/include/octhread.h
resource/c_common/octhread/src/posix/octhread.c
resource/c_common/octhread/src/windows/octhread.c
resource/c_common/octimer/include/octimer.h
resource/c_common/octimer/src/octimer.c
resource/c_common/oic_malloc/src/oic_malloc.c
resource/c_common/oic_platform/src/oic_platform.c
resource/c_common/oic_platform/src/others/oic_otherplatforms.c
resource/c_common/oic_platform/src/windows/oic_winplatform.cpp
resource/c_common/oic_time/include/oic_time.h
resource/c_common/platform_features.h
resource/c_common/unittests/SConscript
resource/c_common/windows/src/win_sleep.c
resource/csdk/connectivity/SConscript
resource/csdk/connectivity/build/SConscript
resource/csdk/connectivity/build/android/SConscript
resource/csdk/connectivity/build/arduino/SConscript
resource/csdk/connectivity/build/linux/SConscript
resource/csdk/connectivity/build/tizen/Makefile
resource/csdk/connectivity/build/tizen/SConscript
resource/csdk/connectivity/build/tizen/scons/SConscript
resource/csdk/connectivity/common/SConscript
resource/csdk/connectivity/common/inc/cacommonutil.h
resource/csdk/connectivity/common/src/caremotehandler.c
resource/csdk/connectivity/common/src/cathreadpool_pthreads.c
resource/csdk/connectivity/common/src/uarraylist.c
resource/csdk/connectivity/common/src/ulinklist.c
resource/csdk/connectivity/common/src/uqueue.c
resource/csdk/connectivity/inc/caadapterutils.h
resource/csdk/connectivity/inc/cafragmentation.h
resource/csdk/connectivity/inc/cainterfacecontroller.h
resource/csdk/connectivity/lib/libcoap-4.1.1/net.c
resource/csdk/connectivity/src/SConscript
resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
resource/csdk/connectivity/src/bt_edr_adapter/SConscript
resource/csdk/connectivity/src/bt_edr_adapter/android/SConscript
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrnwmonitor.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.c
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.c
resource/csdk/connectivity/src/bt_edr_adapter/caedradapter.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/SConscript
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrclient.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrdevicelist.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrendpoint.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrserver.c
resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrutils.c
resource/csdk/connectivity/src/bt_le_adapter/SConscript
resource/csdk/connectivity/src/bt_le_adapter/android/SConscript
resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c
resource/csdk/connectivity/src/bt_le_adapter/android/calenwmonitor.c
resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.c
resource/csdk/connectivity/src/bt_le_adapter/android/calestate.c
resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.c
resource/csdk/connectivity/src/bt_le_adapter/arduino/SConscript
resource/csdk/connectivity/src/bt_le_adapter/arduino/cableclient.cpp
resource/csdk/connectivity/src/bt_le_adapter/arduino/cablenwmonitor.cpp
resource/csdk/connectivity/src/bt_le_adapter/arduino/cableserver.cpp
resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript
resource/csdk/connectivity/src/bt_le_adapter/linux/advertisement.c
resource/csdk/connectivity/src/bt_le_adapter/linux/caleinterface.c
resource/csdk/connectivity/src/bt_le_adapter/linux/central.c
resource/csdk/connectivity/src/bt_le_adapter/linux/characteristic.c
resource/csdk/connectivity/src/bt_le_adapter/linux/client.c
resource/csdk/connectivity/src/bt_le_adapter/linux/descriptor.c
resource/csdk/connectivity/src/bt_le_adapter/linux/peripheral.c
resource/csdk/connectivity/src/bt_le_adapter/linux/server.c
resource/csdk/connectivity/src/bt_le_adapter/linux/service.c
resource/csdk/connectivity/src/bt_le_adapter/linux/utils.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/SConscript
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.h
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver.h
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleutil.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleutil.h
resource/csdk/connectivity/src/cablockwisetransfer.c
resource/csdk/connectivity/src/caconnectivitymanager.c
resource/csdk/connectivity/src/cainterfacecontroller.c
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/canetworkconfigurator.c
resource/csdk/connectivity/src/caprotocolmessage.c
resource/csdk/connectivity/src/caqueueingthread.c
resource/csdk/connectivity/src/caretransmission.c
resource/csdk/connectivity/src/ip_adapter/SConscript
resource/csdk/connectivity/src/ip_adapter/android/SConscript
resource/csdk/connectivity/src/ip_adapter/android/caifaddrs.c
resource/csdk/connectivity/src/ip_adapter/android/caipnwmonitor.c
resource/csdk/connectivity/src/ip_adapter/arduino/SConscript
resource/csdk/connectivity/src/ip_adapter/arduino/caipadapterutils_eth.cpp
resource/csdk/connectivity/src/ip_adapter/arduino/caipadapterutils_eth.h
resource/csdk/connectivity/src/ip_adapter/arduino/caipclient_eth.cpp
resource/csdk/connectivity/src/ip_adapter/arduino/caipclient_wifi.cpp
resource/csdk/connectivity/src/ip_adapter/arduino/caipnwmonitor_eth.cpp
resource/csdk/connectivity/src/ip_adapter/arduino/caipnwmonitor_wifi.cpp
resource/csdk/connectivity/src/ip_adapter/arduino/caipserver_eth.cpp
resource/csdk/connectivity/src/ip_adapter/arduino/caipserver_wifi.cpp
resource/csdk/connectivity/src/ip_adapter/caipadapter.c
resource/csdk/connectivity/src/ip_adapter/caipserver.c
resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c
resource/csdk/connectivity/src/ip_adapter/tizen/SConscript
resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c
resource/csdk/connectivity/src/ip_adapter/windows/caipnwmonitor.c
resource/csdk/connectivity/src/nfc_adapter/SConscript
resource/csdk/connectivity/src/nfc_adapter/android/SConscript
resource/csdk/connectivity/src/nfc_adapter/canfcadapter.c
resource/csdk/connectivity/src/ra_adapter/SConscript
resource/csdk/connectivity/src/ra_adapter/caraadapter.c
resource/csdk/connectivity/src/tcp_adapter/SConscript
resource/csdk/connectivity/src/tcp_adapter/arduino/SConscript
resource/csdk/connectivity/src/tcp_adapter/arduino/catcpadapterutils_eth.cpp
resource/csdk/connectivity/src/tcp_adapter/arduino/catcpadapterutils_eth.h
resource/csdk/connectivity/src/tcp_adapter/catcpadapter.c
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
resource/csdk/connectivity/test/SConscript
resource/csdk/connectivity/test/ssladapter_test.cpp
resource/csdk/connectivity/util/SConscript
resource/csdk/connectivity/util/inc/caconnectionmanager.h
resource/csdk/connectivity/util/src/btpairing/android/cabtpairing.c
resource/csdk/connectivity/util/src/camanager/bt_le_manager/android/caleautoconnector.c
resource/csdk/connectivity/util/src/camanager/bt_le_manager/android/caleconnectionmanager.c
resource/csdk/connectivity/util/src/camanager/bt_le_manager/android/camanagerdevice.c
resource/csdk/connectivity/util/src/camanager/bt_le_manager/android/camanagerleutil.c
resource/csdk/connectivity/util/src/camanager/bt_le_manager/tizen/caleconnectionmanager.c
resource/csdk/connectivity/util/src/camanager/caconnectionmanager.c
resource/csdk/connectivity/util/src/camanager/camanagerutil.c
resource/csdk/connectivity/util/src/camanager/camessagearbiter.c
resource/csdk/connectivity/util/src/camanager/capolicymanager.c
resource/csdk/connectivity/util/src/cautilinterface.c
resource/csdk/include/octypes.h
resource/csdk/logger/SConscript
resource/csdk/logger/include/experimental/logger.h [moved from resource/csdk/logger/include/logger.h with 99% similarity]
resource/csdk/logger/include/experimental/logger_types.h [moved from resource/csdk/logger/include/logger_types.h with 100% similarity]
resource/csdk/logger/include/trace.h
resource/csdk/logger/src/logger.c
resource/csdk/logger/src/trace.c
resource/csdk/logger/test/android/loggertests.cpp
resource/csdk/logger/test/arduino/ArduinoLoggerTest.cpp
resource/csdk/logger/test/loggertests.cpp
resource/csdk/resource-directory/SConscript
resource/csdk/resource-directory/samples/rd_publishingClient.cpp
resource/csdk/resource-directory/samples/rd_queryClient.cpp
resource/csdk/resource-directory/src/internal/rd_database.c
resource/csdk/resource-directory/src/rd_client.c
resource/csdk/resource-directory/src/rd_server.c
resource/csdk/resource-directory/unittests/rddatabase.cpp
resource/csdk/resource-directory/unittests/rdtests.cpp
resource/csdk/routing/SConscript
resource/csdk/routing/include/routingmanager.h
resource/csdk/routing/include/routingmanagerinterface.h
resource/csdk/routing/src/routingmanager.c
resource/csdk/routing/src/routingmanagerinterface.c
resource/csdk/routing/src/routingmessageparser.c
resource/csdk/routing/src/routingtablemanager.c
resource/csdk/routing/src/routingutility.c
resource/csdk/security/SConscript
resource/csdk/security/include/experimental/doxmresource.h [moved from resource/csdk/security/include/internal/doxmresource.h with 100% similarity]
resource/csdk/security/include/internal/acl_logging.h
resource/csdk/security/include/internal/crl_logging.h
resource/csdk/security/include/internal/policyengine.h
resource/csdk/security/provisioning/sample/SConscript
resource/csdk/security/provisioning/sample/autoprovisioningclient.c
resource/csdk/security/provisioning/sample/certgenerator.cpp
resource/csdk/security/provisioning/sample/cloud/cloudAuth.c
resource/csdk/security/provisioning/sample/cloud/cloudCommon.c
resource/csdk/security/provisioning/sample/cloud/cloudDiscovery.c
resource/csdk/security/provisioning/sample/cloud/cloudResource.c
resource/csdk/security/provisioning/sample/cloud/cloudWrapper.c
resource/csdk/security/provisioning/sample/cloudClient.c
resource/csdk/security/provisioning/sample/cloudServer.c
resource/csdk/security/provisioning/sample/oic_svr_db_client.dat
resource/csdk/security/provisioning/sample/provisioningclient.c
resource/csdk/security/provisioning/sample/sampleserver_justworks.cpp
resource/csdk/security/provisioning/sample/sampleserver_mfg.cpp
resource/csdk/security/provisioning/sample/sampleserver_mvjustworks.cpp
resource/csdk/security/provisioning/sample/sampleserver_preconfpin.cpp
resource/csdk/security/provisioning/sample/sampleserver_randompin.cpp
resource/csdk/security/provisioning/sample/subownerclient.c
resource/csdk/security/provisioning/src/cloud/aclgroup.c
resource/csdk/security/provisioning/src/cloud/aclid.c
resource/csdk/security/provisioning/src/cloud/aclinvite.c
resource/csdk/security/provisioning/src/cloud/crl.c
resource/csdk/security/provisioning/src/cloud/csr.c
resource/csdk/security/provisioning/src/cloud/utils.c
resource/csdk/security/provisioning/src/credentialgenerator.c
resource/csdk/security/provisioning/src/multipleownershiptransfermanager.c
resource/csdk/security/provisioning/src/ocprovisioningmanager.c
resource/csdk/security/provisioning/src/otmcontextlist.c
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/oxmjustworks.c
resource/csdk/security/provisioning/src/oxmmanufacturercert.c
resource/csdk/security/provisioning/src/oxmpreconfpin.c
resource/csdk/security/provisioning/src/oxmrandompin.c
resource/csdk/security/provisioning/src/pmutility.c
resource/csdk/security/provisioning/src/provisioningdatabasemanager.c
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/provisioning/unittest/SConscript
resource/csdk/security/provisioning/unittest/otmunittest.cpp
resource/csdk/security/provisioning/unittest/pmutilitytest.cpp
resource/csdk/security/provisioning/unittest/sampleserver.cpp
resource/csdk/security/provisioning/unittest/sampleserver2.cpp [new file with mode: 0644]
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/amaclresource.c
resource/csdk/security/src/certhelpers.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/crlresource.c
resource/csdk/security/src/csrresource.c
resource/csdk/security/src/deviceonboardingstate.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/occertutility.c
resource/csdk/security/src/ocsecurity.c
resource/csdk/security/src/oxmpincommon.c
resource/csdk/security/src/oxmverifycommon.c
resource/csdk/security/src/pbkdf2.c
resource/csdk/security/src/pkix_interface.c
resource/csdk/security/src/policyengine.c
resource/csdk/security/src/psinterface.c
resource/csdk/security/src/pstatresource.c
resource/csdk/security/src/resourcemanager.c
resource/csdk/security/src/rolesresource.c
resource/csdk/security/src/secureresourcemanager.c
resource/csdk/security/src/srmutility.c
resource/csdk/security/tool/SConscript
resource/csdk/security/tool/json2cbor.c
resource/csdk/security/tool/svrdbeditor_src/svrdbeditor.c
resource/csdk/security/tool/svrdbeditor_src/svrdbeditoracl.c
resource/csdk/security/tool/svrdbeditor_src/svrdbeditorcommon.c
resource/csdk/security/tool/svrdbeditor_src/svrdbeditorcred.c
resource/csdk/security/tool/svrdbeditor_src/svrdbeditordoxm.c
resource/csdk/security/tool/svrdbeditor_src/svrdbeditorpstat.c
resource/csdk/security/unittest/SConscript
resource/csdk/security/unittest/aclresourcetest.cpp
resource/csdk/security/unittest/amaclresourcetest.cpp
resource/csdk/security/unittest/credentialresource.cpp
resource/csdk/security/unittest/crlresourcetest.cpp
resource/csdk/security/unittest/doxmresource.cpp
resource/csdk/security/unittest/iotvticalendartest.cpp
resource/csdk/security/unittest/oic_svr_db_prov.dat
resource/csdk/security/unittest/policyengine.cpp
resource/csdk/security/unittest/pstatresource.cpp
resource/csdk/stack/SConscript
resource/csdk/stack/include/experimental/payload_logging.h [moved from resource/csdk/stack/include/payload_logging.h with 99% similarity]
resource/csdk/stack/include/internal/occlientcb.h
resource/csdk/stack/include/internal/ocobserve.h
resource/csdk/stack/include/internal/ocresource.h
resource/csdk/stack/include/internal/ocserverrequest.h
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/internal/tree.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/include/ocpresence.h
resource/csdk/stack/octbstack_product_secured.def
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/ocserver.cpp
resource/csdk/stack/samples/linux/OCSample/occlient.c
resource/csdk/stack/samples/linux/OCSample/ocserver.c
resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocremoteaccessclient.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocrouting.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocservercoll.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp
resource/csdk/stack/samples/linux/secure/SConscript
resource/csdk/stack/samples/linux/secure/common.cpp
resource/csdk/stack/samples/linux/secure/ocamsservice.cpp
resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp
resource/csdk/stack/samples/linux/secure/ocserverbasicops.cpp
resource/csdk/stack/samples/linux/secure/oic_amss_db.dat
resource/csdk/stack/samples/linux/secure/oic_svr_db_client_devowner.dat
resource/csdk/stack/samples/linux/secure/oic_svr_db_client_nondevowner.dat
resource/csdk/stack/samples/linux/secure/oic_svr_db_server.dat
resource/csdk/stack/samples/tizen/SimpleClientServer/SConscript
resource/csdk/stack/samples/tizen/SimpleClientServer/occlient.cpp
resource/csdk/stack/samples/tizen/SimpleClientServer/ocrouting.cpp
resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp
resource/csdk/stack/samples/tizen/SimpleClientServer/scons/SConscript
resource/csdk/stack/samples/tizen/build/SConscript
resource/csdk/stack/samples/tizen/build/gbsbuild.sh
resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
resource/csdk/stack/samples/tizen/build/scons/SConscript
resource/csdk/stack/src/occlientcb.c
resource/csdk/stack/src/occollection.c
resource/csdk/stack/src/occonnectionmanager.c
resource/csdk/stack/src/ocendpoint.c
resource/csdk/stack/src/ocobserve.c
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/ocserverrequest.c
resource/csdk/stack/src/ocsqlite3helper.c
resource/csdk/stack/src/ocstack.c
resource/csdk/stack/src/oicgroup.c
resource/csdk/stack/src/oickeepalive.c
resource/csdk/stack/src/oicresourcedirectory.c
resource/csdk/stack/test/android/stacktests.cpp
resource/csdk/stack/test/arduino/ArduinoStackTest.cpp
resource/csdk/stack/test/arduino/ocserver.cpp
resource/csdk/stack/test/cbortests.cpp
resource/csdk/stack/test/stacktests.cpp
resource/docs/c-doc/Doxyfile
resource/examples/SConscript
resource/examples/groupclient.cpp
resource/examples/light_introspection.json
resource/include/OCApi.h
resource/include/OCSerialization.h
resource/oc_logger/examples/SConscript
resource/provisioning/examples/SConscript
resource/provisioning/examples/cloudAuth.cpp
resource/provisioning/examples/cloudClient.cpp
resource/provisioning/examples/cloudWrapper.cpp
resource/provisioning/examples/oic_svr_db_client.dat
resource/provisioning/examples/provisioningclient.cpp
resource/provisioning/examples/subownerclient.cpp
resource/provisioning/src/OCProvisioningManager.cpp
resource/provisioning/unittests/OCProvisioningTest.cpp
resource/provisioning/unittests/SConscript
resource/src/CAManager.cpp
resource/src/InProcClientWrapper.cpp
resource/src/InProcServerWrapper.cpp
resource/src/OCPlatform_impl.cpp
resource/src/OCRepresentation.cpp
resource/third_party_libs.scons
resource/unit_tests.scons
resource/unittests/OCRepresentationEncodingTest.cpp
resource/unittests/SConscript
run.bat
service/coap-http-proxy/samples/SConscript
service/coap-http-proxy/samples/oic_svr_db_client_devowner.dat
service/coap-http-proxy/samples/oic_svr_db_server.dat
service/coap-http-proxy/samples/proxy_client.c
service/coap-http-proxy/src/CoapHttpHandler.c
service/coap-http-proxy/src/CoapHttpMap.c
service/coap-http-proxy/src/CoapHttpParser.c
service/coap-http-proxy/unittests/CoAPHttpUnitTest.cpp
service/easy-setup/enrollee/src/easysetup.c
service/easy-setup/enrollee/src/resourcehandler.c
service/easy-setup/enrollee/src/resourcehandler.h
service/easy-setup/enrollee/unittests/ESMediatorSimulator.h
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/mediator/richsdk/SConscript
service/easy-setup/mediator/richsdk/android/SConscript
service/easy-setup/mediator/richsdk/inc/ESRichCommon.h
service/easy-setup/mediator/richsdk/src/CloudResource.cpp
service/easy-setup/mediator/richsdk/src/EasySetup.cpp
service/easy-setup/mediator/richsdk/src/EnrolleeResource.cpp
service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp
service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp
service/easy-setup/mediator/richsdk/unittests/ESMediatorTest.cpp
service/easy-setup/mediator/richsdk/unittests/SConscript
service/easy-setup/sampleapp/enrollee/arduino/SConscript
service/easy-setup/sampleapp/enrollee/arduino/enrolleewifi.cpp
service/easy-setup/sampleapp/enrollee/linux/SConscript
service/easy-setup/sampleapp/enrollee/linux/easysetup_x.c
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/easysetup_wifi_conn.c
service/easy-setup/sampleapp/mediator/android/SConscript
service/easy-setup/sampleapp/mediator/linux/richsdk_sample/SConscript
service/notification/SConscript
service/notification/android/SConscript
service/notification/cpp-wrapper/consumer/SConscript
service/notification/cpp-wrapper/examples/linux/SConscript
service/notification/cpp-wrapper/examples/linux/notificationserviceprovider.cpp
service/notification/cpp-wrapper/provider/SConscript
service/notification/cpp-wrapper/unittest/NSConsumerServiceSimulator.h
service/notification/examples/android/NotiConsumerExample/SConscript
service/notification/examples/android/NotiProviderExample/SConscript
service/notification/examples/linux/SConscript
service/notification/examples/linux/notificationprovider.c
service/notification/examples/tizen/NSSampleConsumerApp/.exportMap [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/edc_resource/ns_consumer_control.edc [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/inc/nsclient.h [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/inc/nsmain.h [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/lib/ResourceContainerConfig.xml [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/res/ui_controls.edc [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/shared/res/nssampleapp.png [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/src/nsclient.cpp [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/src/nsmain.cpp [new file with mode: 0644]
service/notification/examples/tizen/NSSampleConsumerApp/tizen-manifest.xml [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/.exportMap [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/edc_resource/ns_provider_control.edc [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/inc/nsmain.h [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/inc/nsserver.h [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/lib/ResourceContainerConfig.xml [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/res/ui_controls.edc [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/shared/res/nssampleapp.png [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/src/nsmain.cpp [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/src/nsserver.cpp [new file with mode: 0644]
service/notification/examples/tizen/NSSampleProviderApp/tizen-manifest.xml [new file with mode: 0644]
service/notification/src/common/NSConstants.h
service/notification/src/common/NSUtil.h
service/notification/src/consumer/NSConsumerScheduler.c
service/notification/src/provider/NSProviderCallbackResponse.h
service/notification/src/provider/NSProviderInterface.c
service/notification/src/provider/NSProviderListener.c
service/notification/src/provider/NSProviderListener.h
service/notification/src/provider/NSProviderNotification.h
service/notification/src/provider/NSProviderResource.h
service/notification/src/provider/NSProviderScheduler.h
service/notification/src/provider/NSProviderSubscription.c
service/notification/src/provider/NSProviderSubscription.h
service/notification/src/provider/NSProviderSystem.h
service/notification/src/provider/NSProviderTopic.c
service/notification/unittest/NSConsumerSimulator.h
service/notification/unittest/NSProviderTest.cpp
service/notification/unittest/SConscript
service/notification/unittest/oic_svr_db_ns.dat
service/resource-container/SConscript
service/resource-container/android/SConscript
service/resource-container/src/InternalTypes.h
service/resource-container/unittests/SConscript
service/resource-encapsulation/android/SConscript
service/resource-encapsulation/src/common/expiryTimer/unittests/ExpiryTimerTest.cpp
service/resource-encapsulation/src/common/utils/include/ScopeLogger.h
service/resource-encapsulation/src/resourceBroker/include/BrokerTypes.h
service/resource-encapsulation/src/resourceCache/include/CacheTypes.h
service/resource-encapsulation/src/resourceCache/src/DataCache.cpp
service/resource-encapsulation/src/resourceCache/src/ResourceCacheManager.cpp
service/resource-encapsulation/src/serverBuilder/src/RCSResourceObject.cpp
service/resource-encapsulation/src/serverBuilder/unittests/RCSResponseTest.cpp
service/resource-encapsulation/unittests/SConscript
service/resource-encapsulation/unittests/oic_svr_db_re_client.dat
service/scene-manager/src/RemoteSceneUtils.h
service/scene-manager/src/SceneUtils.cpp
service/simulator/SConscript
service/simulator/src/client/get_request_generator.cpp
service/simulator/src/client/post_request_generator.cpp
service/simulator/src/client/put_request_generator.cpp
service/simulator/src/client/request_automation_manager.cpp
service/simulator/src/client/request_sender.cpp
service/simulator/src/client/simulator_remote_resource_impl.cpp
service/simulator/src/common/request_model.cpp
service/simulator/src/common/request_model_builder.cpp
service/simulator/src/common/resource_model_schema_builder.cpp
service/simulator/src/common/simulator_resource_model.cpp
service/simulator/src/server/resource_update_automation.cpp
service/simulator/src/server/resource_update_automation_mngr.cpp
service/simulator/src/server/simulator_collection_resource_impl.cpp
service/simulator/src/server/simulator_resource_factory.cpp
service/simulator/src/server/simulator_single_resource_impl.cpp
service/third_party_libs.scons
tools/scons/BoostBootstrap.py
tools/scons/BoostBuild.py
tools/scons/Configure.py
tools/scons/RunTest.py
tools/scons/URLDownload.py
tools/scons/UnpackAll.py
tools/tizen/.gbs.conf
tools/tizen/iotivity.spec
tools/vagrant/README.md
tools/vagrant/Vagrantfile
tools/vagrant/bootstrap.sh [deleted file]
tools/vagrant/iotivity-setup.sh

diff --git a/.ctags b/.ctags
new file mode 100644 (file)
index 0000000..3b2e80e
--- /dev/null
+++ b/.ctags
@@ -0,0 +1 @@
+--langmap=Python:+(SConscript),Python:+(SConstruct)
index 6935b1e..d4a8d34 100644 (file)
@@ -1,2 +1,2 @@
-\r
-*.dat binary\r
+run.bat text eol=crlf
+*.dat binary
index 3d175f7..33c53ea 100644 (file)
@@ -90,6 +90,11 @@ iotivity.pc
 tmp/
 *.tmp
 *.tmp.*
+/*.dat
+
+# Ignore GCov generated files
+*.gcda
+*.gcno
 
 # Ignore GCov generated files
 *.gcda
@@ -135,8 +140,11 @@ extlibs/yaml/yaml
 # Ignore Valgrind generated files.
 *.memcheck
 
-# Ignore  generated files
-*.dat
+# Ignore generated documentation files
+docs/c-doc/docs/
+docs/c-doc/doxygen.log
+docs/cpp-doc/docs/
+docs/cpp-doc/doxygen.log
 
 # Ignore generated documentation files
 docs/c-doc/docs/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..b77a7ad
--- /dev/null
@@ -0,0 +1,26 @@
+# Get Involved
+
+There are many ways to get involved in the IoTivity community, not all involve contributing code. Follow the links below to start participating!
+
+* [Project Governance](https://www.iotivity.org/about/project-governance)
+* [Create an account](https://www.iotivity.org/user)
+* [Submit patches](https://wiki.iotivity.org/submitting_to_gerrit) (review the [Contribution Guidelines](https://www.iotivity.org/get-involved/contribution-guidelines))
+* [Review submissions by others](https://wiki.iotivity.org/reviewing_patches)
+* [File bugs](https://jira.iotivity.org)
+* [Document feature requests](https://www.iotivity.org/get-involved/feature-development)
+* Subscribe to the [mailing lists](http://lists.iotivity.org)
+* Participate in the IRC Channel on freenode \#iotivity
+* Contribute to the [wiki documentation](https://wiki.iotivity.org/)
+* Follow along with the [blog](https://www.iotivity.org/blog) and [Twitter](https://twitter.com/IoTivity)
+
+# Feature Development
+
+Learn how new features for IoTivity are submitted.
+[Here's how](https://www.iotivity.org/get-involved/feature-development)
+
+# Contribution Guidelines
+
+Learn how to contribute code to the IoTivity project.
+[Here's how](https://www.iotivity.org/get-involved/contribution-guidelines)
+
+> Note: the master copy of this document lives at https://www.iotivity.org/get-involved
index 0da7e31..2a793c9 100644 (file)
@@ -23,6 +23,8 @@
 #
 ##
 import os
+import SCons
+print("Processing using SCons version " + SCons.__version__)
 
 # Load common build config
 SConscript('build_common/SConscript')
index 66d15a5..73e526e 100755 (executable)
@@ -12,7 +12,7 @@ def helpmsg(script):
 Usage:
     build:
         python %s <targetbuild>
-        Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_unsecured_with_rd, linux_secured_with_rd,
+        Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_full, linux_unsecured_with_rd, linux_secured_with_rd,
         android, android_unsecured, android_secured, arduino, tizen, tizen_unsecured, tizen_secured, simulator, darwin, windows, msys
         Note: \"linux\" will build \"linux_unsecured\", \"linux_secured\", \"linux_secured_with_rd\", \"linux_unsecured_with_mq\", \"linux_secured_with_tcp\" & \"linux_unsecured_with_tcp\" & \"linux_unsecured_with_rd\".
         Any selection will build both debug and release versions of all available targets in the scope you've selected.
@@ -136,6 +136,19 @@ def build_linux_secured(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
+def build_linux_full(flag, extra_option_str):
+    print ("*********** Build for linux with Security *************")
+    build_options = {
+                        'MULTIPLE_OWNER':1,
+                        'RELEASE':flag,
+                        'SECURED':1,
+                        'WITH_CLOUD':1,
+                        'WITH_RA':1,
+                        'WITH_RA_IBB':1,
+                        'WITH_TCP':1,
+                    }
+    call_scons(build_options, extra_option_str)
+
 def build_linux_unsecured_with_rd(flag, extra_option_str):
     print ("*********** Build for linux With Resource Directory *************")
     build_options = {
@@ -556,6 +569,10 @@ elif arg_num == 2:
         build_linux_secured("true", "")
         build_linux_secured("false", "")
 
+    elif str(sys.argv[1]) == "linux_full":
+        build_linux_full("true", "")
+        build_linux_full("false", "")
+
     elif str(sys.argv[1]) == "linux_unsecured_with_rd":
         build_linux_unsecured_with_rd("true", "")
         build_linux_unsecured_with_rd("false", "")
index 24d00b7..5c555d6 100644 (file)
@@ -30,21 +30,21 @@ build_sample = 'ON'
 src_dir = env.get('SRC_DIR')
 
 # rapidjson fetch
-SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'rapidjson', 'SConscript'))
+SConscript('#extlibs/rapidjson/SConscript')
 
 if target_os not in [
     'android', 'arduino', 'darwin', 'ios', 'tizen', 'msys_nt', 'windows']:
 
-    SConscript(os.path.join('common', 'SConscript'))
+    SConscript('common/SConscript')
 
-    SConscript(os.path.join('mini_plugin_manager', 'SConscript'))
+    SConscript('mini_plugin_manager/SConscript')
 
-    SConscript(os.path.join('mpm_client', 'SConscript'))
+    SConscript('mpm_client/SConscript')
 
-    SConscript(os.path.join('plugins', 'lifx_plugin', 'SConscript'))
+    SConscript('plugins/lifx_plugin/SConscript')
 
-    SConscript(os.path.join('plugins', 'hue_plugin', 'SConscript'))
+    SConscript('plugins/hue_plugin/SConscript')
 
-    SConscript(os.path.join('plugins', 'nest_plugin', 'SConscript'))
+    SConscript('plugins/nest_plugin/SConscript')
 
-    SConscript(os.path.join('plugins', 'lyric_plugin', 'SConscript'))
+    SConscript('plugins/lyric_plugin/SConscript')
index 0c77e4b..f531cc2 100644 (file)
@@ -23,7 +23,7 @@
 #include "octypes.h"
 #include "ConcurrentIotivityUtils.h"
 #include "ocpayload.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "CONCURRENT_IOTIVITY_UTILS"
 
@@ -72,7 +72,6 @@ OCStackResult ConcurrentIotivityUtils::respondToRequest(OCEntityHandlerRequest *
     std::unique_ptr<OCEntityHandlerResponse> response = make_unique<OCEntityHandlerResponse>();
 
     response->requestHandle = request->requestHandle;
-    response->resourceHandle = request->resource;
     response->ehResult = responseCode;
 
     // Clone a copy since this allocation is going across thread boundaries.
index 0befd5e..ce5e035 100644 (file)
@@ -32,7 +32,7 @@ bridging_path = os.path.join(src_dir, 'bridging')
 
 mpmcommon_env = env.Clone()
 
-print "Reading MPM Common Plugin script"
+print("Reading MPM Common Plugin script")
 
 
 def maskFlags(flags):
@@ -45,12 +45,12 @@ def maskFlags(flags):
 ######################################################################
 
 mpmcommon_env.PrependUnique(CPPPATH=[
-                            os.path.join(src_dir, 'resource', 'include'),
-                            os.path.join(bridging_path, 'include'),
-                            os.path.join(src_dir, 'resource', 'c_common'),
-                            os.path.join(src_dir, 'resource', 'c_common', 'ocrandom', 'include'),
-                            os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
-                            os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include')
+    '#/resource/include',
+    '#/bridging/include',
+    '#/resource/c_common',
+    '#/resource/c_common/ocrandom/include',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
 ])
 
 if target_os not in ['arduino', 'windows']:
@@ -73,13 +73,13 @@ mpmcommon_env.PrependUnique(LIBS=[
 ######################################################################
 
 mpmcommon_src = [
-    os.path.join(bridging_path, 'common', 'pluginIf.cpp'),
-    os.path.join(bridging_path, 'common', 'pluginServer.cpp'),
-    os.path.join(bridging_path, 'common', 'pipeHandler.cpp'),
-    os.path.join(bridging_path, 'common', 'messageHandler.cpp'),
-    os.path.join(bridging_path, 'common', 'curlClient.cpp'),
-    os.path.join(bridging_path, 'common', 'pluginProcess.cpp'),
-    os.path.join(bridging_path, 'common', 'ConcurrentIotivityUtils.cpp')
+    'pluginIf.cpp',
+    'pluginServer.cpp',
+    'pipeHandler.cpp',
+    'messageHandler.cpp',
+    'curlClient.cpp',
+    'pluginProcess.cpp',
+    'ConcurrentIotivityUtils.cpp',
 ]
 
 mpmcommon_env.AppendUnique(MPMCOMMON_SRC=mpmcommon_src)
index 658619b..6acefa3 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "curlClient.h"
 #include <iostream>
-#include "logger.h"
+#include "experimental/logger.h"
 
 using namespace std;
 using namespace OC::Bridging;
index 904e8c6..1fd7f13 100644 (file)
@@ -33,7 +33,7 @@
 #include "pluginIf.h"
 #include "pluginServer.h"
 #include "cbor.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include "StringConstants.h"
 
 #define TAG "MESSAGE_HANDLER"
index 60a71a1..766d1ed 100644 (file)
@@ -34,7 +34,7 @@
 #endif
 #include "platform_features.h"
 #include "oic_malloc.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "PIPE_HANDLER"
 
index e4b5353..cd49127 100644 (file)
@@ -33,7 +33,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include "messageHandler.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include "oic_malloc.h"
 #include "mpmErrorCode.h"
 #include "pluginIf.h"
index 2dfee8a..7af1597 100644 (file)
@@ -38,7 +38,7 @@
 #include "oic_malloc.h"
 #include "pluginIf.h"
 #include "ocpayload.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include "WorkQueue.h"
 #include "ConcurrentIotivityUtils.h"
 #include <iostream>
index b6cbcaf..d74255a 100644 (file)
@@ -25,7 +25,7 @@
 #include "ocstack.h"
 #include "octypes.h"
 #include "ocpayload.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include <string>
 
 #define LOG "IOTIVITY_WORK_ITEM"
index 23aba98..a18e599 100644 (file)
 # Mini Plugin Manager build script
 ##
 
-import os.path
-
 Import('env')
 
 target_os = env.get('TARGET_OS')
-src_dir = env.get('SRC_DIR')
-bridging_path = os.path.join(src_dir, 'bridging')
 
 manager_env = env.Clone()
 
-print "Reading MPM script"
+print("Reading MPM script")
 
 ######################################################################
 # Build flags
 ######################################################################
 manager_env.PrependUnique(CPPPATH=[
-                            os.path.join(src_dir, 'resource', 'c_common'),
-                            os.path.join(src_dir, 'resource', 'c_common', 'ocrandom', 'include'),
-                            os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
-                            os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
-                            os.path.join(src_dir, 'extlibs', 'rapidjson', 'include', 'rapidjson'),
-                            os.path.join(bridging_path, 'include')
+    '#/resource/include',
+    '#/bridging/include',
+    '#/resource/c_common',
+    '#/resource/c_common/ocrandom/include',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
+    '#/extlibs/rapidjson/include/rapidjson',
 ])
 
 if target_os not in ['arduino', 'windows']:
-        manager_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
+    manager_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
 
 manager_env.PrependUnique(LIBS=['mpmcommon'])
 
 #####################################################################
 # Source files and Target(s)
 ######################################################################
-minipluginmanager_src = [
-    os.path.join(bridging_path, 'mini_plugin_manager',
-                 'miniPluginManager.cpp'),
-]
-
-manager_env.AppendUnique(MINIPLUGINMANAGER_SRC=minipluginmanager_src)
+minipluginmanager_src = ['miniPluginManager.cpp']
 
 if target_os in ['android', 'tizen']:
-        mpmlib = manager_env.SharedLibrary('minipluginmanager',
-                                           manager_env.get('MINIPLUGINMANAGER_SRC'))
+    mpmlib = manager_env.SharedLibrary('minipluginmanager', minipluginmanager_src)
 else:
-        mpmlib = manager_env.StaticLibrary('minipluginmanager',
-                                           manager_env.get('MINIPLUGINMANAGER_SRC'))
+    mpmlib = manager_env.StaticLibrary('minipluginmanager', minipluginmanager_src)
 manager_env.InstallTarget(mpmlib, 'minipluginmanager')
 manager_env.UserInstallTargetLib(mpmlib, 'minipluginmanager')
 
index 12ba830..5bc1304 100644 (file)
@@ -40,7 +40,7 @@
 #include "pluginIf.h"
 #include "miniPluginManager.h"
 #include "messageHandler.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 pthread_t readResponsethreadhandle;
 
index a38791e..1bc0a6b 100644 (file)
@@ -50,8 +50,11 @@ using namespace std;
 
 #define RECONNECT_FILE_LENGTH 260
 
+void scanCommand(MPMPluginHandle handle);
+
 map<string, MPMPluginHandle> g_loadedPlugins;
 std::atomic_bool keepEventLoop(true);
+bool autoScanMode = false;
 bool autoAddMode = false;
 
 std::string rawUsageMessage =
@@ -64,6 +67,10 @@ the client minimal.
 
 -n          Start plugins in NON secure mode. Default is secure.
 
+-s          Start this client in auto scan mode.
+            This will cause the client send a SCAN message at startup to each loaded
+            plugin. If used in conjunction with '-a', then no user interaction required.
+
 -a          Start this client in auto add mode.
             This will cause the client send an ADD message with the same message as in
             the scan response.
@@ -302,6 +309,11 @@ void loadPlugin(const std::string pluginPath)
         g_loadedPlugins[pluginPath] = pluginHandle;
         printf("%p\n", pluginHandle);
         log(pluginPath, " is loaded.\n");
+        if(autoScanMode)
+        {
+            log(pluginPath, " performing auto scan.\n");
+            scanCommand(pluginHandle);
+        }
     }
     else
     {
@@ -567,6 +579,10 @@ int main(int argc, char const *argv[])
         {
             setenv("NONSECURE", "true", 1);
         }
+        else if (strcmp(argv[i], "-s") == 0)
+        {
+            autoScanMode = true;
+        }
         else if (strcmp(argv[i], "-a") == 0)
         {
             autoAddMode = true;
index 0b98b42..272546d 100644 (file)
@@ -36,9 +36,9 @@ def maskFlags(flags):
 # Build flags
 ######################################################################
 mpmclient_env.PrependUnique(CPPPATH=[
-    os.path.join(bridging_dir, 'include'),
-    os.path.join(bridging_dir, 'mini_plugin_manager'),
-    os.path.join(bridging_dir, 'mpm_client')
+    '#/bridging/include',
+    '#/bridging/mini_plugin_manager',
+    '#/bridging/mpm_client',
 ])
 
 # Note: Each of the plugin names need to be listed here after 'minipluginmanager'.
@@ -46,7 +46,13 @@ mpmclient_env.PrependUnique(CPPPATH=[
 mpmclient_env.PrependUnique(LIBS=['minipluginmanager'])
 mpmclient_env.AppendUnique(LIBS=['pthread'])
 mpmclient_env.AppendUnique(LIBS=[
-    'm', 'octbstack', 'ocsrm', 'mpmcommon', 'connectivity_abstraction', 'coap', 'curl'
+    'm',
+    'octbstack',
+    'ocsrm',
+    'mpmcommon',
+    'connectivity_abstraction',
+    'coap',
+    'curl'
 ])
 
 if target_os in ['linux', 'tizen', 'yocto']:
index 1278949..158cfac 100644 (file)
@@ -32,7 +32,7 @@ bridging_path = os.path.join(src_dir, 'bridging')
 
 hue_env = env.Clone()
 
-print "Reading Hue Plugin script"
+print("Reading Hue Plugin script")
 
 
 def maskFlags(flags):
@@ -45,21 +45,22 @@ def maskFlags(flags):
 ######################################################################
 
 hue_env.PrependUnique(CPPPATH=[
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common'),
-    os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
-    os.path.join(src_dir, 'resource', 'include'),
-    os.path.join(src_dir, 'extlibs', 'cjson'),
-    os.path.join(src_dir, 'extlibs', 'tinycbor', 'src'),
-    os.path.join(src_dir, 'extlibs', 'rapidjson', 'rapidjson', 'include', 'rapidjson')
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
+    '#/resource/c_common',
+    '#/resource/oc_logger/include',
+    '#/resource/csdk/logger/include',
+    '#/resource/csdk/include',
+    '#/resource/csdk/stack/include',
+    '#/resource/include',
+    '#/extlibs/cjson',
+    '#/extlibs/tinycbor/src',
+    '#/extlibs/rapidjson/rapidjson/include/rapidjson'
 ])
+
 hue_env.AppendUnique(CPPPATH=[
-    os.path.join(bridging_path, 'include'),
-    os.path.join(bridging_path, 'plugins', 'hue_plugin', 'hue_objects')
+    '#/bridging/include',
+    '#/bridging/plugins/hue_plugin/hue_objects',
 ])
 
 if target_os not in ['arduino', 'windows']:
@@ -74,14 +75,20 @@ if hue_env.get('LOGGING'):
     hue_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
 hue_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
-hue_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 hue_env.AppendUnique(LINKFLAGS=[
+    '-Wl,--allow-shlib-undefined',
     '-Wl,--whole-archive',
-    hue_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    hue_env.get('BUILD_DIR') + 'libmpmcommon.a',
+    '-Wl,-no-whole-archive',
 ])
 
 hue_env.AppendUnique(LIBS=[
-    'm', 'cjson', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap',
+    'm',
+    'cjson',
+    'octbstack',
+    'ocsrm',
+    'connectivity_abstraction',
+    'coap',
     'curl'
 ])
 
@@ -90,13 +97,11 @@ hue_env.AppendUnique(LIBS=[
 ######################################################################
 
 hue_src = [
-    os.path.join(bridging_path, 'plugins', 'hue_plugin', 'hue_resource.cpp'),
-    os.path.join(bridging_path, 'plugins', 'hue_plugin', 'hue_auth_spec.cpp'),
-    os.path.join(bridging_path, 'plugins', 'hue_plugin', 'hue_file.cpp'),
-    os.path.join(bridging_path, 'plugins', 'hue_plugin', 'hue_objects',
-                 'hue_bridge.cpp'),
-    os.path.join(bridging_path, 'plugins', 'hue_plugin', 'hue_objects',
-                 'hue_light.cpp'),
+    'hue_resource.cpp',
+    'hue_auth_spec.cpp',
+    'hue_file.cpp',
+    'hue_objects/hue_bridge.cpp',
+    'hue_objects/hue_light.cpp',
 ]
 
 hue_env.AppendUnique(HUE_SRC=hue_src)
index 35d2af7..dbf97c2 100644 (file)
@@ -39,7 +39,7 @@
 #include "hue_defs.h"
 #include "curlClient.h"
 #include "cJSON.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "HUE_AUTH"
 
index f9a5701..f669c0d 100644 (file)
@@ -32,7 +32,7 @@
 #include "cJSON.h"
 #include <pthread.h>
 #include <map>
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "HUE_FILE"
 
index 2846cac..493ceb5 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "hue_bridge.h"
 #include "curlClient.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 41e7ac6..ad4263f 100644 (file)
@@ -30,7 +30,7 @@
 #include "writer.h"
 #include "curlClient.h"
 #include "JsonHelper.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "HUE_LIGHT"
 using namespace rapidjson;
index ca7bcf0..1b6a3c9 100644 (file)
@@ -44,7 +44,7 @@
 #include <iostream>
 #include <map>
 #include <mutex>
-#include "logger.h"
+#include "experimental/logger.h"
 #include "mpmErrorCode.h"
 #include "pluginServer.h"
 #include "hue_light.h"
index 849a54a..710a2dd 100644 (file)
@@ -32,7 +32,7 @@ bridging_path = os.path.join(src_dir, 'bridging')
 
 lifx_env = env.Clone()
 
-print "Reading LifX Plugin script"
+print("Reading LifX Plugin script")
 
 def maskFlags(flags):
     flags = [flags.replace('-Wl,--no-undefined', '') for flags in flags]
@@ -44,21 +44,21 @@ def maskFlags(flags):
 ######################################################################
 
 lifx_env.PrependUnique(CPPPATH=[
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common'),
-    os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
-    os.path.join(src_dir, 'resource', 'include'),
-    os.path.join(src_dir, 'extlibs', 'cjson'),
-    os.path.join(src_dir, 'extlibs', 'tinycbor', 'src'),
-    os.path.join(src_dir, 'extlibs', 'rapidjson', 'rapidjson', 'include', 'rapidjson')
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
+    '#/resource/c_common',
+    '#/resource/oc_logger/include',
+    '#/resource/csdk/logger/include',
+    '#/resource/csdk/include',
+    '#/resource/csdk/stack/include',
+    '#/resource/include',
+    '#/extlibs/cjson',
+    '#/extlibs/tinycbor/src',
+    '#/extlibs/rapidjson/rapidjson/include/rapidjson'
 ])
 lifx_env.AppendUnique(CPPPATH=[
-    os.path.join(bridging_path, 'include'),
-    os.path.join(bridging_path, 'plugins', 'lifx_plugin', 'lifx_objects')
+    '#/bridging/include',
+    '#/bridging/plugins/lifx_plugin/lifx_objects',
 ])
 
 if 'g++' in lifx_env.get('CXX'):
@@ -66,14 +66,20 @@ if 'g++' in lifx_env.get('CXX'):
         CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
 
 lifx_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
-lifx_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 lifx_env.AppendUnique(LINKFLAGS=[
+    '-Wl,--allow-shlib-undefined',
     '-Wl,--whole-archive',
-    lifx_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    lifx_env.get('BUILD_DIR') + 'libmpmcommon.a',
+    '-Wl,-no-whole-archive',
 ])
 
 lifx_env.AppendUnique(LIBS=[
-    'm', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap', 'curl'
+    'm',
+    'octbstack',
+    'ocsrm',
+    'connectivity_abstraction',
+    'coap',
+    'curl',
 ])
 
 #####################################################################
@@ -81,8 +87,8 @@ lifx_env.AppendUnique(LIBS=[
 ######################################################################
 
 lifx_src = [
-    os.path.join(bridging_path, 'plugins', 'lifx_plugin', 'lifxResource.cpp'),
-    os.path.join(bridging_path, 'plugins', 'lifx_plugin', 'lifx_objects', 'lifx.cpp'),
+    'lifxResource.cpp',
+    'lifx_objects/lifx.cpp',
 ]
 
 lifx_env.AppendUnique(LIFX_SRC=lifx_src)
index 8a33916..bd0caef 100644 (file)
@@ -34,7 +34,7 @@
 #include "oic_malloc.h"
 #include "oic_string.h"
 #include "lifx.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include "ConcurrentIotivityUtils.h"
 
 using namespace std;
index cc10d5d..5e1fabf 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdexcept>
 #include <iostream>
 #include "lifx.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "LIFX"
 using namespace OC::Bridging;
index ed87192..f71620c 100644 (file)
@@ -32,7 +32,7 @@ bridging_path = os.path.join(src_dir, 'bridging')
 
 lyric_env = env.Clone()
 
-print "Reading Lyric Plugin script"
+print("Reading Lyric Plugin script")
 
 
 def maskFlags(flags):
@@ -45,22 +45,22 @@ def maskFlags(flags):
 ######################################################################
 
 lyric_env.PrependUnique(CPPPATH=[
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common'),
-    os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
-    os.path.join(src_dir, 'resource', 'include'),
-    os.path.join(src_dir, 'extlibs', 'cjson'),
-    os.path.join(src_dir, 'extlibs', 'tinycbor', 'src'),
-    os.path.join(src_dir, 'extlibs', 'rapidjson', 'rapidjson', 'include', 'rapidjson')
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
+    '#/resource/c_common',
+    '#/resource/oc_logger/include',
+    '#/resource/csdk/logger/include',
+    '#/resource/csdk/include',
+    '#/resource/csdk/stack/include',
+    '#/resource/include',
+    '#/extlibs/cjson',
+    '#/extlibs/tinycbor/src',
+    '#/extlibs/rapidjson/rapidjson/include/rapidjson'
 ])
 lyric_env.AppendUnique(CPPPATH=[
-    os.path.join(bridging_path, 'include'),
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin'),
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywell_objects')
+    '#/bridging/include',
+    '#/bridging/plugins/lyric_plugin',
+    '#/bridging/plugins/lyric_plugin/honeywell_objects',
 ])
 
 if 'g++' in lyric_env.get('CXX'):
@@ -68,14 +68,20 @@ if 'g++' in lyric_env.get('CXX'):
         CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
 
 lyric_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
-lyric_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 lyric_env.AppendUnique(LINKFLAGS=[
+    '-Wl,--allow-shlib-undefined',
     '-Wl,--whole-archive',
-    lyric_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    lyric_env.get('BUILD_DIR') + 'libmpmcommon.a',
+    '-Wl,-no-whole-archive'
 ])
 
 lyric_env.AppendUnique(LIBS=[
-    'm', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap', 'curl'
+    'm',
+    'octbstack',
+    'ocsrm',
+    'connectivity_abstraction',
+    'coap',
+    'curl',
 ])
 
 #####################################################################
@@ -83,11 +89,11 @@ lyric_env.AppendUnique(LIBS=[
 ######################################################################
 
 lyric_src = [
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywellResource.cpp'),
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywellHelpers.cpp'),
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywell_objects', 'honeywellLyric.cpp'),
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywell_objects', 'honeywell.cpp'),
-    os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywell_objects', 'honeywellThermostat.cpp'),
+    'honeywellResource.cpp',
+    'honeywellHelpers.cpp',
+    'honeywell_objects/honeywellLyric.cpp',
+    'honeywell_objects/honeywell.cpp',
+    'honeywell_objects/honeywellThermostat.cpp',
 ]
 
 lyric_env.AppendUnique(LYRIC_SRC=lyric_src)
index 07e81be..32608b1 100644 (file)
@@ -20,7 +20,7 @@
 //
 
 #include "honeywellHelpers.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include <stdlib.h> // realloc
 #include <string.h> // memcpy
 #include <sstream> // ostringstream
index f2043f3..976da8d 100644 (file)
@@ -51,7 +51,7 @@
 #include "oic_malloc.h"
 #include "oic_string.h"
 #include "honeywellLyric.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include "ConcurrentIotivityUtils.h"
 #include "octypes.h"
 #include "ocstack.h"
index e14acb1..111f7f5 100644 (file)
@@ -32,7 +32,7 @@
 #include "document.h"
 #include "stringbuffer.h"
 #include "writer.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include <math.h>  // for fmin
 #include <sstream> // for stringstream
 #include <map>
index 3c9d1dd..93f32d9 100644 (file)
@@ -30,7 +30,7 @@
 #include "document.h"
 #include "stringbuffer.h"
 #include "writer.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include <math.h>  // for fmin
 #include <sstream> // for stringstream
 #include <map>
index cd74b89..e34179b 100644 (file)
@@ -31,7 +31,7 @@
 #include "writer.h"
 #include "stringbuffer.h"
 #include "curlClient.h"
-#include "logger.h"
+#include "experimental/logger.h"
 #include "../honeywellHelpers.h"
 
 #define LOG_TAG "HONEYWELL_THERMOSTAT"
index 866d51d..c1076df 100644 (file)
@@ -32,7 +32,7 @@ bridging_path = os.path.join(src_dir, 'bridging')
 
 nest_env = env.Clone()
 
-print "Reading Nest Plugin script"
+print("Reading Nest Plugin script")
 
 
 def maskFlags(flags):
@@ -45,21 +45,21 @@ def maskFlags(flags):
 ######################################################################
 
 nest_env.PrependUnique(CPPPATH=[
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
-    os.path.join(src_dir, 'resource', 'c_common'),
-    os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'include'),
-    os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
-    os.path.join(src_dir, 'resource', 'include'),
-    os.path.join(src_dir, 'extlibs', 'cjson'),
-    os.path.join(src_dir, 'extlibs', 'tinycbor', 'src'),
-    os.path.join(src_dir, 'extlibs', 'rapidjson', 'rapidjson', 'include', 'rapidjson')
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
+    '#/resource/c_common',
+    '#/resource/oc_logger/include',
+    '#/resource/csdk/logger/include',
+    '#/resource/csdk/include',
+    '#/resource/csdk/stack/include',
+    '#/resource/include',
+    '#/extlibs/cjson',
+    '#/extlibs/tinycbor/src',
+    '#/extlibs/rapidjson/rapidjson/include/rapidjson'
 ])
 nest_env.AppendUnique(CPPPATH=[
-    os.path.join(bridging_path, 'include'),
-    os.path.join(bridging_path, 'plugins', 'nest_plugin', 'nest_objects')
+    '#/bridging/include',
+    '#/bridging/plugins/nest_plugin/nest_objects',
 ])
 
 if target_os not in ['arduino', 'windows']:
@@ -76,10 +76,11 @@ if nest_env.get('LOGGING'):
     nest_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
 nest_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
-nest_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 nest_env.AppendUnique(LINKFLAGS=[
+    '-Wl,--allow-shlib-undefined',
     '-Wl,--whole-archive',
-    nest_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    nest_env.get('BUILD_DIR') + 'libmpmcommon.a',
+    '-Wl,-no-whole-archive',
 ])
 
 nest_env.PrependUnique(LIBS=[
@@ -96,9 +97,9 @@ nest_env.PrependUnique(LIBS=[
 ######################################################################
 
 nest_src = [
-    os.path.join(bridging_path, 'plugins', 'nest_plugin', 'nestResource.cpp'),
-    os.path.join(bridging_path, 'plugins', 'nest_plugin', 'nest_objects', 'nest.cpp'),
-    os.path.join(bridging_path, 'plugins', 'nest_plugin', 'nest_objects', 'nestThermostat.cpp'),
+    'nestResource.cpp',
+    'nest_objects/nest.cpp',
+    'nest_objects/nestThermostat.cpp',
 ]
 
 nest_env.AppendUnique(NEST_SRC=nest_src)
index c6b4fd8..4bb1335 100644 (file)
@@ -37,7 +37,7 @@
 #include <cstdlib>
 #include <iostream>
 #include <time.h>
-#include "logger.h"
+#include "experimental/logger.h"
 #include "ConcurrentIotivityUtils.h"
 #include "messageHandler.h"
 #include "ocpayload.h"
index 8b40848..d45421a 100644 (file)
@@ -29,7 +29,7 @@
 #include "stringbuffer.h"
 #include "writer.h"
 #include "JsonHelper.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 using namespace rapidjson;
 using namespace OC::Bridging;
index d6f6a04..6389bd2 100644 (file)
@@ -28,7 +28,7 @@
 #include "writer.h"
 #include "stringbuffer.h"
 #include "curlClient.h"
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "NEST_THERMOSTAT"
 
index b8f26c4..6fe1795 100644 (file)
@@ -27,7 +27,7 @@
 #include <set>
 #include <assert.h>
 #include <pluginServer.h>
-#include "logger.h"
+#include "experimental/logger.h"
 
 #define TAG "STUB_PLUGIN"
 
index b46c773..bb87765 100755 (executable)
@@ -4,7 +4,9 @@
 #    release/debug, target os, target arch, cross toolchain, build environment etc
 ##
 import os
+import sys
 import platform
+import re
 
 project_version = '1.3.1'
 
@@ -104,7 +106,7 @@ targets_disallow_multitransport = ['arduino']
 
 # generate a list of unique targets: convert to set() for uniqueness,
 # then convert back to a list
-targetlist = list(set(x for l in host_target_map.values() for x in l))
+targetlist = list(set(x for l in list(host_target_map.values()) for x in l))
 
 ######################################################################
 # Common build options
@@ -247,6 +249,17 @@ if target_os in ['linux']:
                      'Make all compiler warnings into errors.',
                       default=True))
 
+targets_support_valgrind = ['linux', 'darwin']
+if target_os in targets_support_valgrind:
+    # Build option to enable unit tests to be run under valgrind.
+    # May need to disable on small-memory platforms (e.g. Raspberry Pi)
+    # Checking for memory leak and usage errors is part of the
+    # acceptance criteria for project code, so this should default to on.
+    help_vars.Add(
+        BoolVariable('VALGRIND_CHECKS',
+                     'Build support for running code coverage checks',
+                      default=True))
+
 if target_os == 'windows':
     # Builds differ based on Visual Studio version
     #   For VS2013, MSVC_VERSION is '12.0'.
@@ -312,25 +325,25 @@ if env.get('WITH_ENV'):
     env['ENV'] = os.environ
     if 'CC' in os.environ:
         env['CC'] = Split(os.environ['CC'])
-        print "using CC from environment: %s" % env['CC']
+        print("using CC from environment: %s" % env['CC'])
     if 'CXX' in os.environ:
         env['CXX'] = Split(os.environ['CXX'])
-        print "using CXX from environment: %s" % env['CXX']
+        print("using CXX from environment: %s" % env['CXX'])
     if 'CFLAGS' in os.environ:
         env['CFLAGS'] = Split(os.environ['CFLAGS'])
-        print "using CFLAGS from environment: %s" % env['CFLAGS']
+        print("using CFLAGS from environment: %s" % env['CFLAGS'])
     if 'CXXFLAGS' in os.environ:
         env['CXXFLAGS'] = Split(os.environ['CXXFLAGS'])
-        print "using CXXFLAGS from environment: %s" % env['CXXFLAGS']
+        print("using CXXFLAGS from environment: %s" % env['CXXFLAGS'])
     if 'CCFLAGS' in os.environ:
         env['CCFLAGS'] = Split(os.environ['CCFLAGS'])
-        print "using CCFLAGS from environment: %s" % env['CCFLAGS']
+        print("using CCFLAGS from environment: %s" % env['CCFLAGS'])
     if 'CPPFLAGS' in os.environ:
         env['CPPFLAGS'] = Split(os.environ['CPPFLAGS'])
-        print "using CPPFLAGS from environment: %s" % env['CPPFLAGS']
+        print("using CPPFLAGS from environment: %s" % env['CPPFLAGS'])
     if 'LDFLAGS' in os.environ:
         env['LINKFLAGS'] = Split(os.environ['LDFLAGS'])
-        print "using LDFLAGS/LINKFLAGS from environment: %s" % env['LINKFLAGS']
+        print("using LDFLAGS/LINKFLAGS from environment: %s" % env['LINKFLAGS'])
 
 # set quieter build messages unless verbose mode was requested
 if not env.get('VERBOSE'):
@@ -368,7 +381,7 @@ if target_os in targets_support_cc:
         env.AppendUnique(LINKFLAGS=['--sysroot=' + sys_root])
 
     if prefix or tc_path:
-        print tc_set_msg
+        print(tc_set_msg)
 
 # Import env variables only if reproductibility is ensured
 if target_os in ['yocto']:
@@ -377,7 +390,7 @@ else:
     env['CONFIG_ENVIRONMENT_IMPORT'] = False
 
 if env['CONFIG_ENVIRONMENT_IMPORT']:
-    print "warning: importing some environment variables for OS: %s" % target_os
+    print("warning: importing some environment variables for OS: %s" % target_os)
     for ev in [
         'PATH',
         'PKG_CONFIG',
@@ -486,7 +499,7 @@ def __installbin(ienv, targets, name):
 def __installheader(ienv, targets, dir, name):
     user_prefix = env.get('PREFIX')
     if user_prefix:
-        i_n = ienv.Install(user_prefix + '/include/' + dir, targets)
+        i_n = ienv.Install(user_prefix + '/include/iotivity/' + dir, targets)
     else:
         i_n = ienv.Install(
             os.path.join(env.get('BUILD_DIR'), 'include', dir), targets)
@@ -516,6 +529,7 @@ def __add_pthread_if_needed(ienv):
     if 'gcc' == ienv.get('CC') and target_os not in ['android']:
         ienv.AppendUnique(LINKFLAGS="-pthread")
 
+
 def __print_targets(env):
     Help('''
 ===============================================================================
@@ -556,7 +570,10 @@ user_prefix = env.get('PREFIX')
 user_lib = env.get('LIB_INSTALL_DIR')
 
 if not user_prefix:
-    user_prefix = env.get('BUILD_DIR').encode('string_escape')
+    try:
+        user_prefix = env.get('BUILD_DIR').encode('string_escape')
+    except LookupError:
+        user_prefix = env.get('BUILD_DIR').encode('unicode_escape')
 
 if not user_lib:
     user_lib = '$${prefix}/lib'
@@ -823,10 +840,48 @@ conf = Configure(
 # threading and mutexes.  This will set the environment variable
 # POSIX_SUPPORTED, 1 if it is supported, 0 otherwise
 conf.CheckPThreadsSupport()
-
 env = conf.Finish()
+
+######################################################################
+# Generate Cbor from json files
 ######################################################################
+json2cbor = env.get('BUILD_DIR') + 'resource/csdk/security/tool/json2cbor' + env.get('PROGSUFFIX')
+
+def generate_actions(source, target, env, for_signature):
+    Depends(target, json2cbor)
+    return " %s %s %s" % (json2cbor, source[0], target[0])
+
+builder = Builder(generator = generate_actions,
+                  suffix = '.dat',
+                  src_suffix = '.json')
+
+env.Append(BUILDERS = {'Cbor' : builder})
+
+
+def ScanJSON(env, directory):
+    targets = []
+    if env.GetOption('clean') or env.get('SECURED') != '1':
+        return targets
+    dst_dir = env.get('BUILD_DIR') + '/' + directory + '/'
+    src_dir = env.get('SRC_DIR') + '/' + directory + '/'
+    for json_file in Glob('*.json'):
+        targets += env.Install(dst_dir, str(json_file))
+        if env.get('CROSS_COMPILE') != None:
+            cbor_file = src_dir + re.sub('\.json$', '.dat', str(json_file))
+            targets += Install(dst_dir, cbor_file)
+        else:
+            cbor_file = env.Cbor(json_file)
+            targets.append(cbor_file)
+            cbor_file = Flatten(cbor_file)[0].name
+            src = dst_dir + cbor_file
+            dst = src_dir + cbor_file
+            Command(dst, src, Copy("$TARGET", "$SOURCE"))
 
+    return targets
+
+AddMethod(env, ScanJSON)
+
+######################################################################
 env.SConscript('external_libs.scons')
 
 # these variables depend on a subsidiary script having set a path to
@@ -863,7 +918,7 @@ help_vars.AddVariables(
                  validator=PathVariable.PathAccept),
 )
 help_vars.Update(env)
-Help(help_vars.GenerateHelpText(env, sort=cmp))
+Help(help_vars.GenerateHelpText(env, sort=True))
 # Replicate change that occured after help_var initialisation from env
 if target_os == "yocto":
     env['TARGET_OS'] = 'linux'
index 47c455d..4ae5e52 100644 (file)
@@ -29,7 +29,7 @@ if not env.get('ANDROID_HOME'):
 msg += "\nANDROID_HOME=" + env.get('ANDROID_HOME')
 
 # show the Android environment we will use:
-print msg
+print(msg)
 
 src_dir = env.get('SRC_DIR')
 
@@ -97,12 +97,12 @@ else:
 if tc_ver:
     cmd.append('NDK_TOOLCHAIN_VERSION=' + tc_ver)
 else:
-    print '''
+    print('''
 *************************************** Warning *******************************
 * To support C++11, the NDK toolchain must support gcc >= 4.7
 * Please make sure your  android NDK is at least r8e
 *******************************************************************************
-'''
+''')
 
 cmd.append('-n')
 
index 65a2901..0dcd066 100644 (file)
@@ -40,7 +40,7 @@ def __get_boards(dict):
 
 def __get_cpu(dict, board):
     cpus = []
-    keys = dict.keys()
+    keys = list(dict.keys())
     for key in keys:
         idx = key.find(board + '.menu.cpu.')
         start = len(board + '.menu.cpu.')
@@ -213,13 +213,13 @@ def __upload(env, binary):
         port = '/dev/ttyACM0'
         upload_cmd = arduino_home + '/hardware/tools/avr/bin/avrdude -C' + arduino_home +'/hardware/tools/avr/etc/avrdude.conf -p' \
         + mcu + ' -c' + protocol + ' -P' + port + ' -b' + speed + ' -D -Uflash:w:' + binary + ':i'
-        print "Upload command: %s" % upload_cmd
+        print("Upload command: %s" % upload_cmd)
         install_cmd = env.Command('install_cmd', None, upload_cmd)
         env.Default('install_cmd')
     elif target_arch == 'arm':
         port = 'ttyACM0'
         upload_cmd = 'stty -F /dev/' + port + ' speed 1200 cs8 -cstopb -parenb \n' + arduino_home + '/hardware/tools/bossac -i --port=' + port + ' -U false -e -w -b ' + binary + ' -R'
-        print "Upload command: %s" % upload_cmd
+        print("Upload command: %s" % upload_cmd)
         install_cmd = env.Command('install_cmd', None, upload_cmd)
         env.Default('install_cmd')
 
@@ -260,9 +260,9 @@ target_arch = env.get('TARGET_ARCH')
 
 # Verify that the arduino, time, red bear, and nordic libraries are
 # installed.  If not, get them and install them.
-SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'arduino', 'SConscript'))
+SConscript('#extlibs/arduino/SConscript')
 arduino_home = env.get('ARDUINO_HOME')
-print 'ARDUINO_HOME = ' + env.get('ARDUINO_HOME')
+print('ARDUINO_HOME = ' + env.get('ARDUINO_HOME'))
 
 # Overwrite suffixes and prefixes
 if env['HOST_OS'] == 'win32':
@@ -296,13 +296,13 @@ if os.path.exists(os.path.join(arduino_home, 'lib', 'version.txt')):
     vf = open(os.path.join(arduino_home, 'lib', 'version.txt'), 'r')
     version = vf.readline().replace('.', '').strip()
 else:
-    print '''
+    msg = '''
 ************************************* Error ***********************************
 * Can't find version file (lib/version.txt), please check if (%s)
 * is arduino root directory.                                                  *
 *******************************************************************************
 ''' % arduino_home
-    Exit(1)
+    Exit(msg)
 
 if version[0:2] == '10':
     is_1_0_x = True
@@ -318,13 +318,13 @@ if version[0:2] == '10':
     env.Replace(LINK='avr-gcc')
     env.Replace(RANLIB='avr-ranlib')
     if target_arch != 'avr':
-        print '''
+        msg = '''
 ************************************* Error ***********************************
 * Arduino 1.0.x IDE only support 'avr', to support other arch at least 1.5.x  *
 * is required.
 *******************************************************************************
-'''
-        Exit(1)
+''')
+        Exit(msg)
 else:
     is_1_0_x = False
     if target_arch == 'avr':
@@ -342,11 +342,11 @@ else:
             os.path.join(arduino_home, 'hardware', 'arduino', 'sam',
                          'platform.txt'))
     else:
-        print '''
+        print('''
 ************************************* Error ***********************************
 * CPU arch %s isn't supported currently.
 *******************************************************************************
-''' % target_arch
+''' % target_arch)
 
 #Board option, let user to select the board
 boards = __get_boards(boards_info)
index ab65efc..1b10cf3 100644 (file)
@@ -7,6 +7,7 @@
 import os
 import subprocess
 from distutils.version import StrictVersion
+import SCons.Util
 
 Import('env')
 
@@ -18,7 +19,7 @@ target_os = env.get('TARGET_OS')
 # output not guaranteed not to change (has already happened)
 # These two commands are used to query the xcode environment:
 tc_path = subprocess.check_output('xcode-select -p', shell=True).rstrip()
-tc_sdks = subprocess.check_output('xcodebuild -showsdks', shell=True)
+tc_sdks = subprocess.check_output('xcodebuild -showsdks', shell=True).rstrip()
 
 # 'xcodebuild -showsdks'  returns information formatted as:
 #
@@ -34,7 +35,7 @@ mac_sdks = []
 ios_sdks = []
 sim_sdks = []
 collecting = False
-for line in tc_sdks.split('\n'):
+for line in SCons.Util.to_String(tc_sdks).split('\n'):
     if collecting:
         if "-sdk" in line:
             # drop the trailing "-sdk sdktag
@@ -113,7 +114,7 @@ else:
 if env.get('SECURED') == '1':
     env.AppendUnique(LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
 
-sys_root = tc_path
+sys_root = SCons.Util.to_String(tc_path)
 tmpl = '/Platforms/%s.platform/Developer/SDKs/%s%s.sdk/'
 if target_os == 'darwin':
     sys_root += tmpl % ('MacOSX', 'MacOSX', sys_version)
index 70e537a..0b6dafb 100644 (file)
 ##
 import os
 import subprocess
-import urllib2
+try:
+    from urllib2 import urlopen
+except ModuleNotFoundError:
+    from urllib.request import urlopen
 import SCons.Errors
 
 Import('env')
@@ -47,9 +50,9 @@ def __prepare_lib(ienv, libname, lib=None, path=None, script=None):
 
         # Execute the script to download (if required) and build source code
         if script:
-            st = os.path.join(dir, script)
+            st = dir + '/' + script
         else:
-            st = os.path.join(dir, 'SConscript')
+            st = dir + 'SConscript'
 
         if os.path.exists(st):
             SConscript(st)
@@ -66,12 +69,12 @@ def __prepare_lib(ienv, libname, lib=None, path=None, script=None):
 
 # Run configure command (usually done before building a library)
 def __configure(env, cwd, cmd):
-    print "Configuring using [%s/%s] ..." % (cwd, cmd)
+    print("Configuring using [%s/%s] ..." % (cwd, cmd))
     # build it now (we need the shell, because some programs need it)
-    devnull = open(os.devnull, "wb")
-    handle = subprocess.Popen(cmd, shell=True, cwd=cwd, stdout=devnull)
+    with open(os.devnull, "wb") as devnull:
+        handle = subprocess.Popen(cmd, shell=True, cwd=cwd, stdout=devnull)
 
-    if handle.wait() <> 0:
+    if handle.wait() != 0:
         raise SCons.Errors.BuildError("Run configuring script [%s]" % (cmd))
 
 
@@ -81,16 +84,18 @@ def __download(ienv, target, url):
         return target
 
     try:
-        print "Download %s from %s" % (target, url)
-        print "Downloading ..."
-        stream = urllib2.urlopen(url)
-        file = open(target, 'wb')
-        file.write(stream.read())
-        file.close()
-        print "Download %s from %s complete" % (target, url)
-        return target
-    except Exception, e:
+        print("Download %s from %s" % (target, url))
+        print("Downloading ...")
+        # Python2 does not have a context manager for urlopen
+        stream = urlopen(url)
+        with open(target, 'wb') as file:
+            file.write(stream.read())
+    except Exception as e:
         raise SCons.Errors.StopError('%s [%s]' % (e, url))
+    finally:
+        print("Download %s from %s complete" % (target, url))
+        stream.close()
+        return target
 
 
 # Install header file(s) to <src_dir>/deps/<target_os>/include
index 10326a4..b20a0ac 100644 (file)
@@ -54,18 +54,18 @@ if target_os not in ['windows']:
     env.AppendUnique(LIBPATH = [os.path.join(src_dir, 'deps', target_os, 'lib', target_arch)])
 
 # tinycbor build/fetch
-SConscript(os.path.join(src_dir, 'extlibs', 'tinycbor', 'SConscript'))
+SConscript('#extlibs/tinycbor/SConscript')
 
 #cJSON lib
-SConscript(os.path.join(src_dir, 'extlibs', 'cjson', 'SConscript'))
+SConscript('#extlibs/cjson/SConscript')
 
 with_ra = env.get('WITH_RA')
 if with_ra:
-    SConscript(os.path.join(src_dir, 'extlibs', 'raxmpp', 'SConscript'))
+    SConscript('#extlibs/raxmpp/SConscript')
 
 with_ra_ibb = env.get('WITH_RA_IBB')
 if with_ra_ibb:
-    SConscript(os.path.join(src_dir, 'extlibs', 'wksxmppxep', 'SConscript'))
+    SConscript('#extlibs/wksxmppxep/SConscript')
 
 if env.get('SECURED') == '1' or 'SERVER' in rd_mode:
     if target_os not in ['linux', 'tizen']:
index 3a2ef6a..e0c308d 100644 (file)
@@ -17,7 +17,7 @@
 # This file contains compiler tests for use in scons 'Configure'
 # tests.
 
-from compiler import factory
+from .compiler import factory
 
 def _check_for_broken_gcc_headers(context, flag):
     # Check for issue in some older (pre-C++11) C library headers that
@@ -37,9 +37,10 @@ def _check_for_broken_gcc_headers(context, flag):
     context.Result(ret)
 
     if ret:
-        print('Warning: detected pre-C++11 GCC C header bugs.  See:')
-        print('           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34032')
-        print('         for related details.')
+        print('''
+Warning: detected pre-C++11 GCC C header bugs.
+         See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34032 for details.
+''')
 
 def _inform_user_of_broken_gcc_headers(context, flag):
     # Informative tests used to inform the user of broken GCC headers.
index ed90f40..76f000d 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 # ------------------------------------------------------------------------
 
-from configuration import Configuration
+from .configuration import Configuration
 
 # Default (very simple) compiler configuration
 class DefaultConfiguration(Configuration):
index 7b0bee7..975a081 100644 (file)
@@ -14,8 +14,8 @@
 # limitations under the License.
 # ------------------------------------------------------------------------
 
-from default_configuration import *
-from gcc_configuration import *
+from .default_configuration import *
+from .gcc_configuration import *
 
 # Canonicalize the C or C++ compiler name to "gcc" if gcc is being
 # used to simplify mapping to the GCC compiler configuration since GCC
index fbc8f38..436caeb 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 # ------------------------------------------------------------------------
 
-from configuration import Configuration
+from .configuration import Configuration
 
 # GCC compiler-specific configuration
 class GccConfiguration(Configuration):
@@ -31,7 +31,7 @@ class GccConfiguration(Configuration):
         # flag is required to compile C99 code without warning or
         # error.
 
-        from default_configuration import DefaultConfiguration
+        from .default_configuration import DefaultConfiguration
         def_config = DefaultConfiguration(self._context)
 
         return """
index 5b8beb2..0a3ee41 100644 (file)
@@ -5,7 +5,7 @@
 ##
 import os
 import subprocess
-from distutils.version import StrictVersion
+from distutils.version import LooseVersion
 
 Import('env')
 
@@ -32,15 +32,28 @@ env.AppendUnique(LIBS=['dl', 'pthread', 'uuid'])
 
 # The -Wno-error=missing-field-initializers is used due to a bug in versions
 # of gcc older than 5.0 see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
-# this bug causes structs initialized with {0} to generate missing-field-initializers
-# warning. This is a valid way to initialize a struct and was fixed in later versions.
+# this bug causes structs initialized with {0} to generate a
+# missing-field-initializers warning. This is a valid way to initialize
+# a struct and was fixed in later versions.
 # since gcc versions older than 5.0 are still used to build the code we do not
 # want to consider the missing-field-initializer warning.
 # The -Wno-missing-braces is also due to a bug using bracket initializers
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137
 # it was also fixed in later versions of gcc.
-gcc_ver = subprocess.check_output([env['CC'], '-dumpversion'], stderr=subprocess.STDOUT)
-if StrictVersion(gcc_ver) < StrictVersion('5.0'):
+#
+# Note: starting with gcc7, -dumpversion returns a non-dotted version (just
+# the major), and this is invalid for distutils.version.StrictVersion. Use
+# LooseVersion for the check instead as it accepts a version like '7'
+# (bug IOT-2862).
+# Additionally, for Python 3, check_output() returns a binary string
+# which is a pain. To avoid decoding, use the new getoutput() method if
+# available. Since this does not exist in Py 2.X, use a try block.
+
+try:
+    gcc_ver = subprocess.getoutput('gcc -dumpversion').rstrip()
+except AttributeError:
+    gcc_ver = subprocess.check_output(['gcc', '-dumpversion'], stderr=subprocess.STDOUT).rstrip()
+if LooseVersion(gcc_ver) < LooseVersion('5.0'):
     env.AppendUnique(CFLAGS=['-Wno-missing-field-initializers'])
     env.AppendUnique(CCFLAGS=['-Wno-missing-braces'])
 
index bb12e1f..56a1251 100755 (executable)
@@ -7,7 +7,7 @@ import SCons.Util
 
 Import('env')
 
-print "Reading linux configuration script"
+print("Reading linux configuration script")
 
 env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', ""))
 env.AppendUnique(CPPDEFINES=['WITH_POSIX', '__linux__'])
index 9faabba..19d460b 100644 (file)
@@ -58,6 +58,8 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.             #
 ############################################################################
 
+# iotivity note: this is a forked copy of the UnpackBuilder elsewhere
+# in the tree, which instead of defining a Builder, adds a method UnpackAll.
 
 
 # The Unpack Builder can be used for unpacking archives (eg Zip, TGZ, BZ, ... ).
@@ -156,7 +158,7 @@ def __fileextractor_win_7zip( env, count, no, i ) :
 def __getExtractor( source, env ) :
     # we check each unpacker and get the correc  list command first, run the command and
     # replace the target filelist with the list values, we sorte the extractors by their priority
-    for unpackername, extractor in sorted(env["UNPACK"]["EXTRACTOR"].iteritems(), key = lambda (k,v) : (v["PRIORITY"],k)):
+    for unpackername, extractor in sorted(iter(env["UNPACK"]["EXTRACTOR"].items()), key = lambda k_v : (k_v[1]["PRIORITY"],k_v[0])):
 
         # if the run command not set, we continue the extractor search, otherwise we check the extractor parameters
         if not SCons.Util.is_String(extractor["RUN"]) :
@@ -193,7 +195,7 @@ def __getExtractor( source, env ) :
 # @param source source name
 # @param env environment object
 def __message( s, target, source, env ) :
-    print "extract [%s] ..." % (source[0])
+    print("extract [%s] ..." % (source[0]))
 
 
 # action function for extracting of the data
@@ -220,7 +222,7 @@ def __action( target, source, env ) :
         devnull = open(os.devnull, "wb")
         handle  = subprocess.Popen( cmd, shell=True, stdout=devnull )
 
-    if handle.wait() <> 0 :
+    if handle.wait() != 0 :
         raise SCons.Errors.BuildError( "error running extractor [%s] on the source [%s]" % (cmd, source[0])  )
 
 
@@ -257,7 +259,7 @@ def __emitter( target, source, env ) :
     handle = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
     target = handle.stdout.readlines()
     handle.communicate()
-    if handle.returncode <> 0 :
+    if handle.returncode != 0 :
         raise SCons.Errors.StopError("error on running list command [%s] of the source file [%s]" % (cmd, source[0]) )
 
     # if the returning output exists and the listseperator is a callable structure
@@ -265,8 +267,8 @@ def __emitter( target, source, env ) :
     # a string we push it back to the target list
     try :
         if callable(extractor["LISTEXTRACTOR"]) :
-            target = filter( lambda s : SCons.Util.is_String(s), [ extractor["LISTEXTRACTOR"]( env, len(target), no, i) for no, i in enumerate(target) ] )
-    except Exception, e :
+            target = [s for s in [extractor["LISTEXTRACTOR"](env, len(target), no, i) for no, i in enumerate(target)] if SCons.Util.is_String(s)]
+    except Exception as e :
         raise SCons.Errors.StopError( "%s" % (e) )
 
     # the line removes duplicated names - we need this line, otherwise an cyclic dependency error will occured,
@@ -276,7 +278,7 @@ def __emitter( target, source, env ) :
         SCons.Warnings.warn(UnpackWarning, "emitter file list on target [%s] is empty, please check your extractor list function [%s]" % (source[0], cmd) )
 
     # we append the extractdir to each target if is not absolut
-    if env["UNPACK"]["EXTRACTDIR"] <> "." :
+    if env["UNPACK"]["EXTRACTDIR"] != "." :
         target = [i if os.path.isabs(i) else os.path.join(env["UNPACK"]["EXTRACTDIR"], i) for i in target]
 
     return target, source
@@ -285,7 +287,7 @@ def __unpack_all(env, target, source) :
     if os.path.exists(target):
         return
 
-    print "Unpacking %s ..." % source
+    print("Unpacking %s ..." % source)
     __action(target, source, env)
 
 # generate function, that adds the builder to the environment
@@ -378,7 +380,7 @@ def generate( env ) :
     }
 
     # read tools for Windows system
-    if env["PLATFORM"] <> "darwin" and "win" in env["PLATFORM"] :
+    if env["PLATFORM"] != "darwin" and "win" in env["PLATFORM"] :
 
         if env.WhereIs('7z', env.get('PATH')):
             toolset["EXTRACTOR"]["TARGZ"]["RUN"]           = "7z"
@@ -423,12 +425,13 @@ def generate( env ) :
             toolset["EXTRACTOR"]["TAR"]["EXTRACTFLAGS"]    = "x"
             toolset["EXTRACTOR"]["TAR"]["EXTRACTSUFFIX"]   = "-y -ttar -o${UNPACK['EXTRACTDIR']}"
         else:
-            print '''*********************** Error ************************
+            print('''
+*********************** Error ************************
 *                                                    *
 * Please make sure that 7-zip is in your System PATH *
 *                                                    *
 ******************************************************
-'''
+''')
 
         # here can add some other Windows tools, that can handle the archive files
         # but I don't know which ones can handle all file types
@@ -477,12 +480,19 @@ def generate( env ) :
     else :
         raise SCons.Errors.StopError("Unpack tool detection on this platform [%s] unkown" % (env["PLATFORM"]))
 
-    # the target_factory must be a "Entry", because the target list can be files and dirs, so we can not specified the targetfactory explicite
+    # the target_factory must be an "Entry", because the target list can be
+    # files and dirs, so we can not specify the targetfactory explicitly
     env.Replace(UNPACK = toolset)
+    #env["BUILDERS"]["UnpackAll"] = SCons.Builder.Builder(
+    #    action=__action,
+    #    emitter=__emitter,
+    #    target_factory=SCons.Node.FS.Entry,
+    #    source_factory=SCons.Node.FS.File,
+    #    single_source=True,
+    #    PRINT_CMD_LINE_FUNC=__message
+    #)
     env.AddMethod(__unpack_all, 'UnpackAll')
 
-#    env["BUILDERS"]["UnpackAll"] = SCons.Builder.Builder( action = __action,  emitter = __emitter,  target_factory = SCons.Node.FS.Entry,  source_factory = SCons.Node.FS.File,  single_source = True,  PRINT_CMD_LINE_FUNC = __message )
-
 
 # existing function of the builder
 # @param env environment object
index 725335a..fbd8b8d 100644 (file)
@@ -20,7 +20,7 @@ def OpenRegKey(env, key, sub_key, reg_view_64bit=False):
                               sub_key,
                               0, # Reserved
                               reg_access_mask)
-    except WindowsError, err:
+    except WindowsError as err:
         if err.errno != os.errno.ENOENT:
             # Couldn't open Registry Key
             Exit('Error: Could not Open %s Registry Key. Err=%s' % (sub_key, err.errno))
@@ -37,7 +37,7 @@ def ReadRegistryStringValue(env, key, sub_key, value_name, reg_view_64bit=False)
             (value, type) = winreg.QueryValueEx(hkey, value_name)
             if type != winreg.REG_SZ:
                 Exit('Error: Registry Value \'%s\' is not a String' % value_name)
-        except WindowsError, err:
+        except WindowsError as err:
             if err.errno != os.errno.ENOENT:
                 Exit('Error: Could not QueryValueEx for Registry Value \'%s\'. Err=%s' \
                      % (value_name, err.errno))
index f2ef5e8..fc27b60 100644 (file)
@@ -15,7 +15,7 @@ gradle_url = 'https://services.gradle.org/distributions/' + gradle_zip_file
 
 if not os.path.exists(gradle_dir):
     if not os.path.exists(gradle_zip_file):
-        print "Retrieving Android Gradle bundle"
+        print("Retrieving Android Gradle bundle")
         gradle_zip = env.Download(gradle_zip_file, gradle_url)
     gradle_unpacked = env.UnpackAll(gradle_dir, gradle_zip)
 
index 772a648..5a949f2 100644 (file)
@@ -30,12 +30,12 @@ else:
 ndk_path = os.path.join(Dir('.').abspath, ndk_dir)
 if not os.path.exists(ndk_path):
     if not os.path.exists(ndk_bundle):
-        print "Retrieving Android NDK bundle"
+        print("Retrieving Android NDK bundle")
         env.Download(ndk_bundle, ndk_url)
-    print "Unpacking Android NDK bundle"
+    print("Unpacking Android NDK bundle")
     if host_os.startswith('linux'):
         # scons on Jenkins/android builder does not take 'a+x' mode, use octal
-        Execute(Chmod(ndk_bundle, 0755))
+        Execute(Chmod(ndk_bundle, 0o755))
         if Execute("./" + ndk_bundle):
             Exit("Unpack %s failed" % ndk_bundle)
     elif host_os == 'darwin':
index 01a4f7a..b877726 100644 (file)
@@ -41,13 +41,13 @@ if not env.get('ANDROID_HOME'):
 
     if not os.path.exists(androidlib_dir):
         if not os.path.exists(androidlib_bundle):
-            print "Retrieving Android SDK bundle"
+            print("Retrieving Android SDK bundle")
             androidlib_zip = env.Download(androidlib_bundle, androidlib_url)
         else:
             androidlib_zip = androidlib_bundle
 
-        print 'Unzipping Android lib...'
+        print('Unzipping Android lib...')
         env.UnpackAll(androidlib_dir, androidlib_zip)
-        print 'Unzipping Android lib complete'
+        print('Unzipping Android lib complete')
     # export the location of the SDK
     env.Replace(ANDROID_HOME=androidlib_dir)
index f086b31..cf6eb85 100644 (file)
@@ -14,14 +14,14 @@ Import('env')
 target_os = env.get('TARGET_OS')
 src_dir = env.get('SRC_DIR')
 
-SConscript(src_dir + '/build_common/tools/UnpackAll.py')
+SConscript('#build_common/tools/UnpackAll.py')
 
 # Download
 if target_os == 'arduino':
     arduino_home = env.get('ARDUINO_HOME')
     if not arduino_home:
-        print 'Creating ARDUINO_HOME for Arduino lib'
-        print '''
+        print('Creating ARDUINO_HOME for Arduino lib')
+        print('''
 *******************************************************************************
 * Arduino root directory is not set, you can set enviornment variable
 * ARDUINO_HOME or add it in command line as follows (Only set if your
@@ -29,13 +29,13 @@ if target_os == 'arduino':
 * wish to manually set ARDUINO_HOME):
 *   # scons ARDUINO_HOME=<path to arduino root directory> ...
 *******************************************************************************
-'''
+''')
         arduinolib_dir = src_dir + '/extlibs/arduino/arduino-1.5.8'
 
         if not os.path.exists(arduinolib_dir):
             if _platform.startswith("linux"):
                 archType = 8 * struct.calcsize("P")
-                print 'On %s-bit machine.' % (archType)
+                print('On %s-bit machine.' % (archType))
                 if archType == 32:
                     arduinolib_zip_file = src_dir + '/extlibs/arduino/arduino-1.5.8-linux32.tgz'
                     arduinolib_url = 'http://arduino.cc/download.php?f=/arduino-1.5.8-linux32.tgz'
@@ -56,9 +56,9 @@ if target_os == 'arduino':
                 arduinolib_zip = arduinolib_zip_file
 
             # Unzip the lib
-            print 'Unzipping arduino lib...'
+            print('Unzipping arduino lib...')
             env.UnpackAll(arduinolib_dir, arduinolib_zip)
-            print 'Unzipping arduino lib complete'
+            print('Unzipping arduino lib complete')
 
             # Remove downloaded file
             os.remove(arduinolib_zip_file)
@@ -81,12 +81,12 @@ if target_os == 'arduino':
                 timelib_zip = timelib_zip_file
 
             # Unzip the lib
-            print 'Unzipping Arduino Time lib...'
+            print('Unzipping Arduino Time lib...')
             env.UnpackAll(timelib_dir + '/Time', timelib_zip)
 
             # Apply patches to ARDUINO_HOME directory.
             os.chdir(arduinolib_dir)
-            print 'Patching Arduino libraries...'
+            print('Patching Arduino libraries...')
 
             os.system("find ./libraries/Time/Time/DateStrings.cpp -type f -exec dos2unix {} \;")
             os.system("patch -p1 < " + src_dir + "/resource/csdk/connectivity/lib/arduino/arduino_libraries.patch --directory=" + arduinolib_dir)
@@ -94,11 +94,11 @@ if target_os == 'arduino':
             # Remove downloaded file
             os.remove(timelib_zip_file)
         else:
-            print 'Please manually install package dos2unix. The build process will end now. Your Action Required: Install package manually, then restart build process.'
-            print 'You may likely retrieve this package as follows:'
-            print '      sudo apt-get install dos2unix'
-            print '               or'
-            print '      sudo yum install dos2unix'
+            print('Please manually install package dos2unix. The build process will end now. Your Action Required: Install package manually, then restart build process.')
+            print('You may likely retrieve this package as follows:')
+            print('      sudo apt-get install dos2unix')
+            print('               or')
+            print('      sudo yum install dos2unix')
             exit(1)
 
     redbearlib_dir = arduinolib_dir + '/libraries/RBL_nRF8001'
@@ -113,7 +113,7 @@ if target_os == 'arduino':
                 redbearlib_zip = redbearlib_zip_file
 
             # Unzip the lib
-            print 'Unzipping Red Bear lib...'
+            print('Unzipping Red Bear lib...')
             os.chdir(arduinolib_dir + '/libraries')
             env.UnpackAll(redbearlib_dir, redbearlib_zip)
 
@@ -122,7 +122,7 @@ if target_os == 'arduino':
             shutil.rmtree('nRF8001-25643e7b1b7da3740406325a471e3faa4b948747')
 
             # Apply Red Bear patches
-            print 'Patching Red Bear library...'
+            print('Patching Red Bear library...')
             os.chdir(arduinolib_dir + '/libraries/RBL_nRF8001/')
 
             os.system("find . -type f -exec dos2unix {} \;")
@@ -131,11 +131,11 @@ if target_os == 'arduino':
             # Remove downloaded file
             os.remove(redbearlib_zip_file)
         else:
-            print 'Please manually install package dos2unix. The build process will end now. Your Action Required: Install package manually, then restart build process.'
-            print 'You may likely retrieve this package as follows:'
-            print '      sudo apt-get install dos2unix'
-            print '               or'
-            print '      sudo yum install dos2unix'
+            print('Please manually install package dos2unix. The build process will end now. Your Action Required: Install package manually, then restart build process.')
+            print('You may likely retrieve this package as follows:')
+            print('      sudo apt-get install dos2unix')
+            print('               or')
+            print('      sudo yum install dos2unix')
             exit(1)
 
     nordiclib_dir = arduinolib_dir + '/libraries/BLE'
@@ -150,7 +150,7 @@ if target_os == 'arduino':
                 nordiclib_zip = nordiclib_zip_file
 
             # Unzip the lib
-            print 'Unzipping Nordic lib...'
+            print('Unzipping Nordic lib...')
             os.chdir(arduinolib_dir + '/libraries')
             env.UnpackAll(nordiclib_dir, nordiclib_zip)
 
@@ -159,7 +159,7 @@ if target_os == 'arduino':
             shutil.rmtree('ble-sdk-arduino-0.9.5.beta')
 
             # Apply Nordic lib patches
-            print 'Patching Nordic library...'
+            print('Patching Nordic library...')
             os.chdir(arduinolib_dir + '/libraries/BLE/')
 
             os.system("find . -type f -exec dos2unix {} \;")
@@ -168,13 +168,13 @@ if target_os == 'arduino':
             # Remove downloaded file
             os.remove(nordiclib_zip_file)
         else:
-            print 'Please manually install package dos2unix. The build process will end now. Your Action Required: Install package manually, then restart build process.'
-            print 'You may likely retrieve this package as follows:'
-            print '      sudo apt-get install dos2unix'
-            print '               or'
-            print '      sudo yum install dos2unix'
+            print('Please manually install package dos2unix. The build process will end now. Your Action Required: Install package manually, then restart build process.')
+            print('You may likely retrieve this package as follows:')
+            print('      sudo apt-get install dos2unix')
+            print('               or')
+            print('      sudo yum install dos2unix')
             exit(1)
 
 # Set the ARDUINO_HOME
 env.Replace(ARDUINO_HOME=arduinolib_dir)
-print 'ARDUINO_HOME = ' + env.get('ARDUINO_HOME')
+print('ARDUINO_HOME = ' + env.get('ARDUINO_HOME'))
index 6a69b39..b06af6b 100644 (file)
@@ -32,7 +32,7 @@ boost_bootstrap = os.path.join(boost_dir, 'bootstrap.bat')
 
 if 'linux' == target_os:
     # Check for Boost libraries in /usr/boost
-    print 'TODO: Perform platform check for linux'
+    print('TODO: Perform platform check for linux')
     msg = "Target platform (%s) is currently not supported for boost builds" % target_os
     raise SCons.Errors.EnvironmentError(msg)
 
@@ -45,11 +45,11 @@ elif target_os in ['windows']:
         if os.path.exists(boost_zip_file):
             boost_zip = boost_zip_file
         else:
-            print '*** Downloading Boost zip file (> 100MB). Please wait... ***'
+            print('*** Downloading Boost zip file (> 100MB). Please wait... ***')
             boost_zip = boost_env.Download(boost_zip_file, boost_url)
 
         # Unzip boost
-        print '*** Unpacking boost %s zip file ... ***' % boost_version
+        print('*** Unpacking boost %s zip file ... ***' % boost_version)
         boost_env.UnpackAll(boost_dir, boost_zip)
 
         # Rename from boost_1_60_0 -> boost
index b30e0c4..b2e96dd 100644 (file)
@@ -36,26 +36,26 @@ if gtest_env.GetOption('help'):
 # Clean up gtest if 'clean' is specified, and it looks like has been built.
 # Implicity skips the targets which don't "configure" (e.g. windows)
 if gtest_env.GetOption('clean'):
-    print 'Cleaning google unit test'
+    print('Cleaning google unit test')
     if os.path.exists(gtest_configured_sentinel):
         clean = "cd %s && make clean" % gtest_dir
         Execute(clean)
     Return("gtest_env")
 
-print '*** Checking for installation of google unit test %s ***' % GTEST_VERSION
+print('*** Checking for installation of google unit test %s ***' % GTEST_VERSION)
 if not os.path.exists(gtest_unpacked_sentinel):
     # If the gtest zip file is not already present, download it
     if not os.path.exists(gtest_zip_path):
         gtest_zip = gtest_env.Download(gtest_zip_path, gtest_url)
     else:
         gtest_zip = gtest_zip_path
-    print 'Unzipping to : ' + gtest_dir
+    print('Unzipping to : ' + gtest_dir)
     gtest_env.UnpackAll(gtest_dir, gtest_zip)
 
 if target_os in ['linux']:
     if not os.path.exists(gtest_configured_sentinel):
         # Run configure on gtest
-        print 'Configuring google unit test'
+        print('Configuring google unit test')
         reconfigure_ran = gtest_env.Configure(gtest_dir, 'autoreconf -i')
         if env.get('CROSS_COMPILE'):
             configure_ran = env.Configure(
@@ -67,7 +67,7 @@ if target_os in ['linux']:
         gtest_env.Depends(configure_ran, reconfigure_ran)
 
     # Run make on gtest
-    print 'Making google unit test'
+    print('Making google unit test')
     make_ran = gtest_env.Configure(gtest_dir, 'make')
 
 elif target_os in ['darwin', 'msys_nt'] and os.path.exists(gtest_dir):
@@ -77,14 +77,14 @@ elif target_os in ['darwin', 'msys_nt'] and os.path.exists(gtest_dir):
         os.mkdir(gtest_dotlib_dir)
 
         # Run configure on gtest
-        print 'Configuring google unit test for compilation'
+        print('Configuring google unit test for compilation')
         gtest_env.Configure(gtest_dir, 'cmake -G "Unix Makefiles" .')
 
     # Run make on gtest
-    print 'Making google unit test'
+    print('Making google unit test')
     gtest_env.Configure(gtest_dir, 'make')
 
-    print 'Moving libraries to lib folder'
+    print('Moving libraries to lib folder')
     gtest_env.Configure(gtest_dir, 'cp libgtest.a lib')
     gtest_env.Configure(gtest_dir, 'mv libgtest.a lib/.libs')
     gtest_env.Configure(gtest_dir, 'cp libgtest_main.a lib')
index db2cd3e..4de7291 100644 (file)
@@ -32,7 +32,7 @@ target_os = env.get('TARGET_OS')
 src_dir = env.get('SRC_DIR')
 
 if target_os in ['linux', 'windows']:
-    print '*** Checking for installation of hippomocks ***'
+    print('*** Checking for installation of hippomocks ***')
     hippomocks_version = '5.0'
     hippomocks_revision = 'v' + hippomocks_version
     hippomocks_src_dir = src_dir + '/extlibs/hippomocks/hippomocks-' + hippomocks_version
@@ -44,7 +44,7 @@ if target_os in ['linux', 'windows']:
             hippomocks_zip = env.Download(hippomocks_zip_file, hippomocks_url)
         else:
             hippomocks_zip = hippomocks_zip_file
-        print 'hippomocks: Unzipping %s to %s' % (hippomocks_zip_file,
-                                                  hippomocks_dest_dir)
+        print('hippomocks: Unzipping %s to %s' % (hippomocks_zip_file,
+                                                  hippomocks_dest_dir))
         env.UnpackAll(hippomocks_src_dir, hippomocks_zip)
         os.rename(hippomocks_src_dir, hippomocks_dest_dir)
index 302174b..b21681e 100644 (file)
@@ -25,9 +25,8 @@
 ##
 
 import os
-import glob
-import datetime
 import subprocess
+import SCons.Util
 
 Import('env')
 
@@ -57,7 +56,7 @@ libcoap_update_command = 'git fetch --tags && git checkout -f ' + libcoap_versio
 libcoap_change_dir_command = 'cd ' + libcoap_dir
 
 if with_upstream_libcoap == '1':
-    print '*** Checking for installation of libCoAP ***'
+    print('*** Checking for installation of libCoAP ***')
     if not os.path.exists(libcoap_dir):
         msg = '''
 *********************************** Error: ************************************
@@ -68,19 +67,20 @@ if with_upstream_libcoap == '1':
         Exit(msg)
 
     os.chdir(libcoap_dir)
-    out = subprocess.check_output('git log --format=%d -n 1', shell=True)
-    if libcoap_version not in out:
-        print '''
+    out = subprocess.check_output('git log --format=%d -n 1', shell=True).rstrip()
+    if libcoap_version not in SCons.Util.to_String(out):
+        print('''
 ******************************* Info: *****************************************
 * Your libCoAP repo is not up to date with the latest version we require (%s).
 *******************************************************************************
-''' % (libcoap_version)
+''' % (libcoap_version))
         if libcoap_env.get('AUTOMATIC_UPDATE'):
-            print '''
+            print('''
 ******************************* Info: *****************************************
 * Automatically updating libcoap to version %s.
 *******************************************************************************
-''' % (libcoap_version)
+''' % (libcoap_version))
+            # TODO: we are not actually checking the output... fix
             subprocess.check_output(libcoap_update_command, shell=True)
         else:
             msg = '''
@@ -93,12 +93,12 @@ if with_upstream_libcoap == '1':
             Exit(msg)
 
 else:
-    print '''
+    print('''
 ******************************* Info: *****************************************
 * Using FORKED copy of libCoap located in:
 * resource/csdk/connectivity/lib/libcoap-4.1.1
 *******************************************************************************
-'''
+''')
 
 ######################################################################
 # Build libCoAP
@@ -302,33 +302,43 @@ if with_upstream_libcoap == '1':
         # Generate the file
         if os.path.exists(config_h_file_path):
             os.remove(config_h_file_path)
-        config_h_file = open(config_h_file_path, "w")
-        config_h_file.write(config_h_header + config_h_body + config_h_footer)
-        config_h_file.close()
+        with open(config_h_file_path, "w") as config_h_file:
+            config_h_file.write(config_h_header + config_h_body + config_h_footer)
 
     # Sanity check to ensure that the above block created the file.
     if not os.path.exists(config_h_file_path) and not env.GetOption('clean'):
         msg = "Error: coap_config.h file not created!"
         Exit(msg)
 
+    # We also need to generate coap.h from coap.h.in
+    coap_h_pc_file = os.path.join(libcoap_dir, 'include', 'coap', 'coap.h.in')
+    # substitution table:
     pc_vars = {
-        '\@LIBCOAP_PACKAGE_NAME\@': lib_prefix + 'coap',
-        '\@LIBCOAP_PACKAGE_STRING\@': lib_prefix + 'coap-' + libcoap_version,
-        '\@LIBCOAP_PACKAGE_URL\@': libcoap_repo_url,
-        '\@LIBCOAP_PACKAGE_BUGREPORT\@': libcoap_repo_url + '/issues',
-        '\@LIBCOAP_PACKAGE_VERSION\@': libcoap_version
+        '@PACKAGE_NAME@': lib_prefix + 'coap',
+        '@PACKAGE_STRING@': lib_prefix + 'coap-' + libcoap_version,
+        '@PACKAGE_URL@': libcoap_repo_url,
+        '@PACKAGE_BUGREPORT@': libcoap_repo_url + '/issues',
+        '@PACKAGE_VERSION@': libcoap_version
     }
     libcoap_env.Substfile(coap_h_pc_file, SUBST_DICT=pc_vars)
 
-    libcoap_src = glob.glob(os.path.join(libcoap_src_root, '*.c'))
-    libcoap_src.remove(os.path.join(libcoap_src_root, 'coap_io_lwip.c'))
+    # redefine root to be relative to current dir for Glob check
+    libcoap_src_root = 'libcoap/src/'
+    libcoap_src = Glob(libcoap_src_root + '*.c',
+                       exclude=libcoap_src_root + 'coap_io_lwip.c')
 else:
     # For bring up purposes only, the forked version will live here.
-    libcoap_src_root = src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1'
-    libcoap_src = glob.glob(os.path.join(libcoap_src_root, '*.c'))
+    libcoap_src_root = '#/resource/csdk/connectivity/lib/libcoap-4.1.1/'
+    libcoap_src = Glob(libcoap_src_root + '*.c')
 
 libcoap = libcoap_env.StaticLibrary('coap', libcoap_src, OBJPREFIX='libcoap_')
 
+# set for use by other scripts:
+if with_upstream_libcoap == '1':
+    env.AppendUnique(LIBCOAP_INC='#/extlibs/libcoap/libcoap/include')
+else:
+    env.AppendUnique(LIBCOAP_INC='#/resource/csdk/connectivity/lib/libcoap-4.1.1/include')
+
 Clean(libcoap, config_h_file_path)
 libcoap_env.InstallTarget([libcoap], 'coap')
 
index f2dfdd1..fb4b634 100644 (file)
@@ -4,7 +4,7 @@
 ######################################################################
 
 import os
-import commands
+import subprocess
 
 Import('env')
 
@@ -34,7 +34,7 @@ if with_ra_ibb:
             ' && git checkout 527bc0573a52f2af3ecad5b9ef39aeec7b669f77'
         ])
 
-        print 'Downloading xmpp library ...'
+        print('Downloading xmpp library ...')
         if raxmpp_env.Execute(c):
             msg = '''
 *********************************** Error: ************************************
@@ -46,39 +46,39 @@ if with_ra_ibb:
 '''
             Exit(msg)
         else:
-            print 'Download xmpp library complete'
+            print('Download xmpp library complete')
 
     if not env.GetOption('clean'):
-        print 'Building with ' + SRC_NAME
+        print('Building with ' + SRC_NAME)
         #print 'base_dir', base_dir
         #print 'target_os', target_os
         #print 'target_arch', target_arch
 
-        foo = commands.getoutput(
+        foo = subprocess.getoutput(
             'patch -N -p1 -d libstrophe < strophe-xmpp_conn_is_secured.patch')
-        print foo
+        print(foo)
         os.chdir(SRC_NAME)
         #sconsflags = ' RELEASE=true' if  env['RELEASE'] else ' RELEASE=false'
         if not os.path.exists('configure'):
-            foo = commands.getoutput('./bootstrap.sh')
-            print foo
+            foo = subprocess.getoutput('./bootstrap.sh')
+            print(foo)
         if not os.path.exists('config.status'):
-            foo = commands.getoutput('./configure')
-            print foo
+            foo = subprocess.getoutput('./configure')
+            print(foo)
         if not os.path.exists('.libs/libstrophe.a'):
-            foo = commands.getoutput('make libstrophe.la')
-            print foo
+            foo = subprocess.getoutput('make libstrophe.la')
+            print(foo)
         if not os.path.exists('.libs/libstrophe.a'):
             msg = 'Building with ' + SRC_NAME + ' failed.'
             Exit(msg)
         else:
-            foo = commands.getoutput('cp .libs/libstrophe.a ' +
+            foo = subprocess.getoutput('cp .libs/libstrophe.a ' +
                                      env.get('BUILD_DIR'))
-            foo = commands.getoutput('cp .libs/libstrophe.so* ' +
+            foo = subprocess.getoutput('cp .libs/libstrophe.so* ' +
                                      env.get('BUILD_DIR'))
-            print foo
+            print(foo)
 
-        print 'Building with ' + SRC_NAME + ' Completely.'
+        print('Building with ' + SRC_NAME + ' Completely.')
     env.AppendUnique(
         CPPPATH=[INC_PATH],
         RALIBS=LIBSTROPHY_LIBS,
index 9517042..b9ec6cf 100644 (file)
@@ -20,6 +20,7 @@
 
 Import('env')
 import SCons.Errors
+import SCons.Util
 import os
 import sys
 import re
@@ -34,7 +35,6 @@ mbedtls_config_file = 'config-iotivity.h' if target_os != 'windows' else 'config
 
 # The mbedtls_revision tag here must match the one in extlibs/mbedtls/prep.sh.
 mbedtls_revision = 'mbedtls-2.4.2'
-
 if not os.path.exists(mbedtls_dir):
     msg = '''
 *********************************** Error: ************************************
@@ -54,9 +54,9 @@ os.chdir(mbedtls_dir)
 # with that name doesn't exist.
 # Tizen uses its own process to prepare the mbedTLS repo in gbsbuild.sh.
 if os.path.exists('.git/HEAD'):
-    out = subprocess.check_output('git tag -l ' + mbedtls_revision, shell=True)
-    if mbedtls_revision not in out:
-        print out
+    out = subprocess.check_output('git tag -l ' + mbedtls_revision, shell=True).rstrip()
+    if mbedtls_revision not in SCons.Util.to_String(out):
+        print(out)
         msg = '''
 *********************************** Error: ************************************
 * Your mbedTLS repo is not up to date with the version required by iotivity.
@@ -93,7 +93,7 @@ if found:
 if not found:
     if os.path.exists('.git/HEAD'):
         # Apply ocf patch on git revision
-        print "Syncing/patching mbedtls external project..."
+        print("Syncing/patching mbedtls external project...")
         cmd = 'git checkout -f development && git reset --hard ' + mbedtls_revision + ' && git clean -f && git apply --whitespace=fix ../ocf.patch'
         res = os.system(cmd)
     else:
@@ -120,7 +120,7 @@ except:
     msg += 'error: ' + str(sys.exc_info()[0])
     Exit(msg)
 else:
-    print 'Copied IoTivity version of config.h to ' + mbedtls_config
+    print('Copied IoTivity version of config.h to ' + mbedtls_config)
 
 mbedtls_env = env.Clone()
 
index 2fc3cac..cbd9835 100644 (file)
@@ -23,7 +23,7 @@
 #
 ######################################################################
 import os
-import commands
+import subprocess
 
 Import('env')
 
@@ -43,9 +43,9 @@ if with_ra and not with_ra_ibb:
 '''
         Exit(msg)
 
-    print 'building with ra_xmpp'
+    print('building with ra_xmpp')
     if env.get('RELEASE'):
-        print src_dir
+        print(src_dir)
         build_dir = os.path.join(src_dir, 'extlibs/raxmpp/raxmpp/out',
                                  target_os, target_arch, 'release/')
     else:
@@ -53,10 +53,10 @@ if with_ra and not with_ra_ibb:
                                  target_os, target_arch, 'debug/')
     os.chdir('raxmpp')
     sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false'
-    foo = commands.getoutput('scons external' + sconsflags)
-    print foo
-    foo = commands.getoutput('scons' + sconsflags)
-    print foo
+    foo = subprocess.getoutput('scons external' + sconsflags)
+    print(foo)
+    foo = subprocess.getoutput('scons' + sconsflags)
+    print(foo)
 
     env.AppendUnique(
         CPPPATH=src_dir + '/extlibs/raxmpp/raxmpp/ra_xmpp/',
index 6f6a14d..a1449b1 100644 (file)
@@ -28,7 +28,7 @@ sqlite_c_tmp = os.path.join(sqlite_tmp_dir, 'sqlite3.c')
 sqlite_h_tmp = os.path.join(sqlite_tmp_dir, 'sqlite3.h')
 
 if target_os in targets_need_sqlite:
-    print '*** Checking for presence of %s ***' % sqlite_package
+    print('*** Checking for presence of %s ***' % sqlite_package)
     os.listdir(sqlite_dir)
     if not os.path.exists(sqlite_c) or not os.path.exists(sqlite_h):
         if not os.path.exists(sqlite_zip_file):
index e04bf67..a23078d 100644 (file)
@@ -20,6 +20,7 @@
 
 import os
 import subprocess
+import SCons.Util
 
 Import('env')
 
@@ -46,9 +47,9 @@ os.chdir(cborDir)
 # This code also assumes tinycbor_revision is a tag; if it changes to a branch
 # or an arbitrary commit, disable this check below.
 if target_os != 'tizen' and os.path.exists('.git/HEAD'):
-    out = subprocess.check_output('git tag -l ' + cborRevision, shell=True)
-    if cborRevision not in out:
-        print out
+    out = subprocess.check_output('git tag -l ' + cborRevision, shell=True).rstrip()
+    if cborRevision not in SCons.Util.to_String(out):
+        print(out)
         msg = '''
 *********************************** Error: ************************************
 * Your TinyCBOR repo is not up to date with the version required by iotivity.
@@ -64,7 +65,7 @@ if os.path.exists('.git/HEAD'):
     cmd = 'git reset --hard ' + cborRevision
     os.system(cmd)
 else:
-    print 'Assume TinyCBOR is on tag ', cborRevision
+    print('Assume TinyCBOR is on tag ' + cborRevision)
 
 os.chdir(start_dir)
 
index f40cb7a..6c59f7e 100644 (file)
@@ -3,7 +3,7 @@
 #
 ######################################################################
 import os
-import commands
+import subprocess
 
 Import('env')
 
@@ -23,7 +23,6 @@ LIB_PATH = SRC_PATH
 WJSXMPPXEP_LIBS = ['wksxmppxep', 'm', 'crypto']
 
 if with_ra_ibb:
-
     env.SConscript('#/extlibs/libstrophe/SConscript')
     if not os.path.exists(INC_PATH):
         raxmpp_env = Environment(ENV=os.environ)
@@ -32,7 +31,7 @@ if with_ra_ibb:
             'cd ' + SRC_NAME + ' && git checkout 8e9f42d02a0f416001065d1cddc1ab07974cef14'
         ])
 
-        print 'Downloading', SRC_NAME, 'library ...'
+        print('Downloading ' + SRC_NAME + ' library ...')
         if raxmpp_env.Execute(c):
             msg = '''
 *********************************** Error: ************************************
@@ -44,25 +43,25 @@ if with_ra_ibb:
 '''
             Exit(msg)
         else:
-            print 'Download', SRC_NAME, 'library complete'
+            print('Download ' + SRC_NAME + ' library complete')
 
     if not env.GetOption('clean'):
-        print 'Building with ' + SRC_NAME
+        print('Building with ' + SRC_NAME)
         os.chdir(SRC_PATH)
         if not os.path.exists('libwksxmppxep.so'):
             LIBSTROPHE_BASE = base_dir + '/extlibs/libstrophe/libstrophe'
-            foo = commands.getoutput('make LIBSTROPHE_BASE=' +
+            foo = subprocess.getoutput('make LIBSTROPHE_BASE=' +
                                          LIBSTROPHE_BASE + ' libraries')
-            print foo
+            print(foo)
         if not os.path.exists('libwksxmppxep.so'):
             msg = 'Building with ' + SRC_NAME + ' failed.'
             Exit(msg)
         else:
-            foo = commands.getoutput('cp libwksxmppxep.so ' + build_dir)
-            print foo
-            foo = commands.getoutput('cp libwksxmppxep.a ' + build_dir)
-            print foo
-        print 'Building with ' + SRC_NAME + ' Completely.'
+            foo = subprocess.getoutput('cp libwksxmppxep.so ' + build_dir)
+            print(foo)
+            foo = subprocess.getoutput('cp libwksxmppxep.a ' + build_dir)
+            print(foo)
+        print('Building with ' + SRC_NAME + ' Completely.')
 
         env.PrependUnique(
             CPPPATH=[INC_PATH],
index d3d88a1..45ca5c9 100644 (file)
@@ -3,7 +3,7 @@
 prefix=@PREFIX@
 exec_prefix=${prefix}
 libdir=@LIB_INSTALL_DIR@
-includedir=${prefix}/include
+includedir=${prefix}/include/iotivity
 svcincludedir=${includedir}/service
 
 Name: iotivity
index abea818..f0e9431 100644 (file)
@@ -71,7 +71,7 @@ if 'ALL' in TARGET_TRANSPORT:
     TRANSPORT_EDR = 1
     TRANSPORT_BLE = 1
     TRANSPORT_NFC = 1
-    print "Android Transport is ALL"
+    print("Android Transport is ALL")
 else:
     if 'BT' in TARGET_TRANSPORT:
         TRANSPORT_EDR = 1
@@ -157,16 +157,16 @@ def find_scons_java_version(env):
         print('\t***** Java build will likely fail or have errors in the build output. *****')
         print('\t***** Recommend updating to the latest version of SCons               *****')
         return None
-    for line in java_ver.split('\n'):
+    for line in SCons.Util.to_String(java_ver).split('\n'):
         # handle building with versions of Java not supported by SCons
         if ' 1.9' in line:
             print('\tJava version 1.9 found.')
             if StrictVersion(scons_version) <= StrictVersion('2.2.0'):
-                print('\tJava 1.9 not supported in SCons ' + scons_version + ', max supported Java 1.6.')
+                print(('\tJava 1.9 not supported in SCons ' + scons_version + ', max supported Java 1.6.'))
                 print('\tSetting JAVAVERSION to 1.6')
                 return '1.6'
             if StrictVersion(scons_version) <= StrictVersion('2.3.2'):
-                print('\tJava 1.9 not supported in SCons ' + scons_version + ', max supported Java 1.7.')
+                print(('\tJava 1.9 not supported in SCons ' + scons_version + ', max supported Java 1.7.'))
                 print('\tSetting JAVAVERSION to 1.7')
                 return '1.7'
             if StrictVersion(scons_version) > StrictVersion('2.5.1'):
@@ -175,29 +175,29 @@ def find_scons_java_version(env):
                 print('\t***** Unrecognized version of SCons found in java version Check. Build script may need to be updated *****')
                 # drop through to the next if statement.
             if StrictVersion(scons_version) > StrictVersion('2.3.2'):
-                print('\tJava 1.9 not supported in SCons ' + scons_version + ', max supported Java 1.8.')
+                print(('\tJava 1.9 not supported in SCons ' + scons_version + ', max supported Java 1.8.'))
                 print('\tSetting JAVAVERSION to 1.8')
                 return '1.8'
         if ' 1.8' in line:
             print('\tJava version 1.8 found.')
             if StrictVersion(scons_version) <= StrictVersion('2.2.0'):
-                print('\tJava 1.8 not supported in SCons ' + scons_version + ', max supported Java 1.6.')
+                print(('\tJava 1.8 not supported in SCons ' + scons_version + ', max supported Java 1.6.'))
                 print('\tSetting JAVAVERSION to 1.6')
                 return '1.6'
             if StrictVersion(scons_version) <= StrictVersion('2.3.2'):
-                print('\tJava 1.8 not supported in SCons ' + scons_version + ', max supported Java 1.7.')
+                print(('\tJava 1.8 not supported in SCons ' + scons_version + ', max supported Java 1.7.'))
                 print('\tSetting JAVAVERSION to 1.7')
                 return '1.7'
         if ' 1.7' in line:
             print('\tJava version 1.7 found.')
             if StrictVersion(scons_version) <= StrictVersion('2.2.0'):
-                print('\tJava 1.7 not supported in SCons ' + scons_version + ', max supported Java 1.6.')
+                print(('\tJava 1.7 not supported in SCons ' + scons_version + ', max supported Java 1.6.'))
                 print('\tSetting JAVAVERSION to 1.6')
                 return '1.6'
         # handle versions supported by SCons
         for v in possible_versions:
             if (' ' + v) in line:
-                print('\tSetting JAVAVERSION to ' + v)
+                print(('\tSetting JAVAVERSION to ' + v))
                 return v
     print('\tJava version NOT found!')
     return None
index 3cfcbc3..fdedfc1 100644 (file)
@@ -18,7 +18,7 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 #include <jni.h>
-#include "logger.h"
+#include "experimental/logger.h"
 #include <stdio.h>
 #include "caadapterutils.h"
 #include "cainterface.h"
index 402f3e1..874d26e 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include "JniConfirmNumListener.h"
 
index 13b30ec..e5bae5b 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include <jni.h>
 #include "JniOcStack.h"
index 864e768..e6df4c5 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2017 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2017 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include "JniCreateAciIdListener.h"
 
index b1ade12..f9494fb 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2017 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2017 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 
 #include <jni.h>
index 20112d9..8dfc607 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include "JniDisplayVerifyNumListener.h"
 #include "oic_malloc.h"
index ed06859..2840661 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include <jni.h>
 #include "JniOcStack.h"
index a769e56..622bc85 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2015 Intel Corporation.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2015 Intel Corporation.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include "JniOcStack.h"
 
@@ -36,4 +36,4 @@ private:
     jobject m_jListener;
 };
 
-#endif
\ No newline at end of file
+#endif
index f6908ed..a3773bc 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 #include "JniGetAclIdByDeviceListener.h"
 
index 8ad5b11..6cf3948 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 
 #include <jni.h>
index 8965e85..81bd105 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2015 Intel Corporation.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2015 Intel Corporation.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 
 #include "JniOcStack.h"
index c8df631..97658b1 100644 (file)
@@ -1,23 +1,23 @@
 /*
-* //******************************************************************
-* //
-* // Copyright 2016 Samsung Electronics All Rights Reserved.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-* //
-* // Licensed under the Apache License, Version 2.0 (the "License");
-* // you may not use this file except in compliance with the License.
-* // You may obtain a copy of the License at
-* //
-* //      http://www.apache.org/licenses/LICENSE-2.0
-* //
-* // Unless required by applicable law or agreed to in writing, software
-* // distributed under the License is distributed on an "AS IS" BASIS,
-* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* // See the License for the specific language governing permissions and
-* // limitations under the License.
-* //
-* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+* ******************************************************************
+*
+*  Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+*
+*  Licensed under the Apache License, Version 2.0 (the "License");
+*  you may not use this file except in compliance with the License.
+*  You may obtain a copy of the License at
+*
+*       http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*
+* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 */
 
 #include "JniOcStack.h"