wvuing/IMPSConnectionUI/UISrc/CCnUiGlobalNoteContainer.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Active object based global note container.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CCNUIGLOBALNOTECONTAINER_H
       
    21 #define __CCNUIGLOBALNOTECONTAINER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 class CAknGlobalNote;
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31  * Active object based global note container.
       
    32  *
       
    33  * Shows desired global note in synchronous manner.
       
    34  */
       
    35 NONSHARABLE_CLASS( CCnUiGlobalNoteContainer ) : public CActive
       
    36     {
       
    37 private: //private enumerations
       
    38 
       
    39     /**
       
    40      * Global note container states.
       
    41      *
       
    42      * @since 2.1
       
    43      */
       
    44     enum TCnUiGNCState
       
    45         {
       
    46         ECnUiGNCIdle = 0,                       ///< Idle state, no operation running
       
    47         ECnUiGNCShowingDetailedNoteMain = 1,    ///< Container showing detailed main note
       
    48         ECnUiGNCShowingDetailedNoteSecond = 2,  ///< Container showing detailed second note
       
    49         ECnUiGNCShowingWaitingNote = 3          ///< Container showing simple waiting note
       
    50         };
       
    51 
       
    52 
       
    53 
       
    54 public:  // Two-phased constructors and destructor
       
    55 
       
    56     /**
       
    57      * Two-phased constructor, constructs the
       
    58      * CCnUiGlobalNoteContainer object.
       
    59      *
       
    60      * @since 2.1
       
    61      * @return is pointer to CCnUiGlobalNoteContainer object.
       
    62      */
       
    63     static CCnUiGlobalNoteContainer* NewLC();
       
    64 
       
    65     /**
       
    66      * Destructor.
       
    67      */
       
    68     virtual ~CCnUiGlobalNoteContainer();
       
    69 
       
    70 
       
    71 private: //Constructors
       
    72 
       
    73     /**
       
    74      * C++ default constructor.
       
    75      */
       
    76     CCnUiGlobalNoteContainer();
       
    77 
       
    78     /**
       
    79      * By default Symbian 2nd phase constructor is private.
       
    80      */
       
    81     void ConstructL();
       
    82 
       
    83 
       
    84 public://New methods
       
    85 
       
    86     /**
       
    87      * Shows two phased "detailed" global note.
       
    88      *
       
    89      * @since 2.1
       
    90      *
       
    91      * @param aPromptText The Prompt text for the main note.
       
    92      * @param aDetailedPromptText The Prompt text for the detailed note.
       
    93      */
       
    94     void ShowWaitigDetailedNoteL( const TDesC& aPromptText,
       
    95                                   const TDesC& aDetailedPromptText );
       
    96 
       
    97 
       
    98     /**
       
    99      * Shows two phased "detailed" global note.
       
   100      *
       
   101      * @since 2.1
       
   102      *
       
   103      * @param aPromptText The Prompt text for the main note.
       
   104      */
       
   105     void ShowWaitingNoteL( const TDesC& aPromptText );
       
   106 
       
   107 
       
   108 
       
   109 protected:  // Methods derived from CActive
       
   110 
       
   111     /**
       
   112      * From CActive.
       
   113      * @see CActive
       
   114      */
       
   115     void RunL();
       
   116 
       
   117     /**
       
   118      * From CActive.
       
   119      * @see CActive
       
   120      */
       
   121     void DoCancel();
       
   122 
       
   123     /**
       
   124      * From CActive.
       
   125      * @see CActive
       
   126      */
       
   127     TInt RunError( TInt aError );
       
   128 
       
   129 
       
   130 
       
   131 private: // New private helper methods
       
   132 
       
   133     /**
       
   134      * Waits the started asynchronous steps
       
   135      * to complete using the CActiveSchedulerWait.
       
   136      *
       
   137      * @since 2.1
       
   138      */
       
   139     void WaitCompletion();
       
   140 
       
   141 
       
   142     /**
       
   143      * Stops the previously started
       
   144      * CActiveSchedulerWait wait loop.
       
   145      *
       
   146      * @since 2.1
       
   147      */
       
   148     void Completed();
       
   149 
       
   150     /**
       
   151      * Resets the container internal state
       
   152      *
       
   153      * @since 2.1
       
   154      */
       
   155     void ResetState();
       
   156 
       
   157 
       
   158     /**
       
   159      * Issues detailed main note.
       
   160      *
       
   161      * @since 2.1
       
   162      */
       
   163     void IssueDetailedMainNoteL();
       
   164 
       
   165 
       
   166     /**
       
   167      * Issues detailed second note.
       
   168      *
       
   169      * @since 2.1
       
   170      */
       
   171     void IssueDetailedSecondNoteL();
       
   172 
       
   173 
       
   174     /**
       
   175      * Issues normal waiting note.
       
   176      *
       
   177      * @since 2.1
       
   178      */
       
   179     void IssueWaitingNoteL();
       
   180 
       
   181 
       
   182 
       
   183 private: //data
       
   184 
       
   185     ///<Active Scheduler Wait, owned
       
   186     CActiveSchedulerWait            iWait;
       
   187 
       
   188     ///<Global note handle, owned
       
   189     CAknGlobalNote*                 iGlobalNote;
       
   190 
       
   191     ///<Prompt text for main note, owned
       
   192     HBufC*                          iPromptText;
       
   193 
       
   194     ///<Prompt text for second note, owned
       
   195     HBufC*                          iDetailedPromptText;
       
   196 
       
   197     ///<Note id for current note, owned
       
   198     TInt                            iNoteId;
       
   199 
       
   200     ///<Note container internal state, owned
       
   201     TCnUiGNCState                   iState;
       
   202     };
       
   203 
       
   204 #endif      //__CCNUIGLOBALNOTECONTAINER_H
       
   205 
       
   206 //  End of File
       
   207