sysstatemgmt/systemstatemgr/cmd/inc/ssmdeferreddeleter.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SSMDEFERREDDELETER_H__
       
    17 #define __SSMDEFERREDDELETER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 class CSsmCommandListImpl;
       
    22 
       
    23 /**
       
    24 This active object is used to delete the command list after the execution of 
       
    25 all the deferred commands present in the command list.
       
    26 
       
    27 @internalComponent
       
    28 @released
       
    29 */
       
    30 NONSHARABLE_CLASS(CSsmDeferredDeleter) : public CActive
       
    31 	{
       
    32 public:
       
    33 	static CSsmDeferredDeleter* NewL();
       
    34 	~CSsmDeferredDeleter();
       
    35 
       
    36 	void DeferredDelete(CSsmCommandListImpl* aCommandList);
       
    37 
       
    38 protected:
       
    39 	// from CActive
       
    40 	void RunL();
       
    41 	void DoCancel();
       
    42 
       
    43 	CSsmDeferredDeleter();
       
    44 
       
    45 #ifdef _DEBUG
       
    46 	void ConstructL();
       
    47 	static TInt TimeoutCallback(TAny* aSelf);
       
    48 	// Print warnings in every minute if Deferred deleter is waiting for pending commands
       
    49 	void PrintWarning();
       
    50 #endif
       
    51 
       
    52 private:
       
    53 	CSsmCommandListImpl* iCommandList;
       
    54 
       
    55 #ifdef _DEBUG
       
    56 	CPeriodic* iTimer;
       
    57 #endif
       
    58 	};
       
    59 
       
    60 #endif // __SSMDEFERREDDELETER_H__