Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

308 lines
10 KiB

  1. /*++
  2. Copyright (c) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. comoem.h
  5. Abstract:
  6. Environment:
  7. Windows NT Unidrv driver
  8. Revision History:
  9. Created it.
  10. --*/
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Interface Oem Class Factory definition
  14. //
  15. class IOemCF : public IClassFactory
  16. {
  17. public:
  18. // *** IUnknown methods ***
  19. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  20. STDMETHOD_(ULONG,AddRef) (THIS);
  21. STDMETHOD_(ULONG,Release) (THIS);
  22. // *** IClassFactory methods ***
  23. STDMETHOD(CreateInstance) (THIS_
  24. LPUNKNOWN pUnkOuter,
  25. REFIID riid,
  26. LPVOID FAR* ppvObject);
  27. STDMETHOD(LockServer) (THIS_ BOOL bLock);
  28. // Constructor
  29. IOemCF(): m_cRef(1) { };
  30. ~IOemCF() { };
  31. protected:
  32. LONG m_cRef;
  33. };
  34. ////////////////////////////////////////////////////////////////////////////////
  35. //
  36. // Interface Oem CallBack definition
  37. //
  38. // NTRAID#NTBUG9-172276-2002/03/08-yasuho-: CPCA support
  39. class IOemCB:public IPrintOemUni2
  40. {
  41. public:
  42. // *** IUnknown methods ***
  43. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  44. STDMETHOD_(ULONG,AddRef) (THIS);
  45. STDMETHOD_(ULONG,Release) (THIS);
  46. //
  47. // Method for publishing Driver interface.
  48. //
  49. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown);
  50. //
  51. // Method for getting the implemented methods.
  52. // Returns S_OK if the given method is implemneted.
  53. // Returns S_FALSE if the given method is notimplemneted.
  54. //
  55. STDMETHOD(GetImplementedMethod)(THIS_ PSTR pMethodName);
  56. //
  57. // Method for OEM to specify DDI hook out
  58. //
  59. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  60. DWORD cbSize,
  61. PDRVENABLEDATA pded);
  62. //
  63. // Method to notify OEM plugin that it is no longer required
  64. //
  65. STDMETHOD(DisableDriver) (THIS);
  66. //
  67. // Method for OEM to contruct its own PDEV
  68. //
  69. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  70. PWSTR pPrinterName,
  71. ULONG cPatterns,
  72. HSURF *phsurfPatterns,
  73. ULONG cjGdiInfo,
  74. GDIINFO *pGdiInfo,
  75. ULONG cjDevInfo,
  76. DEVINFO *pDevInfo,
  77. DRVENABLEDATA *pded,
  78. OUT PDEVOEM *pDevOem);
  79. //
  80. // Method for OEM to free any resource associated with its PDEV
  81. //
  82. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj);
  83. //
  84. // Method for OEM to transfer from old PDEV to new PDEV
  85. //
  86. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  87. PDEVOBJ pdevobjNew);
  88. //
  89. // Get OEM dll related information
  90. //
  91. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  92. PVOID pBuffer,
  93. DWORD cbSize,
  94. PDWORD pcbNeeded);
  95. //
  96. // OEMDriverDMS - UNIDRV only, return E_NOTIMPL on Pscript
  97. //
  98. STDMETHOD(DriverDMS)(THIS_ PVOID pDevObj,
  99. PVOID pBuffer,
  100. DWORD cbSize,
  101. PDWORD pcbNeeded);
  102. //
  103. // OEMDevMode
  104. //
  105. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  106. POEMDMPARAM pOemDMParam);
  107. //
  108. // OEMCommandCallback - UNIDRV only, return E_NOTIMPL on Pscript
  109. //
  110. STDMETHOD(CommandCallback)(THIS_ PDEVOBJ pdevobj,
  111. DWORD dwCallbackID,
  112. DWORD dwCount,
  113. PDWORD pdwParams,
  114. OUT INT *piResult);
  115. //
  116. // OEMImageProcessing - UNIDRV only, return E_NOTIMPL on Pscript
  117. //
  118. STDMETHOD(ImageProcessing)(THIS_ PDEVOBJ pdevobj,
  119. PBYTE pSrcBitmap,
  120. PBITMAPINFOHEADER pBitmapInfoHeader,
  121. PBYTE pColorTable,
  122. DWORD dwCallbackID,
  123. PIPPARAMS pIPParams,
  124. OUT PBYTE *ppbResult);
  125. //
  126. // OEMFilterGraphics - UNIDRV only, return E_NOTIMPL on Pscript
  127. //
  128. STDMETHOD(FilterGraphics) (THIS_ PDEVOBJ pdevobj,
  129. PBYTE pBuf,
  130. DWORD dwLen);
  131. //
  132. // OEMCompression - UNIDRV only, return E_NOTIMPL on Pscript
  133. //
  134. STDMETHOD(Compression)(THIS_ PDEVOBJ pdevobj,
  135. PBYTE pInBuf,
  136. PBYTE pOutBuf,
  137. DWORD dwInLen,
  138. DWORD dwOutLen,
  139. OUT INT *piResult);
  140. //
  141. // OEMHalftone - UNIDRV only, return E_NOTIMPL on Pscript
  142. //
  143. STDMETHOD(HalftonePattern) (THIS_ PDEVOBJ pdevobj,
  144. PBYTE pHTPattern,
  145. DWORD dwHTPatternX,
  146. DWORD dwHTPatternY,
  147. DWORD dwHTNumPatterns,
  148. DWORD dwCallbackID,
  149. PBYTE pResource,
  150. DWORD dwResourceSize);
  151. //
  152. // OEMMemoryUsage - UNIDRV only, return E_NOTIMPL on Pscript
  153. //
  154. STDMETHOD(MemoryUsage) (THIS_ PDEVOBJ pdevobj,
  155. POEMMEMORYUSAGE pMemoryUsage);
  156. //
  157. // OEMTTYGetInfo - UNIDRV only, return E_NOTIMPL on Pscript
  158. //
  159. STDMETHOD(TTYGetInfo)(THIS_ PDEVOBJ pdevobj,
  160. DWORD dwInfoIndex,
  161. PVOID pOutputBuf,
  162. DWORD dwSize,
  163. DWORD *pcbcNeeded);
  164. //
  165. // OEMDownloadFontheader - UNIDRV only
  166. //
  167. STDMETHOD(DownloadFontHeader)(THIS_ PDEVOBJ pdevobj,
  168. PUNIFONTOBJ pUFObj,
  169. OUT DWORD *pdwResult);
  170. //
  171. // OEMDownloadCharGlyph - UNIDRV only
  172. //
  173. STDMETHOD(DownloadCharGlyph)(THIS_ PDEVOBJ pdevobj,
  174. PUNIFONTOBJ pUFObj,
  175. HGLYPH hGlyph,
  176. PDWORD pdwWidth,
  177. OUT DWORD *pdwResult);
  178. //
  179. // OEMTTDownloadMethod - UNIDRV only
  180. //
  181. STDMETHOD(TTDownloadMethod)(THIS_ PDEVOBJ pdevobj,
  182. PUNIFONTOBJ pUFObj,
  183. OUT DWORD *pdwResult);
  184. //
  185. // OEMOutputCharStr - UNIDRV only
  186. //
  187. STDMETHOD(OutputCharStr)(THIS_ PDEVOBJ pdevobj,
  188. PUNIFONTOBJ pUFObj,
  189. DWORD dwType,
  190. DWORD dwCount,
  191. PVOID pGlyph);
  192. //
  193. // OEMSendFontCmd - UNIDRV only
  194. //
  195. STDMETHOD(SendFontCmd)(THIS_ PDEVOBJ pdevobj,
  196. PUNIFONTOBJ pUFObj,
  197. PFINVOCATION pFInv);
  198. //
  199. // OEMTextOutAsBitmap - UNIDRV only
  200. //
  201. STDMETHOD(TextOutAsBitmap)(THIS_ SURFOBJ *pso,
  202. STROBJ *pstro,
  203. FONTOBJ *pfo,
  204. CLIPOBJ *pco,
  205. RECTL *prclExtra,
  206. RECTL *prclOpaque,
  207. BRUSHOBJ *pboFore,
  208. BRUSHOBJ *pboOpaque,
  209. POINTL *pptlOrg,
  210. MIX mix);
  211. // NTRAID#NTBUG9-172276-2002/03/08-yasuho-: CPCA support
  212. //
  213. // IPrintOemUni2 methods
  214. //
  215. //
  216. // Method for plugin to hook out spooler's WritePrinter API so it
  217. // can get access to output data Universal driver is generating
  218. //
  219. // At DrvEnablePDEV time, Universal driver will call this function with
  220. // pdevobj = NULL, pBuf = NULL, cbBuffer = 0 to detect if the plugin
  221. // implements this function. Plugin should return S_OK to indicate it is
  222. // implementing this function, or return E_NOTIMPL otherwise.
  223. //
  224. // In pcbWritten, plugins should return the number of bytes written to the
  225. // spooler's WritePrinter function. Zero doesn't carry a special meaning,
  226. // errors must be reported through the returned HRESULT.
  227. //
  228. STDMETHOD(WritePrinter) (THIS_ PDEVOBJ pdevobj,
  229. PVOID pBuf,
  230. DWORD cbBuffer,
  231. PDWORD pcbWritten);
  232. IOemCB() { m_cRef = 1; pOEMHelp = NULL; };
  233. ~IOemCB() { };
  234. protected:
  235. IPrintOemDriverUni* pOEMHelp;
  236. LONG m_cRef;
  237. };