00001 /* 00002 * ============================================================================ 00003 * Name : CAknGlobalProgressDialog.h 00004 * Part of : Avkon 00005 * 00006 * Description: 00007 * Uses notification framework to show a global progress dialog. 00008 * Version: 00009 * 00010 * Copyright © 2002 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. All rights are reserved. Copying, 00014 * including reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia Corporation. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia Corporation. 00019 * ============================================================================ 00020 */ 00021 #ifndef __AKNGLOBALPROGRESSDIALOG_H__ 00022 #define __AKNGLOBALPROGRESSDIALOG_H__ 00023 00024 #include <AknNotify.h> 00025 #include <aknnotifystd.h> 00026 #include <aknprogressdialog.h> 00027 #include <AknsItemID.h> 00028 00029 #start_since SINCE_3_1_SDK 00030 class CAknSDData; 00031 #end_since SINCE_3_1_SDK 00032 00033 00089 NONSHARABLE_CLASS(CAknGlobalProgressDialog) : public CBase 00090 { 00091 public: 00092 00093 IMPORT_C static CAknGlobalProgressDialog* NewL(); 00094 IMPORT_C static CAknGlobalProgressDialog* NewLC(); 00095 IMPORT_C ~CAknGlobalProgressDialog(); 00096 00106 IMPORT_C void SetIconL( const TDesC& aIconText, 00107 const TDesC& aIconFile, 00108 TInt aIconId = 0, 00109 TInt aIconMaskId = -1 ); 00110 00121 IMPORT_C void SetImageL( const TDesC& aImageFile, 00122 TInt aImageId = 0, 00123 TInt aImageMaskId = -1 ); 00124 00137 IMPORT_C void ShowProgressDialogL( 00138 TRequestStatus& aStatus, 00139 const TDesC& aPrompt, 00140 TInt aSoftkeys = 0, 00141 TInt aFinalValue = 0, 00142 CAknNoteDialog::TTone aTone = 00143 CAknNoteDialog::ENoTone ); 00144 00152 IMPORT_C void UpdateProgressDialog( TInt aValue, 00153 TInt aFinalValue = -1 ); 00154 00160 IMPORT_C void ProcessFinished(); 00161 00166 IMPORT_C void CancelProgressDialog(); 00167 00179 IMPORT_C void SetImageSkinIds( TAknsItemID& aImageId, TAknsItemID& aIconId ); 00180 00181 #start_since SINCE_3_1_SDK 00182 00192 IMPORT_C void SetSecondaryDisplayData(CAknSDData* aData); 00193 #end_since SINCE_3_1_SDK 00194 00195 private: 00199 CAknGlobalProgressDialog(); 00200 00204 void ConstructL(); 00205 00209 void UpdateNotifier(); 00210 00211 private: 00212 // Command send to server 00213 TAknGlobalQueryCmd iCmd; 00214 // Final value of the process 00215 TInt iFinalValue; 00216 // Current value of the process 00217 TInt iValue; 00218 // Handle to session with notify server 00219 RNotifier iNotify; 00220 // Buffer used to pass parameters to server 00221 CBufFlat *iBuffer; 00222 // Pointer to iBuffer 00223 TPtrC8 iBufferPtr; 00224 00225 // Id of the image 00226 TInt iImageId; 00227 // Id of the image's mask 00228 TInt iImageMaskId; 00229 // Id of the icon 00230 TInt iIconId; 00231 // Id of the icon's mask 00232 TInt iIconMaskId; 00233 00234 // Icon's text 00235 HBufC* iIconText; 00236 // Icon file name 00237 HBufC* iIconFile; 00238 // Image file name 00239 HBufC* iImageFile; 00240 00241 TInt iImageSkinsMajorId; 00242 TInt iImageSkinsMinorId; 00243 00244 TInt iIconSkinsMajorId; 00245 TInt iIconSkinsMinorId; 00246 CAknSDData* iAknSDData; 00247 TBuf8<1> iResultBuf; // not really used, but needed to prevent buffer handling errors 00248 }; 00249 00250 00251 // __AKNGLOBALPROGRESSDIALOG_H__ 00252 #endif