Removed unused signal name constants & updated documentation 66/34466/4
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 27 Jan 2015 11:26:33 +0000 (11:26 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 27 Jan 2015 16:00:59 +0000 (16:00 +0000)
Change-Id: Ie3412781e5ea237528245f5a7b1e8cb8d17f55cb

15 files changed:
adaptors/common/drag-and-drop-detector-impl.cpp
adaptors/common/drag-and-drop-detector-impl.h
adaptors/common/sound-player-impl.cpp
adaptors/public-api/adaptor-framework/accessibility-manager.cpp
adaptors/public-api/adaptor-framework/accessibility-manager.h
adaptors/public-api/adaptor-framework/clipboard-event-notifier.cpp
adaptors/public-api/adaptor-framework/clipboard-event-notifier.h
adaptors/public-api/adaptor-framework/drag-and-drop-detector.cpp
adaptors/public-api/adaptor-framework/drag-and-drop-detector.h
adaptors/public-api/adaptor-framework/sound-player.cpp
adaptors/public-api/adaptor-framework/sound-player.h
adaptors/public-api/adaptor-framework/tilt-sensor.cpp
adaptors/public-api/adaptor-framework/tilt-sensor.h
adaptors/tizen/tilt-sensor-impl-tizen.cpp
adaptors/ubuntu/tilt-sensor-impl-ubuntu.cpp

index 4e0cf2b..b37166a 100644 (file)
@@ -46,7 +46,7 @@ Vector2 DragAndDropDetector::GetCurrentScreenPosition() const
 
 bool DragAndDropDetector::IsEnabled() const
 {
-  return !mDroppedSignalV2.Empty() || !mEnteredSignalV2.Empty() || !mExitedSignalV2.Empty() || !mMovedSignalV2.Empty() ;
+  return !mDroppedSignal.Empty() || !mEnteredSignal.Empty() || !mExitedSignal.Empty() || !mMovedSignal.Empty() ;
 }
 
 void DragAndDropDetector::SetContent( const std::string& content )
@@ -66,37 +66,37 @@ void DragAndDropDetector::SetPosition( Vector2 screenPosition )
 
 void DragAndDropDetector::EmitEnteredSignal()
 {
-  if ( !mEnteredSignalV2.Empty() )
+  if ( !mEnteredSignal.Empty() )
   {
     Dali::DragAndDropDetector handle( this );
-    mEnteredSignalV2.Emit( handle );
+    mEnteredSignal.Emit( handle );
   }
 }
 
 void DragAndDropDetector::EmitExitedSignal()
 {
-  if ( !mExitedSignalV2.Empty() )
+  if ( !mExitedSignal.Empty() )
   {
     Dali::DragAndDropDetector handle( this );
-    mExitedSignalV2.Emit( handle );
+    mExitedSignal.Emit( handle );
   }
 }
 
 void DragAndDropDetector::EmitMovedSignal()
 {
-  if ( !mMovedSignalV2.Empty() )
+  if ( !mMovedSignal.Empty() )
   {
     Dali::DragAndDropDetector handle( this );
-    mMovedSignalV2.Emit( handle );
+    mMovedSignal.Emit( handle );
   }
 }
 
 void DragAndDropDetector::EmitDroppedSignal()
 {
-  if ( !mDroppedSignalV2.Empty() )
+  if ( !mDroppedSignal.Empty() )
   {
     Dali::DragAndDropDetector handle( this );
-    mDroppedSignalV2.Emit( handle );
+    mDroppedSignal.Emit( handle );
   }
 }
 
index a3361fb..e6fd5cc 100644 (file)
@@ -45,7 +45,7 @@ class DragAndDropDetector : public Dali::BaseObject
 {
 public:
 
-  typedef Dali::DragAndDropDetector::DragAndDropSignalV2 DragAndDropSignalV2;
+  typedef Dali::DragAndDropDetector::DragAndDropSignal DragAndDropSignal;
 
   // Creation
 
@@ -117,33 +117,33 @@ public: // Signals
   /**
    * @copydoc Dali::DragAndDropDetector::EnteredSignal
    */
-  DragAndDropSignalV2& EnteredSignal()
+  DragAndDropSignal& EnteredSignal()
   {
-    return mEnteredSignalV2;
+    return mEnteredSignal;
   }
 
   /**
    * @copydoc Dali::DragAndDropDetector::ExitedSignal
    */
-  DragAndDropSignalV2& ExitedSignal()
+  DragAndDropSignal& ExitedSignal()
   {
-    return mExitedSignalV2;
+    return mExitedSignal;
   }
 
   /**
    * @copydoc Dali::DragAndDropDetector::MovedSignal
    */
-  DragAndDropSignalV2& MovedSignal()
+  DragAndDropSignal& MovedSignal()
   {
-    return mMovedSignalV2;
+    return mMovedSignal;
   }
 
   /**
    * @copydoc Dali::DragAndDropDetector::DroppedSignal
    */
-  DragAndDropSignalV2& DroppedSignal()
+  DragAndDropSignal& DroppedSignal()
   {
-    return mDroppedSignalV2;
+    return mDroppedSignal;
   }
 
 private:
@@ -169,10 +169,10 @@ private:
   std::string mContent;    ///< The current Drag & drop content.
   Vector2 mScreenPosition; ///< The screen position of the drop location.
 
-  DragAndDropSignalV2 mEnteredSignalV2;
-  DragAndDropSignalV2 mExitedSignalV2;
-  DragAndDropSignalV2 mMovedSignalV2;
-  DragAndDropSignalV2 mDroppedSignalV2;
+  DragAndDropSignal mEnteredSignal;
+  DragAndDropSignal mExitedSignal;
+  DragAndDropSignal mMovedSignal;
+  DragAndDropSignal mDroppedSignal;
 };
 
 } // namespace Adaptor
index 7215a73..b52876c 100644 (file)
@@ -36,15 +36,17 @@ namespace Adaptor
 namespace // unnamed namespace
 {
 
+const char* const SIGNAL_SOUND_PLAY_FINISHED = "sound-play-finished";
+
 // Type Registration
-Dali::BaseHandle Create()
+Dali::BaseHandle GetInstance()
 {
   return SoundPlayer::Get();
 }
 
-Dali::TypeRegistration SOUND_PLAYER_TYPE( typeid(Dali::SoundPlayer), typeid(Dali::BaseHandle), Create );
+Dali::TypeRegistration SOUND_PLAYER_TYPE( typeid(Dali::SoundPlayer), typeid(Dali::BaseHandle), GetInstance );
 
-Dali::SignalConnectorType SIGNAL_CONNECTOR_1( SOUND_PLAYER_TYPE, Dali::SoundPlayer::SIGNAL_SOUND_PLAY_FINISHED, Dali::Internal::Adaptor::SoundPlayer::DoConnectSignal );
+Dali::SignalConnectorType SIGNAL_CONNECTOR_1( SOUND_PLAYER_TYPE, SIGNAL_SOUND_PLAY_FINISHED, Dali::Internal::Adaptor::SoundPlayer::DoConnectSignal );
 
 } // unnamed namespace
 
@@ -98,8 +100,7 @@ bool SoundPlayer::DoConnectSignal( BaseObject* object, ConnectionTrackerInterfac
   bool connected( true );
   SoundPlayer* player = dynamic_cast<SoundPlayer*>( object );
 
-  if( player &&
-      Dali::SoundPlayer::SIGNAL_SOUND_PLAY_FINISHED == signalName )
+  if( player && ( SIGNAL_SOUND_PLAY_FINISHED == signalName ) )
   {
     player->SoundPlayFinishedSignal().Connect( tracker, functor );
   }
index dfe39ba..255a408 100644 (file)
 namespace Dali
 {
 
-const char* const AccessibilityManager::SIGNAL_STATUS_CHANGED( "accessibility-status-changed" );
-const char* const AccessibilityManager::SIGNAL_ACTION_NEXT( "accessibility-action-next" );
-const char* const AccessibilityManager::SIGNAL_ACTION_PREVIOUS( "accessibility-action-previous" );
-const char* const AccessibilityManager::SIGNAL_ACTION_ACTIVATE( "accessibility-action-activate" );
-const char* const AccessibilityManager::SIGNAL_ACTION_OVER( "accessibility-action-over" );
-const char* const AccessibilityManager::SIGNAL_ACTION_READ( "accessibility-action-read" );
-const char* const AccessibilityManager::SIGNAL_ACTION_READ_NEXT( "accessibility-action-read-next" );
-const char* const AccessibilityManager::SIGNAL_ACTION_READ_PREVIOUS( "accessibility-action-read-previous" );
-const char* const AccessibilityManager::SIGNAL_ACTION_UP( "accessibility-action-up" );
-const char* const AccessibilityManager::SIGNAL_ACTION_DOWN( "accessibility-action-down" );
-const char* const AccessibilityManager::SIGNAL_ACTION_CLEAR_FOCUS( "accessibility-action-clear-focus" );
-const char* const AccessibilityManager::SIGNAL_ACTION_BACK( "accessibility-action-back" );
-const char* const AccessibilityManager::SIGNAL_ACTION_SCROLL( "accessibility-action-scroll" );
-
 AccessibilityManager::AccessibilityManager()
 {
 }
index b37fce3..8fc57e2 100644 (file)
@@ -58,21 +58,6 @@ public:
   typedef SignalV2< bool ( AccessibilityManager& ) > AccessibilityActionSignalV2; ///< Generic signal type
   typedef SignalV2< bool (AccessibilityManager&, const Dali::TouchEvent&)> AccessibilityActionScrollSignalV2; ///< Scroll signal type
 
-  // Signal Names
-  static const char* const SIGNAL_STATUS_CHANGED;       ///< name "accessibility-status-changed"
-  static const char* const SIGNAL_ACTION_NEXT;          ///< name "accessibility-action-next"
-  static const char* const SIGNAL_ACTION_PREVIOUS;      ///< name "accessibility-action-previous"
-  static const char* const SIGNAL_ACTION_ACTIVATE;      ///< name "accessibility-action-activatae"
-  static const char* const SIGNAL_ACTION_OVER;          ///< name "accessibility-action-over"
-  static const char* const SIGNAL_ACTION_READ;          ///< name "accessibility-action-read"
-  static const char* const SIGNAL_ACTION_READ_NEXT;     ///< name "accessibility-action-read-next"
-  static const char* const SIGNAL_ACTION_READ_PREVIOUS; ///< name "accessibility-action-read-prev"
-  static const char* const SIGNAL_ACTION_UP;            ///< name "accessibility-action-up"
-  static const char* const SIGNAL_ACTION_DOWN;          ///< name "accessibility-action-down"
-  static const char* const SIGNAL_ACTION_CLEAR_FOCUS;   ///< name "accessibility-action-clear-focus"
-  static const char* const SIGNAL_ACTION_BACK;          ///< name "accessibility-action-back"
-  static const char* const SIGNAL_ACTION_SCROLL;        ///< name "accessibility-action-scroll"
-
   /**
    * @brief Create an uninitialized handle.
    *
index 994ebec..4ca2b22 100644 (file)
@@ -24,8 +24,6 @@
 namespace Dali
 {
 
-const char* const ClipboardEventNotifier::SIGNAL_CONTENT_SELECTED( "content-selected" );
-
 ClipboardEventNotifier::ClipboardEventNotifier()
 {
 }
index 3ddae78..857e0f3 100644 (file)
@@ -49,9 +49,6 @@ public:
    */
   typedef SignalV2< void ( ClipboardEventNotifier& ) > ClipboardEventSignalV2;
 
-  // Signal Names
-  static const char* const SIGNAL_CONTENT_SELECTED; ///< name "content-selected"
-
   /**
    * @brief Create an uninitialized handle.
    *
index 45524ef..e32055f 100644 (file)
 namespace Dali
 {
 
-const char* const DragAndDropDetector::SIGNAL_ENTERED( "drag-and-drop-entered" );
-const char* const DragAndDropDetector::SIGNAL_EXITED( "drag-and-drop-exited" );
-const char* const DragAndDropDetector::SIGNAL_MOVED( "drag-and-drop-moved" );
-const char* const DragAndDropDetector::SIGNAL_DROPPED( "drag-and-drop-dropped" );
-
 DragAndDropDetector::DragAndDropDetector()
 {
 }
@@ -47,22 +42,22 @@ Vector2 DragAndDropDetector::GetCurrentScreenPosition() const
   return GetImplementation(*this).GetCurrentScreenPosition();
 }
 
-DragAndDropDetector::DragAndDropSignalV2& DragAndDropDetector::EnteredSignal()
+DragAndDropDetector::DragAndDropSignal& DragAndDropDetector::EnteredSignal()
 {
   return GetImplementation(*this).EnteredSignal();
 }
 
-DragAndDropDetector::DragAndDropSignalV2& DragAndDropDetector::ExitedSignal()
+DragAndDropDetector::DragAndDropSignal& DragAndDropDetector::ExitedSignal()
 {
   return GetImplementation(*this).ExitedSignal();
 }
 
-DragAndDropDetector::DragAndDropSignalV2& DragAndDropDetector::MovedSignal()
+DragAndDropDetector::DragAndDropSignal& DragAndDropDetector::MovedSignal()
 {
   return GetImplementation(*this).MovedSignal();
 }
 
-DragAndDropDetector::DragAndDropSignalV2& DragAndDropDetector::DroppedSignal()
+DragAndDropDetector::DragAndDropSignal& DragAndDropDetector::DroppedSignal()
 {
   return GetImplementation(*this).DroppedSignal();
 }
index f87dd0d..a40cefc 100644 (file)
@@ -38,8 +38,10 @@ class DragAndDropDetector;
 
 /**
  * @brief The DragAndDropDetector%s provides signals when draggable objects are dragged into our window.
+ *
  * It provides signals for when the draggable object enters our window, moves around in our window,
  * leaves our window and when it is finally dropped into our window.
+ *
  * The basic usage is shown below:
  *
  * @code
@@ -91,16 +93,7 @@ public:
 
   // Typedefs
 
-  /**
-   * @brief Drag & Drop signal.
-   */
-  typedef SignalV2< void ( DragAndDropDetector ) > DragAndDropSignalV2;
-
-  // Signal Names
-  static const char* const SIGNAL_ENTERED;///< name "drag-and-drop-entered"
-  static const char* const SIGNAL_EXITED; ///< name "drag-and-drop-exited"
-  static const char* const SIGNAL_MOVED;  ///< name "drag-and-drop-moved"
-  static const char* const SIGNAL_DROPPED;///< name "drag-and-drop-dropped"
+  typedef SignalV2< void ( DragAndDropDetector ) > DragAndDropSignal; ///< Drag & Drop signal
 
   /**
    * @brief Create an uninitialized handle.
@@ -131,7 +124,7 @@ public:
    */
   Vector2 GetCurrentScreenPosition() const;
 
-public:  // Signals
+  // Signals
 
   /**
    * @brief This is emitted when a dragged object enters a DALi window.
@@ -142,7 +135,7 @@ public:  // Signals
    * @endcode
    * @return The signal to connect to.
    */
-  DragAndDropSignalV2& EnteredSignal();
+  DragAndDropSignal& EnteredSignal();
 
   /**
    * @brief This is emitted when a dragged object leaves a DALi window.
@@ -153,7 +146,7 @@ public:  // Signals
    * @endcode
    * @return The signal to connect to.
    */
-  DragAndDropSignalV2& ExitedSignal();
+  DragAndDropSignal& ExitedSignal();
 
   /**
    * @brief This is emitted when a dragged object is moved within the DALi window.
@@ -162,10 +155,9 @@ public:  // Signals
    * @code
    *   void YourCallback( DragAndDropDetector detector );
    * @endcode
-   * This will be replaced by a property notification system once that is in place.
    * @return The signal to connect to.
    */
-  DragAndDropSignalV2& MovedSignal();
+  DragAndDropSignal& MovedSignal();
 
   /**
    * @brief This is emitted when a dragged object is dropped within a DALi window.
@@ -176,7 +168,7 @@ public:  // Signals
    * @endcode
    * @return The signal to connect to.
    */
-  DragAndDropSignalV2& DroppedSignal();
+  DragAndDropSignal& DroppedSignal();
 
 public: // Not intended for application developers
 
index a918a85..9c45dab 100644 (file)
@@ -24,8 +24,6 @@
 namespace Dali
 {
 
-const char* const SoundPlayer::SIGNAL_SOUND_PLAY_FINISHED = "sound-play-finished";
-
 SoundPlayer::SoundPlayer()
 {
 }
index 95075a5..dc8a155 100644 (file)
@@ -42,11 +42,6 @@ public:
 
   typedef SignalV2< void (SoundPlayer&) > SoundPlayFinishedSignalV2; ///< Sound play finished signal
 
-  // Signal Names
-  static const char* const SIGNAL_SOUND_PLAY_FINISHED; ///< name "sound-play-finished"
-
-public:
-
   /**
    * @brief Create an uninitialized handle.
    *
@@ -90,6 +85,8 @@ public:
    *
    * @pre The SoundPlayer needs to be initialized.
    * @return The signal to connect to.
+   *
+   * @note The signal name is "sound-play-finished" if using BaseHandle::ConnectSignal()
    */
   SoundPlayFinishedSignalV2& SoundPlayFinishedSignal();
 
index bb225b9..e145091 100644 (file)
@@ -25,8 +25,6 @@
 namespace Dali
 {
 
-const char* const TiltSensor::SIGNAL_TILTED = "tilted";
-
 const float TiltSensor::DEFAULT_UPDATE_FREQUENCY = 60.0f;
 
 TiltSensor::TiltSensor()
index 8826c4f..f53c910 100644 (file)
@@ -83,9 +83,6 @@ public:
 
   typedef SignalV2< void (const TiltSensor&) > TiltedSignalV2;
 
-  // Signal Names
-  static const char* const SIGNAL_TILTED;
-
   static const float DEFAULT_UPDATE_FREQUENCY; // 60 hertz
 
   /**
@@ -159,6 +156,8 @@ public:
    * This signal will be emitted when the device is tilted, if the tilt-sensor is enabled.
    * The frequency of the signals can be controlled using SetUpdateFrequency().
    * @return The signal to connect to.
+   *
+   * @note The signal name is "tilted" if using BaseHandle::ConnectSignal()
    */
   TiltedSignalV2& TiltedSignal();
 
index 5a93b11..23807ad 100644 (file)
 namespace // unnamed namespace
 {
 
+const char* const SIGNAL_TILTED = "tilted";
+
 const int NUMBER_OF_SAMPLES = 10;
 
 const float MAX_ACCELEROMETER_XY_VALUE = 9.8f;
 
 // Type Registration
-Dali::BaseHandle Create()
+Dali::BaseHandle GetInstance()
 {
   return Dali::Internal::Adaptor::TiltSensor::Get();
 }
 
-Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), Create );
+Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), GetInstance );
 
-Dali::SignalConnectorType signalConnector1( typeRegistration, Dali::TiltSensor::SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
+Dali::SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
 
 } // unnamed namespace
 
@@ -194,8 +196,7 @@ bool TiltSensor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface
   bool connected( true );
   TiltSensor* sensor = dynamic_cast<TiltSensor*>( object );
 
-  if( sensor &&
-      Dali::TiltSensor::SIGNAL_TILTED == signalName )
+  if( sensor && ( SIGNAL_TILTED == signalName ) )
   {
     sensor->TiltedSignal().Connect( tracker, functor );
   }
index 86aa653..cd373d5 100644 (file)
 namespace // unnamed namespace
 {
 
+const char* const SIGNAL_TILTED = "tilted";
+
 const int NUMBER_OF_SAMPLES = 10;
 
 const float MAX_ACCELEROMETER_XY_VALUE = 9.8f;
 
 // Type Registration
-Dali::BaseHandle Create()
+Dali::BaseHandle GetInstance()
 {
   return Dali::Internal::Adaptor::TiltSensor::Get();
 }
 
-Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), Create );
+Dali::TypeRegistration typeRegistration( typeid(Dali::TiltSensor), typeid(Dali::BaseHandle), GetInstance );
 
-Dali::SignalConnectorType signalConnector1( typeRegistration, Dali::TiltSensor::SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
+Dali::SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TILTED, Dali::Internal::Adaptor::TiltSensor::DoConnectSignal );
 
 } // unnamed namespace
 
@@ -185,8 +187,7 @@ bool TiltSensor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface
   bool connected( true );
   TiltSensor* sensor = dynamic_cast<TiltSensor*>( object );
 
-  if( sensor &&
-      Dali::TiltSensor::SIGNAL_TILTED == signalName )
+  if( sensor && ( SIGNAL_TILTED == signalName ) )
   {
     sensor->TiltedSignal().Connect( tracker, functor );
   }