ImagePrint/ImagePrintUI/imageprinteng/inc/cimageprint.h
branchRCL_3
changeset 21 d59c248c9d36
parent 0 d11fb78c4374
equal deleted inserted replaced
20:159fc2f68139 21:d59c248c9d36
       
     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 CIMAGEPRINT_H
       
    20 #define CIMAGEPRINT_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <coemain.h>
       
    24 
       
    25 #include "rimageprintclient.h"
       
    26 #include "imageprint.h"
       
    27 
       
    28 class TPrintCapability;
       
    29 class TPrinter;
       
    30 class TEvent;
       
    31 class CIdleGuard;
       
    32 class CDiscoveryGuard;
       
    33 class CJobGuard;
       
    34 
       
    35 /**
       
    36  *	@brief Class containing the Image Print Library Public API.
       
    37  */
       
    38 class CImagePrint : public CBase, public MCoeForegroundObserver
       
    39 	{
       
    40 		// Functions
       
    41 		public:
       
    42 			CImagePrint();
       
    43 			~CImagePrint();
       
    44 			void ConnectL();
       
    45 			void Close();
       
    46 			TVersion Version();
       
    47 			TInt StartDiscoveryL(MPrinterDiscoveryObserver& aObserver, TUint aProtocols = 0);
       
    48 			TInt CancelDiscovery();
       
    49 			TInt CreatePrintJobL(TInt aPrinterID, RPointerArray<TDesC>& aImages, MPrintEventObserver& aObserver);
       
    50 			TInt SubmitPrintJobL();
       
    51 			TInt CancelPrintJob();
       
    52 			TInt ContinuePrintJobL();
       
    53 			TInt GetNumPrintPages();
       
    54 			TInt GetJobStatus();
       
    55 			TInt GetPrinterStatus(TInt aPrinterID);
       
    56 			TInt GetPrinterCapabilityIDsL(TInt aPrinterID, RArray<TInt>& aCapabilityIDs);
       
    57 			TInt GetPrinterCapabilityL(TInt aPrinterID, TInt aCapabilityID, TPrintCapability& aCapability);
       
    58 			TInt GetJobSetting(TInt aCapabilityID, TInt& aValue);
       
    59 			TInt SetJobSettingL(TInt aCapabilityID, TInt aValue, TInt& aAffectedCapability);
       
    60 			TInt GetNumPreviewPages();
       
    61 			TInt GetJobTemplateIconL(TInt aTemplateID, TInt& aFbsBitmapHandle);
       
    62 			TInt GetNumberOfCopies( RArray<TInt>& aArray );
       
    63 			TInt SetNumberOfCopies( const RArray<TInt>& aArray );
       
    64 			TInt CreatePreviewImage(TInt aPageNumber);
       
    65 			TInt RemoveCachedPrinterL(TInt aPrinterID);
       
    66 			TUint SupportedProtocols();
       
    67 			void RegisterIdleObserver(MIdleObserver *aObserver);
       
    68 
       
    69 		public: // From MCoeForegroundObserver
       
    70 			void HandleGainingForeground();
       
    71 			void HandleLosingForeground();
       
    72 
       
    73 		protected:
       
    74 		private:
       
    75 
       
    76 		// Data
       
    77 		public:
       
    78 		protected:
       
    79 		private:
       
    80 		
       
    81 			RImagePrintClient iClient;
       
    82 			CIdleGuard* iIdleGuard;
       
    83 			CDiscoveryGuard* iDiscoveryGuard;
       
    84 			CJobGuard* iJobGuard;
       
    85 	};
       
    86 
       
    87 #endif // CIMAGEPRINT_H
       
    88 
       
    89 //  End of File