phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdNoteController.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Encapsulates an active object used in controlling notes.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHCLTUSSDNOTECONTROLLER_H
       
    20 #define CPHCLTUSSDNOTECONTROLLER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "MPhCltUssdNoteControllerCallBack.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CAknGlobalNote;
       
    28 class RConeResourceLoader;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *   Encapsulates an active object used in controlling notes.
       
    34 *
       
    35 *  @lib phoneclient.lib
       
    36 *  @since 9.1
       
    37 */
       
    38 NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CActive
       
    39     {
       
    40     public:  // Constructor and destructor
       
    41         
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         * 
       
    45         * @param aCallBack a callback to be notified events from note controller.
       
    46         * @param aPriority active object priority.
       
    47         * @return Pointer to created CPhCltUssdImp instance.
       
    48         */
       
    49         static CPhCltUssdNoteController* NewL( 
       
    50                 MPhCltUssdNoteControllerCallBack& aCallBack,
       
    51                 TInt aPriority );
       
    52         
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         ~CPhCltUssdNoteController();
       
    57 
       
    58         
       
    59     public:
       
    60         
       
    61         // Shows information note.
       
    62         void ShowInformationNoteL( TInt aResourceId );
       
    63         
       
    64         // Shows global information note.
       
    65         void ShowGlobalInformationNoteL( TInt aResourceId );
       
    66         
       
    67         // Shows global confirmation note.
       
    68         void ShowGlobalConfirmationNoteL( TInt aResourceId );
       
    69         
       
    70         // Shows global wait note.
       
    71         void ShowGlobalWaitNoteL( TInt aResourceId, TInt aSoftkeyResourceId = 0 );
       
    72         
       
    73         // Destroys global wait note.
       
    74         void DestroyGlobalWaitNote();
       
    75         
       
    76     private: 
       
    77         
       
    78         /**
       
    79         * C++ constructor.
       
    80         */
       
    81         CPhCltUssdNoteController( 
       
    82             MPhCltUssdNoteControllerCallBack& aCallBack,
       
    83             TInt aPriority );
       
    84         
       
    85         // Symbian 2nd phase constructor.
       
    86         void ConstructL();
       
    87         
       
    88         // The note type enumeration, used inside the class.
       
    89         enum TPhCltUssdNoteType
       
    90             {
       
    91             EPhCltUssdInformationNote,
       
    92             EPhCltUssdGlobalInformationNote,
       
    93             EPhCltUssdGlobalConfirmationNote
       
    94             };
       
    95 
       
    96         // Shows the note of given type. 
       
    97         void ShowNoteL( TPhCltUssdNoteType aType, TInt aResourceId );
       
    98         
       
    99         // Loads the resource file.
       
   100         void LoadResourceFileL();
       
   101         
       
   102         // From base classes
       
   103        
       
   104         /*
       
   105         * From CActive. Called when dialog is dismissed by soft key.
       
   106         */
       
   107         void RunL();
       
   108 
       
   109         /**
       
   110         * From CActive. 
       
   111         */
       
   112         void DoCancel();
       
   113 
       
   114 
       
   115     private:    // Data
       
   116         
       
   117         // Buffer for messages.
       
   118         HBufC* iMessageBuffer;
       
   119         
       
   120         // Global wait note.
       
   121         CAknGlobalNote* iGlobalWaitNote;
       
   122         
       
   123         // Id of an active wait note.
       
   124         TInt iWaitNoteId;
       
   125         
       
   126         // The callback to be notified when wait note is dismissed.  
       
   127         MPhCltUssdNoteControllerCallBack& iCallBack;
       
   128 
       
   129         // Resource loader.
       
   130         RConeResourceLoader* iResourceLoader;
       
   131     };
       
   132 
       
   133 #endif // CPHCLTUSSDNOTECONTROLLER_H
       
   134 
       
   135 // End of File