imservices/imfeatureplugin/srcimoperations/operationlaunchcleaner.cpp
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Internal operation for launching cleaner
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include "operationlaunchcleaner.h"
       
    20 #include "protocolimdatahostimp.h"
       
    21 #include "imdatacacheimp.h"
       
    22 #include "ximphost.h"
       
    23 #include "imlogutils.h"
       
    24 // ============================ MEMBER FUNCTIONS =============================
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // COperationLaunchCleaner::COperationLaunchCleaner()
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 EXPORT_C COperationLaunchCleaner::COperationLaunchCleaner()
       
    31     {
       
    32     }
       
    33 // ---------------------------------------------------------------------------
       
    34 // COperationLaunchCleaner::~COperationLaunchCleaner()
       
    35 // ---------------------------------------------------------------------------
       
    36 //
       
    37 COperationLaunchCleaner::~COperationLaunchCleaner()
       
    38     {
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // COperationLaunchCleaner::ConstructL()
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 void COperationLaunchCleaner::ConstructL( const TDesC8& /*aParamPck*/ )
       
    46     {
       
    47     }
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // COperationLaunchCleaner::ProcessL()
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 void COperationLaunchCleaner::ProcessL()
       
    54     {
       
    55     
       
    56     XImLogger::Log(_L("COperationLaunchCleaner::ProcessL Started"));
       
    57 	CXIMPOperationBase::ProcessL();
       
    58     
       
    59     // modified by pankaj
       
    60     //iMyHost->ImDataAccess().ImDataCache().CleanExpired();
       
    61     MProtocolImDataHost* imProtocolHost = 
       
    62 					static_cast <MProtocolImDataHost*> (iMyHost->GetProtocolHost(MProtocolImDataHost::KInterfaceId) );
       
    63 	imProtocolHost->ImDataCache().CleanExpired() ;
       
    64     
       
    65     iMyHost->HandleInternalRequestCompleted( iReqId, KErrNone );
       
    66     XImLogger::Log(_L("COperationLaunchCleaner::ProcessL Completed"));
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------------------------
       
    70 // COperationLaunchCleaner::RequestCompleted()
       
    71 // ---------------------------------------------------------------------------
       
    72 //
       
    73 void COperationLaunchCleaner::RequestCompletedL()
       
    74     {
       
    75     XImLogger::Log(_L("COperationLaunchCleaner::RequestCompletedL Started"));
       
    76     CXIMPOperationBase::RequestCompletedL();
       
    77     XImLogger::Log(_L("COperationLaunchCleaner::RequestCompletedL Completed"));
       
    78     }
       
    79 // ---------------------------------------------------------------------------
       
    80 // COperationLaunchCleaner::Type()
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 TInt COperationLaunchCleaner::Type() const
       
    84     {
       
    85     return NImOps::EIMCleaner;
       
    86     }
       
    87 
       
    88 // ---------------------------------------------------------------------------
       
    89 // COperationLaunchCleaner::EndOperation()
       
    90 // ---------------------------------------------------------------------------
       
    91 //
       
    92 void COperationLaunchCleaner::EndOperation()
       
    93     {
       
    94     XImLogger::Log(_L("COperationLaunchCleaner::EndOperation Started"));
       
    95     CXIMPOperationBase::EndOperation();
       
    96     iMyHost->StartCleanerTimer();
       
    97     XImLogger::Log(_L("COperationLaunchCleaner::EndOperation Completed"));
       
    98     }
       
    99 
       
   100 // End of file