uiservicetab/vimpstcmdprocess/src/cvimpstcmdlogin.cpp
branchRCL_3
changeset 22 3104fc151679
parent 21 2b7283837edb
child 23 9a48e301e94b
equal deleted inserted replaced
21:2b7283837edb 22:3104fc151679
     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: command process for login 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "cvimpstcmdlogin.h"
       
    21 
       
    22 #include "vimpstcmd.hrh"
       
    23 #include "mvimpstcmdobserver.h"
       
    24 
       
    25 #include "uiservicetabtracer.h"
       
    26 
       
    27 #include <e32def.h>
       
    28 #include "mvimpstengine.h"
       
    29 
       
    30 // Constants
       
    31 
       
    32 // --------------------------------------------------------------------------
       
    33 // CVIMPSTCmdLogin::CVIMPSTCmdLogin
       
    34 // --------------------------------------------------------------------------
       
    35 //
       
    36 CVIMPSTCmdLogin::CVIMPSTCmdLogin( 
       
    37         const TInt aCommandId ,TUint32 aServiceID,
       
    38         MVIMPSTEngine& aEngine) :            
       
    39             iCommandId( aCommandId ),
       
    40             iServiceId( aServiceID ),
       
    41             iEngine(aEngine)
       
    42     {
       
    43     }
       
    44 
       
    45 // --------------------------------------------------------------------------
       
    46 // CVIMPSTCmdLogin::~CVIMPSTCmdLogin
       
    47 // --------------------------------------------------------------------------
       
    48 //
       
    49 CVIMPSTCmdLogin::~CVIMPSTCmdLogin()
       
    50     {    
       
    51     
       
    52     }
       
    53 
       
    54 // --------------------------------------------------------------------------
       
    55 // CVIMPSTCmdLogin::NewL
       
    56 // --------------------------------------------------------------------------
       
    57 //
       
    58 CVIMPSTCmdLogin* CVIMPSTCmdLogin::NewL( 
       
    59         const TInt aCommandId,TUint32 aServiceID,
       
    60         MVIMPSTEngine& aEngine)
       
    61     {
       
    62     CVIMPSTCmdLogin* self = new (ELeave ) CVIMPSTCmdLogin( aCommandId ,aServiceID, aEngine);
       
    63     self->ConstructL(); //use contsurctL if necessary
       
    64     return self;
       
    65     }
       
    66 // --------------------------------------------------------------------------
       
    67 // CVIMPSTCmdLogin::ConstructL
       
    68 // --------------------------------------------------------------------------
       
    69 //
       
    70 void CVIMPSTCmdLogin::ConstructL()
       
    71     {    
       
    72    
       
    73     }
       
    74 
       
    75 // --------------------------------------------------------------------------
       
    76 // CVIMPSTCmdLogin::ExecuteLD
       
    77 // --------------------------------------------------------------------------
       
    78 //
       
    79 void CVIMPSTCmdLogin::ExecuteLD()
       
    80     {
       
    81    
       
    82     TRACER_AUTO;
       
    83     //push to the cleanupstack
       
    84     CleanupStack::PushL( this );   
       
    85 	
       
    86 	//call login
       
    87    	iEngine.Login();
       
    88    	
       
    89     
       
    90 
       
    91     if(iObserver)
       
    92 	    {
       
    93 	    iObserver->CommandFinishedL(*this);
       
    94 	    }
       
    95 	
       
    96 	CleanupStack::PopAndDestroy();	
       
    97 	
       
    98     }
       
    99 
       
   100 
       
   101 // --------------------------------------------------------------------------
       
   102 // CVIMPSTCmdLogin::AddObserver
       
   103 // --------------------------------------------------------------------------
       
   104 //
       
   105 void CVIMPSTCmdLogin::AddObserver( MVIMPSTCmdObserver& aObserver )
       
   106     {
       
   107     // store the observer to notify the command completion
       
   108     iObserver = &aObserver;
       
   109     }
       
   110 
       
   111 
       
   112 // --------------------------------------------------------------------------
       
   113 // CVIMPSTCmdLogin::CommandId
       
   114 // --------------------------------------------------------------------------
       
   115 //
       
   116 TInt CVIMPSTCmdLogin::CommandId() const
       
   117 	{
       
   118 	return iCommandId;	
       
   119 	}
       
   120 
       
   121 // --------------------------------------------------------------------------
       
   122 // CVIMPSTCmdLogin::Result
       
   123 // --------------------------------------------------------------------------
       
   124 //
       
   125 TInt CVIMPSTCmdLogin::Result() const
       
   126 	{
       
   127 	//return valid data regd the command operation
       
   128 	//must be freed in Dtor
       
   129 	return 0;
       
   130 	}
       
   131 
       
   132 // End of File