Revert "[Tizen] Add SetInterval, Pause, and Resume APIs in Timer"
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 17 Sep 2018 04:48:54 +0000 (13:48 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Mon, 17 Sep 2018 04:48:54 +0000 (13:48 +0900)
This reverts commit 8700539107adfe8f5e17b578d1b479762c33c597.

automated-tests/src/dali-adaptor/utc-Dali-Timer.cpp
dali/internal/system/common/timer-impl-ecore.cpp
dali/internal/system/common/timer-impl.h
dali/internal/system/common/timer-interface.h
dali/public-api/adaptor-framework/timer.cpp
dali/public-api/adaptor-framework/timer.h

index 6b2b283..bbd8555 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -268,44 +268,6 @@ int UtcDaliTimerSetInterval(void)
   END_TEST;
 }
 
-int UtcDaliTimerSetInterval02(void)
-{
-  AdaptorTestApplication application;
-
-  tet_printf("timer set interval 02 \n");
-  Timer timer = Timer::New(10);
-  timer.SetInterval(20);
-
-  DALI_TEST_CHECK( timer.GetInterval() == 20 );
-  DALI_TEST_CHECK( timer.IsRunning() == true );
-
-  timer.SetInterval(5000, false);
-
-  DALI_TEST_CHECK( timer.GetInterval() == 5000 );
-  DALI_TEST_CHECK( timer.IsRunning() == false );
-
-  END_TEST;
-}
-
-int UtcDaliTimerSetInterval03(void)
-{
-  AdaptorTestApplication application;
-
-  tet_printf("UtcDaliTimerSetInterval03 SetInterval and ensure timer restarts \n");
-  Timer timer = Timer::New(10);
-  timer.SetInterval(20);
-
-  DALI_TEST_CHECK( timer.GetInterval() == 20 );
-  DALI_TEST_CHECK( timer.IsRunning() == true );
-
-  timer.SetInterval(5000, true);
-
-  DALI_TEST_CHECK( timer.GetInterval() == 5000 );
-  DALI_TEST_CHECK( timer.IsRunning() == true );
-
-  END_TEST;
-}
-
 int UtcDaliTimerCopyConstructor(void)
 {
   AdaptorTestApplication application;
index 46ef603..1c3e541 100644 (file)
@@ -101,39 +101,13 @@ void Timer::Stop()
   ResetTimerData();
 }
 
-void Timer::Pause()
-{
-  // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
-
-  if( mImpl->mId != NULL )
-  {
-    ecore_timer_freeze( mImpl->mId );
-  }
-}
-
-void Timer::Resume()
-{
-  // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
-
-  if( mImpl->mId != NULL )
-  {
-    ecore_timer_thaw( mImpl->mId );
-  }
-}
-
-void Timer::SetInterval( unsigned int interval, bool restart )
+void Timer::SetInterval( unsigned int interval )
 {
   // stop existing timer
   Stop();
   mImpl->mInterval = interval;
-
-  if( restart )
-  {
-    // start new tick
-    Start();
-  }
+  // start new tick
+  Start();
 }
 
 unsigned int Timer::GetInterval() const
index 17d8ca4..a382d8f 100644 (file)
@@ -70,19 +70,9 @@ public:
   virtual void Stop();
 
   /**
-   * @copydoc Dali::Timer::Pause()
-   */
-  virtual void Pause();
-
-  /**
-   * @copydoc Dali::Timer::Resume()
-   */
-  virtual void Resume();
-
-  /**
    * @copydoc Dali::Timer::SetInterval()
    */
-  virtual void SetInterval( unsigned int interval, bool restart );
+  virtual void SetInterval( unsigned int interval );
 
   /**
    * @copydoc Dali::Timer::GetInterval()
index a648b5a..f2b1462 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_ADAPTOR_BASE_TIMER_INTERFACE_H__
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,19 +42,9 @@ public:
   virtual void Stop() = 0;
 
   /**
-   * @copydoc Dali::Timer::Pause()
-   */
-  virtual void Pause() = 0;
-
-  /**
-   * @copydoc Dali::Timer::Resume()
-   */
-  virtual void Resume() = 0;
-
-  /**
    * @copydoc Dali::Timer::SetInterval()
    */
-  virtual void SetInterval( unsigned int intervalInMilliseconds, bool restart ) = 0;
+  virtual void SetInterval( unsigned int intervalInMilliseconds ) = 0;
 
   /**
    * @copydoc Dali::Timer::GetInterval()
index ba98792..244aa26 100644 (file)
@@ -69,24 +69,9 @@ void Timer::Stop()
   Internal::Adaptor::GetImplementation(*this).Stop();
 }
 
-void Timer::Pause()
-{
-  Internal::Adaptor::GetImplementation(*this).Pause();
-}
-
-void Timer::Resume()
-{
-  Internal::Adaptor::GetImplementation(*this).Resume();
-}
-
 void Timer::SetInterval( unsigned int interval )
 {
-  Internal::Adaptor::GetImplementation(*this).SetInterval( interval, true );
-}
-
-void Timer::SetInterval( unsigned int interval, bool restart )
-{
-  Internal::Adaptor::GetImplementation(*this).SetInterval( interval, restart );
+  Internal::Adaptor::GetImplementation(*this).SetInterval( interval );
 }
 
 unsigned int Timer::GetInterval() const
index 28481ba..9e9beac 100755 (executable)
@@ -132,18 +132,6 @@ public: // API
   void Stop();
 
   /**
-   * @brief Pauses timer.
-   * @SINCE_1_3.41
-   */
-  void Pause();
-
-  /**
-   * @brief Resumes timer.
-   * @SINCE_1_3.41
-   */
-  void Resume();
-
-  /**
    * @brief Sets a new interval on the timer and starts the timer.
    *
    * Cancels the previous timer.
@@ -153,16 +141,6 @@ public: // API
   void SetInterval( unsigned int milliSec );
 
   /**
-   * @brief Sets a new interval on the timer with option to restart the timer.
-   *
-   * Cancels the previous timer.
-   * @SINCE_1_3.41
-   * @param[in] milliSec Interval in milliseconds
-   * @param[in] restart Flag to set enabled to restart or not.
-   */
-  void SetInterval( unsigned int milliSec, bool restart );
-
-  /**
    * @brief Gets the interval of timer.
    *
    * @SINCE_1_0.0