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