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