ImagePrint/ImagePrintEngine/ImagePrintServer/inc/cjobguard.h
branchRCL_3
changeset 20 159fc2f68139
parent 17 26673e532f65
child 21 d59c248c9d36
equal deleted inserted replaced
17:26673e532f65 20:159fc2f68139
     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 CJOBGUARD_H
       
    20 #define CJOBGUARD_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class RImagePrintClient;
       
    25 class MPrintEventObserver;
       
    26 class TJobGuardData;
       
    27 
       
    28 class CJobGuard : 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 CJobGuard* NewL( RImagePrintClient& aClient );
       
    39 		
       
    40 		/**
       
    41          *	Destructor         
       
    42          */
       
    43 		IMPORT_C ~CJobGuard();	
       
    44 		
       
    45 	public:
       
    46 	
       
    47 		/**
       
    48          *	Create print job and start watching for print job events
       
    49          *	
       
    50          *	@param aPrinterID printer id
       
    51          *	@param aImages array of image file names to be printed
       
    52 		 *	@param aObserver observer for notifications about print job events
       
    53          *  @return error code
       
    54          */
       
    55 		IMPORT_C TInt Guard( TInt aPrinterID, RPointerArray<TDesC>& aImages, MPrintEventObserver& aObserver );
       
    56 
       
    57 	private:
       
    58 
       
    59 		CJobGuard( RImagePrintClient& aClient );
       
    60 		void ConstructL();
       
    61 		
       
    62 	private: // from CActive
       
    63 	
       
    64 		void RunL();
       
    65 		void DoCancel();
       
    66 		
       
    67 	private: // data
       
    68 	
       
    69 		RImagePrintClient& iClient;
       
    70 		MPrintEventObserver* iObserver;
       
    71 		TJobGuardData* iData;
       
    72 	};
       
    73 
       
    74 
       
    75 #endif // CJOBGUARD_H
       
    76 
       
    77 //  End of File