williamr@2: /* williamr@2: * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * CAknWaitDialog should be used when the progress of the process cannot be williamr@2: * traced and the length of the process is unknown. If that's not the case williamr@2: * please use CAknProgressDialog. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef __AKN_WAIT_DIALOG__ williamr@2: #define __AKN_WAIT_DIALOG__ williamr@2: williamr@4: #include williamr@2: williamr@2: /** williamr@2: * This class is exactly like CAknProgressDialog except it should be used williamr@2: * when the progress of the process cannot be williamr@2: * traced and the length of the process is unknown. If that's not the case williamr@2: * please use CAknProgressDialog. williamr@2: * williamr@2: * @see CAknProgressDialog williamr@2: * williamr@2: * Usage: williamr@2: * iWaitDialog = new(ELeave)CAknWaitDialog( williamr@2: * (REINTERPRET_CAST(CEikDialog**,&iWaitDialog))); williamr@2: * iWaitDialog->SetTone( CAknNoteDialog::EConfirmationTone ); williamr@2: * iWaitDialog->ExecuteLD(R_WAIT_NOTE); williamr@2: * williamr@2: * // Process finished williamr@2: * iWaitDialog->ProcessFinishedL(); // deletes the dialog williamr@2: * williamr@2: * Callback: williamr@2: * To get a callback when/if the dialog has been dismissed williamr@2: * use SetCallBack API (for more info see aknprogressdialog.h) or williamr@2: * make your dialog modal. If the dialog is used as a modal, RunDlgLD williamr@2: * returns 0 if the dialog is dismissed and EAknSoftkeyDone if not. williamr@2: * williamr@2: * Resource flags: williamr@2: * - Always set EEikDialogFlagNotifyEsc. (or use preset avkon williamr@2: * dialog resource flag, i.e. EAknWaitNoteFlags). williamr@2: * - To make a dialog modal use EEikDialogFlagWait williamr@2: * williamr@2: * Note! Dialog should be dismissed only by using ProcessFinishedL() method, williamr@2: * it should not be deleted directly (i.e. delete iWaitDialog)!!! williamr@2: * williamr@2: */ williamr@2: williamr@2: class CAknWaitDialog : public CAknProgressDialog williamr@2: { williamr@2: public: williamr@2: /** williamr@2: * A class constructor williamr@2: * williamr@2: * @param aSelfPtr Pointer to itself. The pointer needs to be williamr@2: * valid when the dialog is dismissed and must not williamr@2: * be on the stack. williamr@2: */ williamr@2: IMPORT_C CAknWaitDialog(CEikDialog** aSelfPtr); williamr@2: williamr@2: /** williamr@2: * A class constructor williamr@2: * williamr@2: * @param aSelfPtr Pointer to itself. The pointer needs to be williamr@2: * valid when the dialog is dismissed and must not williamr@2: * be on the stack. williamr@2: * @param aVisibilityDelayOff If set ETrue the dialog will be visible williamr@2: * immediality. Use only when the length of williamr@2: * the process is ALWAYS over 1.5 seconds. williamr@2: */ williamr@2: IMPORT_C CAknWaitDialog(CEikDialog** aSelfPtr,TBool aVisibilityDelayOff); williamr@2: williamr@2: /** williamr@2: * From CCoeControl williamr@2: * Handles pointer events williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: williamr@2: private: williamr@2: /** williamr@2: * From CAknControl williamr@2: */ williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: williamr@2: private: williamr@2: IMPORT_C virtual void CEikDialog_Reserved_1(); williamr@2: IMPORT_C virtual void CEikDialog_Reserved_2(); williamr@2: private: williamr@2: IMPORT_C virtual void CAknNoteDialog_Reserved(); williamr@2: public: williamr@2: williamr@2: /** williamr@2: * CAknWaitDialog does not support this and hence this method will PANIC. williamr@2: * Therefore do not use it. williamr@2: */ williamr@2: IMPORT_C CEikProgressInfo* GetProgressInfo(); williamr@2: williamr@2: private: williamr@2: TInt iSpare; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif