Update ResourceBroker for updated expiryTimer.
authorjyong2.kim <jyong2.kim@samsung.com>
Sun, 19 Jul 2015 04:50:12 +0000 (13:50 +0900)
committerUze Choi <uzchoi@samsung.com>
Sun, 19 Jul 2015 07:47:28 +0000 (07:47 +0000)
update expiryTimer return type to void.

Change-Id: I7fc13857a09db2c567f7aaeeac46b092d6b8241a
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1733
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/resource-manipulation/src/resourceBroker/include/BrokerTypes.h
service/resource-manipulation/src/resourceBroker/include/DevicePresence.h
service/resource-manipulation/src/resourceBroker/include/ResourcePresence.h
service/resource-manipulation/src/resourceBroker/src/DevicePresence.cpp
service/resource-manipulation/src/resourceBroker/src/ResourcePresence.cpp

index 8c400d8..0051bd3 100755 (executable)
@@ -111,7 +111,7 @@ namespace OIC
                 const std::string&)> SubscribeCB;
 
         typedef std::function<void(const HeaderOptions&, const ResponseStatement&, int)> RequestGetCB;
-        typedef std::function<void*(long long)> TimerCB;
+        typedef std::function<void(long long)> TimerCB;
     } // namespace Service
 } // namespace OIC
 
index c792a4f..6d711d0 100755 (executable)
@@ -68,7 +68,7 @@ namespace OIC
 
             void changeAllPresenceMode(BROKER_MODE mode);
             void subscribeCB(OCStackResult ret,const unsigned int seq, const std::string& Hostaddress);
-            void timeOutCB(TimerID id);
+            void timeOutCB(TimerID id);
         };
     } // namespace Service
 } // namespace OIC
index f7ee6e0..5a50474 100755 (executable)
@@ -78,8 +78,8 @@ namespace OIC
             void getCB(const HeaderOptions &hos, const ResponseStatement& rep, int eCode);
             void verifiedGetResponse(int eCode);
 
-            void timeOutCB(unsigned int msg);
-            void pollingCB(unsigned int msg = 0);
+            void timeOutCB(unsigned int msg);
+            void pollingCB(unsigned int msg = 0);
 
             void executeAllBrokerCB(BROKER_STATE changedState);
             void setResourcestate(BROKER_STATE _state);
index 67b11d0..6e9497c 100755 (executable)
@@ -149,7 +149,7 @@ namespace OIC
             }
         }
 
-        void DevicePresence::timeOutCB(TimerID id)
+        void DevicePresence::timeOutCB(TimerID id)
         {
             std::unique_lock<std::mutex> lock(timeoutMutex);
             isRunningTimeOut = true;
@@ -161,8 +161,6 @@ namespace OIC
 
             isRunningTimeOut = false;
             condition.notify_all();
-
-            return NULL;
         }
     } // namespace Service
 } // namespace OIC
index 91f6a23..956191a 100755 (executable)
@@ -175,10 +175,9 @@ namespace OIC
         void ResourcePresence::setResourcestate(BROKER_STATE _state)
         {
             this->state = _state;
-
         }
 
-        void ResourcePresence::timeOutCB(unsigned int msg)
+        void ResourcePresence::timeOutCB(unsigned int msg)
         {
             std::unique_lock<std::mutex> lock(cbMutex);
             isTimeoutCB = true;
@@ -194,7 +193,7 @@ namespace OIC
                 isTimeoutCB = false;
                 cbCondition.notify_all();
 
-                return NULL;
+                return;
             }
             this->isWithinTime = false;
             OC_LOG_V(DEBUG, BROKER_TAG,
@@ -205,17 +204,13 @@ namespace OIC
 
             isTimeoutCB = false;
             cbCondition.notify_all();
-
-            return NULL;
         }
 
-        void ResourcePresence::pollingCB(unsigned int msg)
+        void ResourcePresence::pollingCB(unsigned int msg)
         {
             OC_LOG_V(DEBUG,BROKER_TAG,"IN PollingCB\n");
             this->requestResourceState();
             timeoutHandle = expiryTimer.postTimer(BROKER_SAFE_MILLISECOND,pTimeoutCB);
-
-            return NULL;
         }
 
         void ResourcePresence::getCB(const HeaderOptions &hos,