mmsharing/mmshui/inc/musuiviewcontainer.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 0 f0cf47e981f9
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     1 /*
       
     2 * Copyright (c) 2007 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:  The MUS application's UI class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MUSUIVIEWCONTAINER_H
       
    21 #define MUSUIVIEWCONTAINER_H
       
    22 
       
    23 
       
    24 #include <coecntrl.h>                // Control base class
       
    25 #include <AknProgressDialog.h>
       
    26 
       
    27 class CAknWaitDialog;
       
    28 class CMusUiGeneralView;
       
    29 
       
    30 /**
       
    31  *
       
    32  *
       
    33  */
       
    34 class CMusUiViewContainer :	public CCoeControl
       
    35     {
       
    36 
       
    37 public:  // constructors and destructor
       
    38 
       
    39     /**
       
    40      * Destructor.
       
    41      */
       
    42     ~CMusUiViewContainer();
       
    43 
       
    44 public: // new functions
       
    45 	
       
    46 	void CancelWaitTimer();
       
    47 
       
    48     /**
       
    49      * Dismisses the current active wait note, if any.
       
    50      */
       
    51     void DismissWaitDialogL( TBool aReturnValue = ETrue );
       
    52 
       
    53     /**
       
    54      * Shows sychronous wait dialog with softkey R_AVKON_SOFTKEYS_CANCEL.
       
    55      * @param aPrompt Prompt text shown in dialog
       
    56      * @param aTimerInSeconds Timer in seconds when dialog is dismissed
       
    57      *        automatically. Timer value 0 means that no timer is used.
       
    58      * @param aExpirationMessageResourceId Message to be loaded and shown if 
       
    59      *        timer expires. Value 0 means that no message is shown.
       
    60      * @return ETrue if wait note is dismissed by calling DismissWaitDialogL
       
    61      *         with param ETrue. EFalse if user pressed cancel, timer expires
       
    62      *         or if DismissWaitDialogL is called with param EFalse.
       
    63      */
       
    64     TBool RunWaitDialogL( const TDesC& aPrompt, 
       
    65                           TInt aTimerInSeconds = 0,
       
    66                           TInt aExpirationMessageResourceId = 0 );
       
    67     
       
    68     /**
       
    69      * Set call back service of wait dialog
       
    70      * @param aCallback A pointer of class MProgressDialogCallback
       
    71      *        which implemented DialogDismissedL 
       
    72      */
       
    73     void SetWaitDialogCallbackL( MProgressDialogCallback* aCallback );
       
    74     
       
    75     /**
       
    76     * Checks whether wait dialog is shown currently.
       
    77     * @return ETrue if wait dialog is show.
       
    78     */
       
    79     TBool WaitDialogShown() const;
       
    80     
       
    81     /**
       
    82     * Request that toolbar visibility is set once currently shown dialog 
       
    83     * is dismissed.
       
    84     * @param aToolbarHandler if NULL is passed, previous request is canceled.
       
    85     *        Ownership not transferred.
       
    86     */
       
    87     void RequestToolbarVisibilityOnceDialogDismissed( 
       
    88                                 CMusUiGeneralView* aToolbarHandler );
       
    89     
       
    90 protected: // constructors
       
    91     
       
    92     /**
       
    93      * Meant to be a base class, no instantiation
       
    94      */
       
    95     CMusUiViewContainer();
       
    96 
       
    97 private: // new static functions
       
    98 
       
    99     /**
       
   100      * Tick handler, callback function directly called by periodic timer
       
   101      *
       
   102      * @param aObject Pointer passed to TCallback.
       
   103      * @return Value to indicate if callback function should be called again.
       
   104      */
       
   105     static TInt DoWaitNoteTimeout( TAny* aObject );
       
   106 
       
   107 
       
   108 private: // data
       
   109     
       
   110     /**  Wait dialog to show the invite is sent. Not own. */
       
   111     CAknWaitDialog* iWaitDialog;
       
   112     
       
   113     /**  Periodic timer active object.  Owns. */
       
   114     CPeriodic* iWaitDialogTimer;
       
   115     
       
   116     /**
       
   117     * Indicates if wait note is dismissed using DismissWaitDialogL
       
   118     */
       
   119     TBool iInvitationWaitDialogDismissed;
       
   120     
       
   121     /**
       
   122     * If iInvitationWaitDialogDismissed is ETrue, this value should be returned
       
   123     * from RunWaitDialogL
       
   124     */
       
   125     TBool iWaitDialogReturnValueWhenDismissed;
       
   126     
       
   127     /**
       
   128     * Resource ID of message to be shown if timer expires
       
   129     */
       
   130     TInt iExpirationMessageResourceId;
       
   131     
       
   132     /**
       
   133     * Flag indicating whether wait dialog is currently shown.
       
   134     */
       
   135     TBool iShowingWaitDialog;
       
   136     
       
   137     /**
       
   138     * Not owned.
       
   139     */
       
   140     CMusUiGeneralView* iToolbarHandler;
       
   141     
       
   142     };
       
   143 
       
   144 
       
   145 #endif // MUSUISENDVIEWCONTAINER_H
       
   146 
       
   147 // end of file