00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 #ifndef __PDREXAMPLE_H__
00032 #define __PDREXAMPLE_H__
00033 
00034 #include <e32base.h>
00035 #include <e32cons.h>
00036 
00037 #include <pdrport.h>
00038 #include <gdi.h>
00039 #include <fbs.h>
00040 #include <prnsetup.h>
00041 #include <metafile.h>
00042 
00043 #define PDD_NAME _L("ECDRV")
00044 #define LDD_NAME _L("ECOMM")
00045 
00046 _LIT( KTitle, "PdrExample" );
00047 _LIT( KDriveName, "z:" );
00048 _LIT( KEpsonFileName, "epson.pdr" );
00049 
00050 class CPdrPrint;
00051 
00052 
00053 
00054 class CPdrExample :public CBase
00055         {
00056 public:
00057         static CPdrExample* NewL();
00058         ~CPdrExample();
00059         
00060         void CreatePrinterDriverL();    
00061         void DisplayTypefaces();
00062         void CreatePrinterControl();
00063         void PrintPages();
00064         
00065 
00066 private:
00067         CPdrExample();
00068         void ConstructL();
00069 
00070 private:
00071         CPdrPrint*      iStopper;
00072 
00073         CConsoleBase*   iConsole;       
00074         CPrinterDriver* iDriver;
00075         CPrinterDevice* iDevice;
00076     };
00077     
00078 
00079 class CPdrPrint : public CActive
00080         {
00081 public:
00082         CPdrPrint(): CActive(EPriorityLow) {}
00083         TRequestStatus& Status();       
00084         void DoCancel() {}
00085         TRequestStatus&  Queue(); 
00086         void RunL(); 
00087         };
00088 
00089 
00090 void CPdrPrint::RunL()
00091         {
00092         CActiveScheduler::Stop();
00093         }
00094                         
00095 TRequestStatus& CPdrPrint::Queue()
00096         {
00097         SetActive();
00098         return iStatus;
00099         }
00100                         
00101 TRequestStatus& CPdrPrint::Status()
00102         {
00103         return iStatus;
00104         }
00105 
00106 #endif //__PDREXAMPLE_H__