Applied to "expiryTimer" for "ResourceBroker"
authordoil.kwon <doil.kwon@samsung.com>
Fri, 3 Jul 2015 08:21:23 +0000 (17:21 +0900)
committerUze Choi <uzchoi@samsung.com>
Tue, 7 Jul 2015 08:56:24 +0000 (08:56 +0000)
- Header's name is changed(primitiveTimer->expiryTimer)

- Added contents about expiryTimer in SConscript

- Modified variable's name about ExpiryTimer class

- Changed "relative path" to "absolute path" about included path

Change-Id: I4f5b3c125a7450f332d333f761c4010048ff7838
Signed-off-by: doil.kwon <doil.kwon@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1505
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-manipulation/SConscript
service/resource-manipulation/modules/resourceBroker/SConscript
service/resource-manipulation/modules/resourceBroker/include/ResourcePresence.h
service/resource-manipulation/modules/resourceBroker/src/ResourcePresence.cpp

index 8f13c5e..e1677c0 100644 (file)
@@ -83,7 +83,3 @@ resourceClient_env.InstallTarget(ResourceClientsdk , 'libResourceClient')
 
 #Go to build sample apps
 SConscript('examples/SConscript')
-
-
-
-
index ce90192..6107e36 100755 (executable)
@@ -43,9 +43,9 @@ target_os = env.get('TARGET_OS')
 ######################################################################
 resourcebroker_env.AppendUnique(CPPPATH = ['include'])
 resourcebroker_env.AppendUnique(CPPPATH = ['../common/primitiveResource/include'])
-resourcebroker_env.AppendUnique(CPPPATH = ['../common/primitiveTimer/include'])
+resourcebroker_env.AppendUnique(CPPPATH = ['../common/expiryTimer/include'])
 resourcebroker_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-resourcebroker_env.PrependUnique(LIBS = ['service_common', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap'])
+resourcebroker_env.PrependUnique(LIBS = ['service_common', 'ExpiryTimer', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap'])
 
 
 if target_os not in ['windows', 'winrt']:
@@ -62,9 +62,7 @@ resourcebroker_src = [
         BROKER_SRC_DIR + 'DeviceAssociation.cpp',
         BROKER_SRC_DIR + 'DevicePresence.cpp',
         BROKER_SRC_DIR + 'ResourcePresence.cpp',
-        BROKER_SRC_DIR + 'ResourceBroker.cpp',
-        BROKER_SRC_DIR + '../../common/primitiveTimer/src/PrimitiveTimer.cpp',
-        BROKER_SRC_DIR + '../../common/primitiveTimer/src/PrimitiveTimer_Impl.cpp'
+        BROKER_SRC_DIR + 'ResourceBroker.cpp'
         ]
 
 
index 81cbf85..f3e21be 100755 (executable)
@@ -29,7 +29,7 @@
 #include <condition_variable>
 
 #include "BrokerTypes.h"
-#include "PrimitiveTimer.h"
+#include "ExpiryTimer.h"
 
 namespace OIC
 {
@@ -58,7 +58,7 @@ namespace OIC
         private:
             std::unique_ptr<std::list<BrokerRequesterInfoPtr>> requesterList;
             PrimitiveResourcePtr primitiveResource;
-            PrimitiveTimer primitiveTimer;
+            ExpiryTimer expiryTimer;
 
             BROKER_STATE state;
             BROKER_MODE mode;
index 4f30037..a64d5ee 100755 (executable)
@@ -18,7 +18,7 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "../include/ResourcePresence.h"
+#include "ResourcePresence.h"
 
 #include <bits/atomic_base.h>
 #include <bits/shared_ptr_base.h>
@@ -61,7 +61,7 @@ namespace OIC
             = std::unique_ptr<std::list<BrokerRequesterInfoPtr>>
             (new std::list<BrokerRequesterInfoPtr>);
 
-            timeoutHandle = primitiveTimer.requestTimer(SAFE_TIME, pTimeoutCB);
+            timeoutHandle = expiryTimer.requestTimer(SAFE_TIME, pTimeoutCB);
 
             primitiveResource->requestGet(pGetCB);
 
@@ -200,7 +200,7 @@ namespace OIC
         void * ResourcePresence::pollingCB(unsigned int msg)
         {
             this->requestResourceState();
-            timeoutHandle = primitiveTimer.requestTimer(SAFE_TIME,pTimeoutCB);
+            timeoutHandle = expiryTimer.requestTimer(SAFE_TIME,pTimeoutCB);
 
             return NULL;
         }
@@ -224,14 +224,14 @@ namespace OIC
 
             if(isWithinTime)
             {
-                primitiveTimer.cancelTimer(timeoutHandle);
+                expiryTimer.cancelTimer(timeoutHandle);
                 isWithinTime = true;
             }
 
             if(mode == BROKER_MODE::NON_PRESENCE_MODE)
             {
                 // TODO set timer & request get
-                primitiveTimer.requestTimer(SAFE_TIME,pPollingCB);
+                expiryTimer.requestTimer(SAFE_TIME,pPollingCB);
             }
 
         }