20 #define CAMONECLICKUPLOADUTILITY_H |
20 #define CAMONECLICKUPLOADUTILITY_H |
21 |
21 |
22 |
22 |
23 #include <e32std.h> |
23 #include <e32std.h> |
24 |
24 |
|
25 #include "CamSettingsInternal.hrh" |
|
26 #include "camimagedecoder.h" |
|
27 |
|
28 |
25 class CAiwServiceHandler; |
29 class CAiwServiceHandler; |
|
30 class AknToolbar; |
|
31 class CGulIcon; |
26 |
32 |
|
33 class CFbsBitmap; |
|
34 class CCamImageDecoder; |
|
35 class MCamImageDecoderObserver; |
27 |
36 |
28 /** |
37 /** |
29 * Helper class for implementing one-click upload support |
38 * Helper class for implementing one-click upload support |
30 * |
39 * |
31 * @since S60 v5.0 |
40 * @since S60 v5.0 |
32 */ |
41 */ |
33 class CCamOneClickUploadUtility : public CBase |
42 class CCamOneClickUploadUtility : public CBase, |
|
43 public MCamImageDecoderObserver |
34 { |
44 { |
35 public: |
45 public: |
36 /** |
46 /** |
37 * Two-phased constructor. |
47 * Two-phased constructor. |
38 */ |
48 */ |
70 * Get the tooltip text for one-click upload button. |
80 * Get the tooltip text for one-click upload button. |
71 * @since S60 v5.0 |
81 * @since S60 v5.0 |
72 * @return Tooltip text |
82 * @return Tooltip text |
73 */ |
83 */ |
74 const TDesC& ButtonTooltipL(); |
84 const TDesC& ButtonTooltipL(); |
75 |
85 |
|
86 /** |
|
87 * Get the current one click icon |
|
88 */ |
|
89 void UpdateUploadIcon( CAknToolbar *aToolbar, TCamCameraMode aMode ); |
|
90 |
|
91 /** |
|
92 * From MCamImageDecoderObserver |
|
93 */ |
|
94 virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, |
|
95 const CFbsBitmap* aMask ); |
|
96 |
76 private: |
97 private: |
77 void ConstructL(); |
98 void ConstructL(); |
78 void CheckVersionL(); |
99 void CheckVersionL(); |
79 void InitializeAiwL(); |
100 void InitializeAiwL(); |
80 CCamOneClickUploadUtility(); |
101 CCamOneClickUploadUtility(); |
|
102 |
|
103 /** |
|
104 * Obtains the path for icon to be used. |
|
105 * @param aMode the current camera mode |
|
106 * @param aPath descriptor containing the path of icon to be used |
|
107 */ |
|
108 void CurrentIconPathL( TCamCameraMode aMode, TDes& aPath ); |
|
109 |
|
110 /** |
|
111 * Decodes / starts decoding of icon to be used. |
|
112 * @param aPath descriptor containing the path of icon to be used |
|
113 */ |
|
114 void DecodeIconL( TDesC* aPath ); |
81 |
115 |
82 private: // Data |
116 private: // Data |
83 |
117 |
84 TBool iUploadSupported; |
118 TBool iUploadSupported; |
85 |
119 |
86 // Own |
120 // Own |
87 CAiwServiceHandler* iAiwServiceHandler; |
121 CAiwServiceHandler* iAiwServiceHandler; |
|
122 |
|
123 CFbsBitmap* iDecodedBitmap; |
|
124 CCamImageDecoder* iDecoder; |
|
125 |
|
126 TFileName iIconFileName; |
|
127 CFbsBitmap* iIconImage; |
|
128 CFbsBitmap* iIconMask; |
|
129 |
|
130 CAknToolbar* iToolbar; |
88 |
131 |
89 // Own |
132 // Own |
90 HBufC* iTooltip; |
133 HBufC* iTooltip; |
91 }; |
134 }; |
92 |
135 |
93 |
|
94 #endif // CAMONECLICKUPLOADUTILITY_H |
136 #endif // CAMONECLICKUPLOADUTILITY_H |
95 |
|