ImagePrint/ImagePrintEngine/ImagePrintServer/inc/cidleguard.h
branchGCC_SURGE
changeset 25 59ea2209bb67
parent 23 08cc4cc059d4
parent 15 a92d00fca574
equal deleted inserted replaced
23:08cc4cc059d4 25:59ea2209bb67
     1 /*
       
     2 * Copyright (c) 2004-2007 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIDLEGUARD_H
       
    20 #define CIDLEGUARD_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class RImagePrintClient;
       
    25 class MIdleObserver;
       
    26 class TIdleGuardData;
       
    27 
       
    28 class CIdleGuard : public CActive
       
    29 	{
       
    30 	public:
       
    31 
       
    32 		/**
       
    33          *	2-phase constructor
       
    34          *	
       
    35 		 *	@param aClient client for communication with server process 
       
    36          *  @return new object
       
    37          */
       
    38 		IMPORT_C static CIdleGuard* NewL( RImagePrintClient& aClient );
       
    39 		
       
    40 		/**
       
    41          *	Destructor         
       
    42          */
       
    43 		IMPORT_C ~CIdleGuard();	
       
    44 		
       
    45 	public:
       
    46 	
       
    47 		/**
       
    48          *	Start watching for idle events
       
    49          *	
       
    50 		 *	@param aObserver observer for notifications about idle events
       
    51          */
       
    52 		IMPORT_C void Guard( MIdleObserver* aObserver );
       
    53 
       
    54 	private:
       
    55 
       
    56 		CIdleGuard( RImagePrintClient& aClient );
       
    57 		void ConstructL();
       
    58 		
       
    59 	private: // from CActive
       
    60 	
       
    61 		void RunL();
       
    62 		void DoCancel();
       
    63 		
       
    64 	private: // data
       
    65 	
       
    66 		RImagePrintClient& iClient;
       
    67 		MIdleObserver* iObserver;
       
    68 		TIdleGuardData* iData;
       
    69 	};
       
    70 
       
    71 
       
    72 #endif // CIDLEGUARD_H
       
    73 
       
    74 //  End of File