Merge from master to CA branch
authorSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 25 Dec 2014 10:31:14 +0000 (02:31 -0800)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 25 Dec 2014 10:49:52 +0000 (02:49 -0800)
Change-Id: If6c0c7db4d8212ce74e523ca03c0ebd7eca024d1
Signed-off-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/csdk/occoap/src/occoap.c
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp
resource/examples/makefile
resource/include/OCPlatform.h
resource/include/OCPlatform_impl.h
resource/src/InProcClientWrapper.cpp
resource/src/OCPlatform.cpp
service/protocol-plugin/sample-app/linux/SConscript
service/soft-sensor-manager/SConscript
service/things-manager/Readme.txt [new file with mode: 0755]

index 491d125..20f40ed 100644 (file)
@@ -338,6 +338,7 @@ static void HandleCoAPResponses(struct coap_context_t *ctx,
             (OCDevAddr *) &(rcvdResponse->remote), sequenceNumber, NULL);
     VERIFY_SUCCESS(result, OC_STACK_OK);
 
+
     result = FormOCResponse(&response, NULL, maxAge, fullUri, rcvdUri,
             &rcvdToken, clientResponse, bufRes);
     VERIFY_SUCCESS(result, OC_STACK_OK);
index 78465d3..343496a 100644 (file)
@@ -416,6 +416,7 @@ int InitPresence()
     return result;
 }
 #endif
+
 int InitGetRequestToUnavailableResource()
 {
     OC_LOG_V(INFO, TAG, "\n\nExecuting %s", __func__);
index bc411b8..2377f40 100755 (executable)
@@ -119,8 +119,6 @@ devicediscoveryserver: devicediscoveryserver.cpp
 devicediscoveryclient: devicediscoveryclient.cpp
        $(CXX) $(CXX_FLAGS.$(BUILD)) -o $(OUT_DIR)/$@ devicediscoveryclient.cpp $(CXX_INC) $(CXX_LIBS)
 
-
-
 ocicuc_target:
        cd ocicuc && $(MAKE) apps
 
index af4c089..d83dc67 100644 (file)
@@ -140,12 +140,12 @@ namespace OC
         OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
                     uint8_t connectivityType, FindDeviceCallback deviceInfoHandler,
                     QualityOfService QoS);
-#else
+#endif
         OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
                     FindDeviceCallback deviceInfoHandler);
         OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
                     FindDeviceCallback deviceInfoHandler, QualityOfService QoS);
-#endif
+
         /**
         * This API registers a resource with the server
         * NOTE: This API applies to server side only.
index b4d4810..46bc9d9 100644 (file)
@@ -173,6 +173,7 @@ namespace OC
         OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
                     FindDeviceCallback deviceInfoHandler, QualityOfService QoS);
 #endif
+
         /**
         * This API registers a resource with the server
         * NOTE: This API applies to server side only.
index 35ff469..c2762bf 100644 (file)
@@ -148,6 +148,7 @@ namespace OC
 
         try
         {
+
 #ifdef CA_INT
             ListenOCContainer container(clientWrapper, *clientResponse->addr,
                     clientResponse->connType, requestStream);
@@ -253,12 +254,10 @@ namespace OC
         OCStackResult result;
 
         OCCallbackData cbdata = {0};
-
         ClientCallbackContext::DeviceListenContext* context =
             new ClientCallbackContext::DeviceListenContext();
         context->callback = callback;
         context->clientWrapper = shared_from_this();
-
         cbdata.context =  static_cast<void*>(context);
         cbdata.cb = listenDeviceCallback;
         cbdata.cd = [](void* c){delete static_cast<ClientCallbackContext::DeviceListenContext*>(c);};
index fa9ffc4..c240480 100644 (file)
@@ -118,22 +118,6 @@ namespace OC
             return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, connectivityType,
                     deviceInfoHandler, QoS);
         }
-#else
-        OCStackResult getDeviceInfo(const std::string& host,
-                                                const std::string& deviceURI,
-                                                FindDeviceCallback deviceInfoHandler)
-        {
-            return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, deviceInfoHandler);
-        }
-
-        OCStackResult getDeviceInfo(const std::string& host,
-                                                const std::string& deviceURI,
-                                                FindDeviceCallback deviceInfoHandler,
-                                                QualityOfService QoS)
-        {
-            return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI,
-                    deviceInfoHandler, QoS);
-        }
 #endif
 
         OCStackResult findResource(const std::string& host,
@@ -179,6 +163,31 @@ namespace OC
 #endif
         }
 
+        OCStackResult getDeviceInfo(const std::string& host,
+                                                const std::string& deviceURI,
+                                                FindDeviceCallback deviceInfoHandler)
+        {
+#ifdef CA_INT
+            return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, OC_WIFI | OC_ETHERNET,
+                                                            deviceInfoHandler);
+#else
+            return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, deviceInfoHandler);
+#endif
+        }
+
+        OCStackResult getDeviceInfo(const std::string& host,
+                                                const std::string& deviceURI,
+                                                FindDeviceCallback deviceInfoHandler,
+                                                QualityOfService QoS)
+        {
+#ifdef CA_INT
+            return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, OC_WIFI | OC_ETHERNET,
+                                                            deviceInfoHandler, QoS);
+#else
+            return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, deviceInfoHandler, QoS);
+#endif
+        }
+
 
         OCStackResult registerResource(OCResourceHandle& resourceHandle,
                                                 std::string& resourceURI,
index 8b3cf05..cbbbac1 100644 (file)
@@ -35,3 +35,4 @@ mqttclient = sample_env.Program('mqtt/mqttclient', 'mqtt/mqttclient.cpp')
 
 Alias('mqttclient', mqttclient)
 env.AppendTarget('mqttclient')
+
index 687b690..7ad090a 100644 (file)
@@ -76,8 +76,9 @@ ssmcore_env.AppendUnique(CPPPATH = [
 
 import os.path
 
+SSMINTERFACE_PATH = 'SSMCore/src/SSMInterface/'
+
 if target_os != 'android':
-       SSMINTERFACE_PATH = 'SSMCore/src/SSMInterface/'
        omit_src = ['SSMCore_JNI.cpp']
        ssminterface_src = [f for f in env.Glob(SSMINTERFACE_PATH + '*.cpp') if os.path.basename(f.path) not in omit_src]
 else :
diff --git a/service/things-manager/Readme.txt b/service/things-manager/Readme.txt
new file mode 100755 (executable)
index 0000000..15cb473
--- /dev/null
@@ -0,0 +1,83 @@
+/******************************************************************
+*
+* Copyright 2014 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.
+*
+******************************************************************/
+
+
+===============================================================================
+==                How to Build Things Manager                                ==
+===============================================================================
+
+Once the source code is downloaded in your local specific folder, you may follow
+the steps to build and execute Things Manager and its applications.
+In this context, we assume that the code was downloaded into 'oic' folder.
+
+=======================================
+1. Download source code
+=======================================
+
+From the url, you can download Things Manager source code;
+https://www.iotivity.org/downloads
+
+Once you download the codes, and Make sure that the downloaded code structure is as follows;
+Four directories for oic; extlib, resource, service, and tools.
+
+oic/extlib
+oic/resource
+oic/service
+oic/tools
+
+The path for Things Manager is as following;
+
+oic/service/things-manager
+
+The things-manager directory includes following sub directories;
+
+Directories                                         Description
+oic/service/things-manager/sdk                   : The SDK APIs for applications is located.
+                                                   The main functionality of this SDK is to provide
+                                                   developer-friendly APIs of Things manager component
+                                                   to application developers.
+oic/service/things-manager/sampleapp             : It is the sample application on Ubuntu.
+                                                   Basically, the input and output of application
+                                                   on Ubuntu are displayed in the console.
+oic/service/things-manager/build                 : Whole library files and binary files would be made
+                                                   in this folder
+
+
+
+=======================================
+2. Build
+=======================================
+Simply, type "make" to build things manager as follows;
+
+/oic/service/things-manager/build/linux$ make
+
+=======================================
+3. Build the API reference documentation
+=======================================
+To build the API reference documentation:
+a.    Navigate to oic-resource/docs folder using the terminal window.
+b.    Run the following command:
+
+    $ doxygen
+
+This command builds the API reference documentation in the output directory.
+
+The output directory for this command is oic-resource/docs/html/index.html.
+