X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fecore%2Fcommon%2Fecore-indicator-impl.h;fp=adaptors%2Fcommon%2Findicator-impl.h;h=5f2b9be03244e4276ebd0fbbef27e83eecd81205;hb=refs%2Fchanges%2F76%2F54476%2F4;hp=e2c676ea5f26cfa2dba50061570ad1b91764202a;hpb=2d5175d5d1ca2aefd295d81aed6474b9ecf1dda1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/common/indicator-impl.h b/adaptors/ecore/common/ecore-indicator-impl.h similarity index 78% rename from adaptors/common/indicator-impl.h rename to adaptors/ecore/common/ecore-indicator-impl.h index e2c676e..5f2b9be 100644 --- a/adaptors/common/indicator-impl.h +++ b/adaptors/ecore/common/ecore-indicator-impl.h @@ -1,5 +1,5 @@ -#ifndef __DALI_INTERNAL_INDICATOR_H__ -#define __DALI_INTERNAL_INDICATOR_H__ +#ifndef __DALI_INTERNAL_ECORE_INDICATOR_H__ +#define __DALI_INTERNAL_ECORE_INDICATOR_H__ /* * Copyright (c) 2014 Samsung Electronics Co., Ltd. @@ -19,15 +19,16 @@ */ // EXTERNAL INCLUDES -#include #include +#include #include #include #include // INTERNAL INCLUDES +#include #include -#include +#include #include #include #include @@ -51,44 +52,16 @@ typedef unsigned int PixmapId; * The Indicator class connects to the indicator server, and gets and draws the indicator * for the given orientation. */ -class Indicator : public ConnectionTracker, public ServerConnection::Observer +class Indicator : public ConnectionTracker, public ServerConnection::Observer, public IndicatorInterface { public: + enum State { DISCONNECTED, CONNECTED }; - enum Type - { - INDICATOR_TYPE_UNKNOWN, - INDICATOR_TYPE_1, - INDICATOR_TYPE_2 - }; - -public: - class Observer - { - public: - /** - * Notify the observer if the indicator type changes - * @param[in] type The new indicator type - */ - virtual void IndicatorTypeChanged( Type type ) = 0; - - /** - * Notify the observer when the upload has completed. - * @param[in] indicator The indicator that has finished uploading. - */ - virtual void IndicatorClosed(Indicator* indicator) = 0; - - /** - * Notify the observer when the indicator visible status is changed. - * @param[in] isShowing Whether the indicator is visible. - */ - virtual void IndicatorVisibilityChanged( bool isVisible ) = 0; - }; protected: /** @@ -160,74 +133,56 @@ protected: }; -public: +public: // Dali::Internal::Adaptor::IndicicatorInterface /** - * Constructor. Creates a new indicator and opens a connection for - * the required orientation. - * @param[in] orientation The orientation in which to draw the indicator - * @param[in] observer The indicator closed + * @copydoc Dali::Internal::IndicatorInterface::IndicatorInterface */ Indicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, - Observer* observer ); + IndicatorInterface::Observer* observer ); /** - * Destructor + * @copydoc Dali::Internal::IndicatorInterface::~IndicatorInterface */ virtual ~Indicator(); - void SetAdaptor(Adaptor* adaptor); + + virtual void SetAdaptor(Adaptor* adaptor); /** - * Get the actor which contains the indicator image. Ensure that the handle is - * released when no longer needed. - * Changes from the indicator service will modify the image and resize the actor appropriately. - * @return The indicator actor. + * @copydoc Dali::Internal::IndicatorInterface::GetActor */ - Dali::Actor GetActor(); + virtual Dali::Actor GetActor(); /** - * Opens a new connection for the required orientation. - * @param[in] orientation The new orientation + * @copydoc Dali::Internal::IndicatorInterface::Open */ - void Open( Dali::Window::WindowOrientation orientation ); + virtual void Open( Dali::Window::WindowOrientation orientation ); /** - * Close the current connection. Will respond with Observer::IndicatorClosed() - * when done. - * @note, IndicatorClosed() will be called synchronously if there's no update - * in progress, or asychronously if waiting for SignalUploaded ) + * @copydoc Dali::Internal::IndicatorInterface::Close */ - void Close(); + virtual void Close(); /** - * Set the opacity mode of the indicator background. - * @param[in] mode opacity mode + * @copydoc Dali::Internal::IndicatorInterface::SetOpacityMode */ - void SetOpacityMode( Dali::Window::IndicatorBgOpacity mode ); + virtual void SetOpacityMode( Dali::Window::IndicatorBgOpacity mode ); /** - * Set whether the indicator is visible or not. - * @param[in] visibleMode visible mode for indicator bar. - * @param[in] forceUpdate true if want to change visible mode forcely + * @copydoc Dali::Internal::IndicatorInterface::SetVisible */ - void SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool forceUpdate = false ); + virtual void SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool forceUpdate = false ); /** - * Check whether the indicator is connected to the indicator service. - * @return whether the indicator is connected or not. + * @copydoc Dali::Internal::IndicatorInterface::IsConnected */ - bool IsConnected(); + virtual bool IsConnected(); /** - * Send message to the indicator service. - * @param[in] messageDomain Message Reference number - * @param[in] messageId Reference number of the message this message refers to - * @param[in] data The data to send as part of the message - * @param[in] size Length of the data, in bytes, to send - * @return whether the message is sent successfully or not + * @copydoc Dali::Internal::IndicatorInterface::SendMessage */ - bool SendMessage( int messageDomain, int messageId, const void *data, int size ); + virtual bool SendMessage( int messageDomain, int messageId, const void *data, int size ); private: /** @@ -448,7 +403,7 @@ private: Adaptor* mAdaptor; ServerConnection* mServerConnection; - Indicator::Observer* mObserver; ///< Upload observer + IndicatorInterface::Observer* mObserver; ///< Upload observer Dali::Window::WindowOrientation mOrientation; int mImageWidth;