16 */ |
16 */ |
17 |
17 |
18 #ifndef CCAPPMYCARDIMAGELOADER_H |
18 #ifndef CCAPPMYCARDIMAGELOADER_H |
19 #define CCAPPMYCARDIMAGELOADER_H |
19 #define CCAPPMYCARDIMAGELOADER_H |
20 |
20 |
21 #include <e32base.h> |
21 #include <CCAppImageDecoding.h> |
22 #include <MPbk2ImageOperationObservers.h> |
|
23 |
22 |
24 class CVPbkContactManager; |
|
25 class CPbk2ImageManager; |
|
26 class MVPbkStoreContact; |
23 class MVPbkStoreContact; |
27 class MPbk2ImageOperation; |
24 class CCCAppImageDecoding; |
|
25 class CFbsBitmap; |
28 |
26 |
29 /** |
27 /** |
30 * MyCard image loading observer class |
28 * MyCard image loading observer class |
31 */ |
29 */ |
32 class MMyCardImageLoaderObserver |
30 class MMyCardImageLoaderObserver |
57 * |
55 * |
58 * @lib ccappmycardplugin.dll |
56 * @lib ccappmycardplugin.dll |
59 * @since S60 9.2 |
57 * @since S60 9.2 |
60 */ |
58 */ |
61 NONSHARABLE_CLASS( CCCAppMyCardImageLoader ) : |
59 NONSHARABLE_CLASS( CCCAppMyCardImageLoader ) : |
62 public CBase, |
60 public CBase, |
63 public MPbk2ImageGetObserver |
61 public MCCAppImageDecodingObserver |
64 { |
62 { |
65 |
63 |
66 public: |
64 public: |
67 |
65 |
68 /** |
66 /** |
69 * Two-phased constructor. |
67 * Two-phased constructor. |
70 */ |
68 */ |
71 static CCCAppMyCardImageLoader* NewL( |
69 static CCCAppMyCardImageLoader* NewL( |
72 CVPbkContactManager& aContactManager, |
|
73 MMyCardImageLoaderObserver& aObserver ); |
70 MMyCardImageLoaderObserver& aObserver ); |
74 |
71 |
75 /** |
72 /** |
76 * Destructor. |
73 * Destructor. |
77 */ |
74 */ |
85 * Once loading is complete the new image is delivered to observer |
82 * Once loading is complete the new image is delivered to observer |
86 * with a call to MMyCardImageLoaderObserver::ThumbnailReady. |
83 * with a call to MMyCardImageLoaderObserver::ThumbnailReady. |
87 * |
84 * |
88 * @param aContact source contact for the image |
85 * @param aContact source contact for the image |
89 */ |
86 */ |
90 void LoadContactImageL( MVPbkStoreContact& aContact ); |
87 void LoadContactImageL( |
91 |
88 MVPbkStoreContact& aContact, |
|
89 const TSize& aThumbnailSize ); |
|
90 void ResizeImageL( const TSize& aThumbnailSize ); |
92 |
91 |
93 private: // From MPbk2ImageGetObserver |
92 private: // From MCCAppImageDecodingObserver |
94 virtual void Pbk2ImageGetComplete( |
93 void BitmapReadyL( CFbsBitmap* aBitmap ); |
95 MPbk2ImageOperation& aOperation, |
|
96 CFbsBitmap* aBitmap ); |
|
97 virtual void Pbk2ImageGetFailed( |
|
98 MPbk2ImageOperation& aOperation, |
|
99 TInt aError ); |
|
100 |
|
101 |
94 |
102 private: // constructors |
95 private: // constructors |
103 |
96 |
104 /** |
97 /** |
105 * Constructor |
98 * Constructor |
106 */ |
99 */ |
107 CCCAppMyCardImageLoader( |
100 inline CCCAppMyCardImageLoader( |
108 CVPbkContactManager& aContactManager, |
|
109 MMyCardImageLoaderObserver& aObserver ); |
101 MMyCardImageLoaderObserver& aObserver ); |
110 |
|
111 /** |
|
112 * Constructor |
|
113 */ |
|
114 void ConstructL(); |
|
115 |
|
116 |
102 |
117 private: // data |
103 private: // data |
118 |
|
119 /// Not own. Virtual phonebook contact manager |
|
120 CVPbkContactManager& iContactManager; |
|
121 |
104 |
122 /// Not own. Observer |
105 /// Not own. Observer |
123 MMyCardImageLoaderObserver& iObserver; |
106 MMyCardImageLoaderObserver& iObserver; |
124 |
107 |
125 /// Own. Phonebook image manager |
108 /// Own. |
126 CPbk2ImageManager* iImageManager; |
109 HBufC8* iImageBuffer; |
127 |
110 |
128 /// Own. Image operation |
111 /// Own. |
129 MPbk2ImageOperation* iOperation; |
112 HBufC* iImageFileName; |
|
113 |
|
114 /// Own |
|
115 CCCAppImageDecoding* iImageDecoding; |
130 }; |
116 }; |
131 |
117 |
132 #endif // CCAPPMYCARDIMAGELOADER_H |
118 #endif // CCAPPMYCARDIMAGELOADER_H |
133 |
119 |
134 // End of File |
120 // End of File |