stif/StifTFwIf/inc/UIStorePopup.h
branchRCL_3
changeset 40 07b41fa8d1dd
parent 39 3406c99bc375
child 43 ca8a1b6995f6
equal deleted inserted replaced
39:3406c99bc375 40:07b41fa8d1dd
     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: This file contains the header file of the 
       
    15 * CUIStorePopup.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef STIF_TFW_IF_REMOTE_H
       
    20 #define STIF_TFW_IF_REMOTE_H
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include <stifinternal/UIStore.h>
       
    27 
       
    28 // CONSTANTS
       
    29 // None
       
    30 
       
    31 // MACROS
       
    32 // None
       
    33 
       
    34 // DATA TYPES
       
    35 // None
       
    36 
       
    37 // FUNCTION PROTOTYPES
       
    38 // None
       
    39 
       
    40 
       
    41 // FORWARD DECLARATIONS
       
    42 // None
       
    43 
       
    44 
       
    45 // CLASS DECLARATION
       
    46 
       
    47 
       
    48 // DESCRIPTION
       
    49 
       
    50 // CUIStorePopup is a class that is used for remote protocol 
       
    51 // forwarding.
       
    52 class CUIStorePopup
       
    53         :public CActive
       
    54     {
       
    55     public: // Enumerations
       
    56         // None
       
    57 
       
    58     private: // Enumerations
       
    59         // None
       
    60 
       
    61     public: // Constructors and destructor
       
    62 
       
    63         /**
       
    64         * NewL is two-phased constructor.
       
    65         */
       
    66         static CUIStorePopup* NewL( CUIStore* aUIStore,
       
    67                                     CUIEngineContainer* aContainer,
       
    68                                     CStifTFwIfProt* aRemoteMsg,
       
    69                                     CUIStore::TPopupPriority aPopupPriority,
       
    70                                     const TDesC& aMsg );
       
    71 
       
    72         /**
       
    73         * Destructor of CUIStorePopup.
       
    74         */
       
    75         ~CUIStorePopup();
       
    76 
       
    77     public: // New functions
       
    78     
       
    79         TInt Start( const TDesC& aLine1, 
       
    80                     const TDesC& aLine2 );
       
    81                     
       
    82         inline const CUIEngineContainer* Container()
       
    83             { return iContainer; };
       
    84         
       
    85         inline TBool IsEventPopup()
       
    86             { return ( iRemoteMsg->iCmdType == 
       
    87                        CStifTFwIfProt::ECmdRequest ); }
       
    88         
       
    89         // Returns message
       
    90         inline TDesC& GetMessage()
       
    91             { 
       
    92             if( iMsg == NULL )
       
    93                 {
       
    94                 User::Panic( _L("iMsg was NULL"), -1 );
       
    95                 }
       
    96             return *iMsg;
       
    97             };
       
    98 
       
    99         // Returns popup priority
       
   100         inline const CUIStore::TPopupPriority GetPriority()
       
   101             { 
       
   102             return iPopupPriority;
       
   103             };
       
   104         
       
   105     public: // Functions from base classes
       
   106 
       
   107         /**
       
   108         * From CActive RunL handles request completion.
       
   109         */
       
   110         void RunL();
       
   111 
       
   112         /**
       
   113         * From CActive DoCancel handles request cancellation.
       
   114         */
       
   115         void DoCancel();
       
   116 
       
   117     protected: // New functions
       
   118         // None
       
   119 
       
   120     protected: // Functions from base classes
       
   121         // None
       
   122 
       
   123     private: // New functions
       
   124 
       
   125         /** 
       
   126         * C++ default constructor.
       
   127         */
       
   128         CUIStorePopup( CUIStore* aUIStore,
       
   129                        CUIEngineContainer* aContainer,
       
   130                        CStifTFwIfProt* aRemoteMsg,
       
   131                        CUIStore::TPopupPriority aPopupPriority);
       
   132 
       
   133         /**
       
   134         * By default Symbian OS constructor is private.
       
   135         */
       
   136         void ConstructL( const TDesC& aMsg );
       
   137 
       
   138 
       
   139     public: //Data
       
   140         // None
       
   141     
       
   142     protected: // Data
       
   143         // None
       
   144 
       
   145     private: // Data
       
   146 
       
   147         // Pointer to UIEngine
       
   148         CUIStore*                       iUIStore;
       
   149 
       
   150         // Protocol message
       
   151         CStifTFwIfProt*                 iRemoteMsg;
       
   152         
       
   153         // Keycode of the pressed key
       
   154         TKeyCode                        iKey;
       
   155         
       
   156         // test case waiting our response
       
   157         CUIEngineContainer*             iContainer;
       
   158         
       
   159         TInt                            iPopupWindow;
       
   160         
       
   161         // Popup priority
       
   162         CUIStore::TPopupPriority        iPopupPriority;
       
   163         
       
   164         // Popup message
       
   165         HBufC                           * iMsg;
       
   166         
       
   167     public: // Friend classes
       
   168         // None
       
   169 
       
   170     protected: // Friend classes
       
   171         // None
       
   172 
       
   173     private: // Friend classes
       
   174         // None
       
   175 
       
   176     };
       
   177 
       
   178 
       
   179 
       
   180 #endif // STIF_TFW_IF_REMOTE_H
       
   181 
       
   182 // End of File