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