classicui_pub/notes_api/inc/aknwaitdialog.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *       CAknWaitDialog should be used when the progress of the process cannot be
       
    16 *       traced and the length of the process is unknown. If that's not the case
       
    17 *       please use CAknProgressDialog.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef __AKN_WAIT_DIALOG__
       
    23 #define __AKN_WAIT_DIALOG__
       
    24 
       
    25 #include <AknProgressDialog.h>
       
    26 
       
    27 /**
       
    28 *  This class is exactly like CAknProgressDialog except it should be used 
       
    29 *  when the progress of the process cannot be
       
    30 *  traced and the length of the process is unknown. If that's not the case
       
    31 *  please use CAknProgressDialog.
       
    32 *
       
    33 *  @see CAknProgressDialog
       
    34 *
       
    35 * Usage:
       
    36 *        iWaitDialog = new(ELeave)CAknWaitDialog(
       
    37 *                                (REINTERPRET_CAST(CEikDialog**,&iWaitDialog)));
       
    38 *        iWaitDialog->SetTone( CAknNoteDialog::EConfirmationTone );
       
    39 *        iWaitDialog->ExecuteLD(R_WAIT_NOTE);
       
    40 * 
       
    41 *        // Process finished
       
    42 *        iWaitDialog->ProcessFinishedL(); // deletes the dialog
       
    43 *
       
    44 * Callback:
       
    45 *       To get a callback when/if the dialog has been dismissed
       
    46 *       use SetCallBack API (for more info see aknprogressdialog.h) or
       
    47 *       make your dialog modal. If the dialog is used as a modal, RunDlgLD
       
    48 *       returns 0 if the dialog is dismissed and EAknSoftkeyDone if not.
       
    49 *
       
    50 * Resource flags:
       
    51 *        -   Always set EEikDialogFlagNotifyEsc. (or use preset avkon
       
    52 *                   dialog resource flag, i.e. EAknWaitNoteFlags).
       
    53 *        -   To make a dialog modal use EEikDialogFlagWait
       
    54 *
       
    55 * Note!  Dialog should be dismissed only by using ProcessFinishedL() method,
       
    56 *        it should not be deleted directly (i.e. delete iWaitDialog)!!!
       
    57 *
       
    58 */
       
    59 
       
    60 class CAknWaitDialog : public CAknProgressDialog  
       
    61 {
       
    62 public:
       
    63     /**
       
    64      * A class constructor
       
    65      *
       
    66      * @param    aSelfPtr        Pointer to itself. The pointer needs to be
       
    67      *                           valid when the dialog is dismissed and must not
       
    68 	 *                           be on the stack.
       
    69      */
       
    70 	IMPORT_C CAknWaitDialog(CEikDialog** aSelfPtr);
       
    71 
       
    72     /**
       
    73      * A class constructor
       
    74      *
       
    75      * @param    aSelfPtr        Pointer to itself. The pointer needs to be
       
    76      *                           valid when the dialog is dismissed and must not
       
    77 	 *                           be on the stack.
       
    78      * @param    aVisibilityDelayOff If set ETrue the dialog will be visible
       
    79      *                               immediality. Use only when the length of
       
    80      *                               the process is ALWAYS over 1.5 seconds.
       
    81      */
       
    82     IMPORT_C CAknWaitDialog(CEikDialog** aSelfPtr,TBool aVisibilityDelayOff);
       
    83 
       
    84     /** 
       
    85      * From CCoeControl
       
    86      * Handles pointer events
       
    87      */
       
    88     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
    89 
       
    90 private:
       
    91     /**
       
    92     * From CAknControl
       
    93     */
       
    94     IMPORT_C void* ExtensionInterface( TUid aInterface );
       
    95 
       
    96 private: 
       
    97 	IMPORT_C virtual void CEikDialog_Reserved_1();
       
    98 	IMPORT_C virtual void CEikDialog_Reserved_2();	
       
    99 private: 
       
   100 	IMPORT_C virtual void CAknNoteDialog_Reserved();
       
   101 public:
       
   102 
       
   103     /**
       
   104      * CAknWaitDialog does not support this and hence this method will PANIC.
       
   105 	 * Therefore do not use it.
       
   106      */
       
   107     IMPORT_C CEikProgressInfo* GetProgressInfo();
       
   108 
       
   109 private:
       
   110     TInt iSpare;
       
   111 
       
   112 };
       
   113 
       
   114 #endif