phoneuis/BubbleManager/Inc/BMMainPaneControl.h
branchRCL_3
changeset 57 94dc1107e8b2
parent 0 5f000ab63145
--- a/phoneuis/BubbleManager/Inc/BMMainPaneControl.h	Mon Jun 21 15:39:45 2010 +0300
+++ b/phoneuis/BubbleManager/Inc/BMMainPaneControl.h	Thu Jul 15 18:38:16 2010 +0300
@@ -19,8 +19,9 @@
 #ifndef C_BUBBLEMAINPANECONTROL_H
 #define C_BUBBLEMAINPANECONTROL_H
 
+#include <coecntrl.h>
 #include "BMBubbleManager.h"
-#include <coecntrl.h>
+#include "telbubbleimagescaler.h"
 
 class CBubbleCallObjectManager;
 class CTelBubbleCustomElement;
@@ -34,7 +35,8 @@
  *  @lib BubbleManager.lib
  *  @since S60 v5.0
  */
-NONSHARABLE_CLASS( CBubbleMainPaneControl ) : public CCoeControl
+NONSHARABLE_CLASS( CBubbleMainPaneControl ) : public CCoeControl,
+    public MTelBubbleImageScalerObserver
     {
 public:
     /**
@@ -77,7 +79,18 @@
      * Returns ETrue when image is being displayed.
      */
     TBool IsUsed() const;
-        
+    
+    // from MTelBubbleImageScalerObserver    
+    /**
+     * Callback function from CTelBubbleImageScaler
+     * 
+     * @param aError Error happened during scaling
+     * @param aBitmap Scaled bitmap
+     * @return None 
+     */ 
+    void ImageScalingComplete
+                    (TInt aError, CFbsBitmap* aBitmap);
+            
 private:    
     CBubbleMainPaneControl( CBubbleManager& aCustomManager, 
                             CBubbleCallObjectManager& aCallObjectManager );
@@ -87,8 +100,10 @@
                           TBool& aBitmapOwnership, 
                           CFbsBitmap*& aMask,
                           TBool& aMaskOwnership,
-                          TBool aIsScalable ); 
+                          TBool aIsScalable,
+                          TBool aThumbnail = EFalse );
 
+    void StartScaling( CFbsBitmap *aSourceBitmap );
 private: // data
     CBubbleManager& iBubbleManager;
     CBubbleCallObjectManager& iCallObjectManager;
@@ -98,6 +113,11 @@
     TBool iIsUsed;
     CFbsBitmap* iBitmap; // not owned
     CFbsBitmap* iMask; // not owned
+    CTelBubbleImageScaler *iScaler;
+    CFbsBitmap *iScaledImage;
+    
+    // to prevent loading & scaling the same image again.
+    CFbsBitmap* iOldBitmap;	
     };
 
 #endif // C_BUBBLEMAINPANECONTROL_H