Remove TypeRegistration from deprecated Image classes
[platform/core/uifw/dali-core.git] / dali / internal / event / images / resource-image-impl.h
index aeac5b9..ce1d227 100644 (file)
@@ -24,7 +24,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/images/resource-image.h>
 #include <dali/internal/event/images/image-impl.h>
-#include <dali/internal/event/images/image-factory-cache.h>
+#include <dali/internal/common/image-attributes.h>
 #include <dali/integration-api/debug.h> // For DALI_LOG_OBJECT_STRING_DECLARATION
 
 namespace Dali
@@ -63,7 +63,7 @@ public:
   /**
    * @copydoc Dali::ResourceImage::GetLoadingState()
    */
-  Dali::LoadingState GetLoadingState() const { return mTicket ? mTicket->GetLoadingState() : ResourceLoading; }
+  Dali::LoadingState GetLoadingState() const { return mLoadingState; }
 
   /**
    * @copydoc Dali::ResourceImage::LoadingFinishedSignal()
@@ -71,17 +71,6 @@ public:
   Dali::ResourceImage::ResourceImageSignal& LoadingFinishedSignal() { return mLoadingFinished; }
 
   /**
-   * Connects a callback function with the object's signals.
-   * @param[in] object The object providing the signal.
-   * @param[in] tracker Used to disconnect the signal.
-   * @param[in] signalName The signal to connect to.
-   * @param[in] functor A newly allocated FunctorDelegate.
-   * @return True if the signal was connected.
-   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
-   */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-
-  /**
    * Get the attributes of the image.
    * Only to be used after the image has finished loading.
    * (Ticket's LoadingSucceeded callback was called)
@@ -117,27 +106,6 @@ public:
    */
   virtual Vector2 GetNaturalSize() const;
 
-  /**
-   * Indicates that the image is used.
-   */
-  virtual void Connect();
-
-  /**
-   * Indicates that the image is not used anymore.
-   */
-  virtual void Disconnect();
-
-public: // From ResourceTicketObserver
-
-  /**
-   * @copydoc Dali::Internal::ResourceTicketObserver::ResourceLoadingFailed()
-   */
-  virtual void ResourceLoadingFailed(const ResourceTicket& ticket);
-
-  /**
-   * @copydoc Dali::Internal::ResourceTicketObserver::ResourceLoadingSucceeded()
-   */
-  virtual void ResourceLoadingSucceeded(const ResourceTicket& ticket);
 
 protected:
 
@@ -151,22 +119,16 @@ protected:
    */
   ResourceImage();
 
-private:
-
   /**
-   * Helper method to set new resource ticket. Stops observing current ticket if any, and starts observing
-   * the new one or just resets the intrusive pointer.
-   * @param[in] ticket pointer to new resource Ticket or NULL.
+   * Constructor, with url and attributes
    */
-  void SetTicket( ResourceTicket* ticket );
+  ResourceImage( const std::string& url, const ImageAttributes& attributes);
 
 private:
-
-  ImageFactory& mImageFactory;
-
-  ImageFactoryCache::RequestPtr mRequest; ///< contains the initially requested attributes for image. Request is reissued when memory was released.
-
   Dali::ResourceImage::ResourceImageSignal mLoadingFinished;
+  ImageAttributes mAttributes;
+  std::string mUrl;
+  Dali::LoadingState mLoadingState;
 
   // Changes scope, should be at end of class
   DALI_LOG_OBJECT_STRING_DECLARATION;