imstutils/imconversationview/imcvuiapp/inc/cimcvapplogineventlistener.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declaration for RProperty where conversation view login event handled.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CIMCVAPPLOGINEVENTLISTENER_H_
       
    19 #define CIMCVAPPLOGINEVENTLISTENER_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <e32property.h>
       
    23 #include <AknWaitDialog.h>
       
    24 
       
    25 // forward declaration
       
    26 class CIMCVEngine;
       
    27 class CIMCVAppUi;
       
    28 class CIMCVAppWaitNote;
       
    29 
       
    30 class CIMCVAppLoginEventListener : public CActive
       
    31     {
       
    32 public :
       
    33         // Constructor
       
    34         /**
       
    35          * Creates a new CIMCVAppLoginEventListener.
       
    36          * @param aTabbedView, reference to tabbedview
       
    37          * @return New instance of this class         
       
    38          */
       
    39         static CIMCVAppLoginEventListener* NewL(CIMCVEngine& aEngine, 
       
    40         			 							CIMCVAppUi& aAppUi,
       
    41         			 							const TDesC& aUserId);
       
    42         
       
    43           /**
       
    44            * Standard C++ destructor.
       
    45            */
       
    46          ~CIMCVAppLoginEventListener();
       
    47          
       
    48          /**
       
    49          * start listening
       
    50          */
       
    51          void StartListening();
       
    52          
       
    53          /**
       
    54          * stop listening
       
    55          */
       
    56          void StopListening();
       
    57          
       
    58 private : // From CActive
       
    59 
       
    60         /**
       
    61         *  RunL
       
    62         */
       
    63         void RunL();  
       
    64         
       
    65         /**
       
    66         *  DoCancel
       
    67         */
       
    68         void DoCancel();
       
    69 
       
    70 public:
       
    71 
       
    72 		TInt LoginL();
       
    73 		
       
    74 		void SetUserIdL( const TDesC& aUserId );
       
    75 		
       
    76 private:
       
    77 		    
       
    78 		void LoginCompletedL();	    
       
    79         
       
    80 private: // Implementation
       
    81        /**
       
    82         * Standard C++ constructor
       
    83         * @param aTabbedView, reference to tabbedview
       
    84         */
       
    85         CIMCVAppLoginEventListener( CIMCVEngine& aEngine, 
       
    86         			 							CIMCVAppUi& aAppUi );
       
    87 
       
    88        /**
       
    89         * Performs the 2nd phase of construction.
       
    90         */
       
    91        void ConstructL(const TDesC& aUserId);
       
    92        
       
    93 private :
       
    94     
       
    95     // owns , property to use
       
    96     RProperty iProperty;    
       
    97     
       
    98  	// processing note is visible
       
    99  	TBool iWaitVisible;
       
   100  	
       
   101  	// Doesn't own (destroys itself)
       
   102     CIMCVAppWaitNote* iWaitDialog;
       
   103     
       
   104     
       
   105     CActiveSchedulerWait iWait;    
       
   106     
       
   107     // not owned, reference to uiengine
       
   108     CIMCVEngine& iEngine ;
       
   109     
       
   110     // not owned., reference to appui	
       
   111     CIMCVAppUi& iAppUi;
       
   112     
       
   113     //user id - Owns
       
   114    	HBufC* iUserId;  
       
   115     
       
   116     //holds the error of the login operation
       
   117     TInt iErr;
       
   118         
       
   119        
       
   120     };
       
   121 
       
   122 #endif /*CIMCVAPPLOGINEVENTLISTENER_H_*/