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.

99 lines
2.1 KiB

  1. #ifndef _VIEWHPP_
  2. #define _VIEWHPP_
  3. #include <ifaxos.h>
  4. #include <viewrend.h>
  5. #include <rambo.h>
  6. #include <faxspool.h>
  7. #include <faxcodec.h>
  8. #include "genfile.hpp"
  9. #define return_error(mesg) do {DEBUGMSG (1, mesg); return FALSE;} while(0)
  10. // global memory
  11. #ifdef IFBGPROC
  12. #define GlobalAllocPtr(f,cb) IFMemAlloc(f,cb,NULL)
  13. #define GlobalFreePtr(lp) IFMemFree(lp)
  14. #else
  15. #include <windowsx.h>
  16. #endif
  17. // base viewer context
  18. typedef struct FAR VIEWREND : public GENFILE
  19. {
  20. virtual BOOL Init (LPVOID, LPVIEWINFO, LPWORD) = 0;
  21. virtual BOOL SetPage (UINT iPage) = 0;
  22. virtual BOOL GetBand (LPBITMAP) = 0;
  23. virtual ~VIEWREND() {}
  24. }
  25. FAR* LPVIEWREND;
  26. // MMR viewer context
  27. typedef struct FAR MMRVIEW : public VIEWREND
  28. {
  29. LPVOID lpSpool;
  30. SPOOL_HEADER sh;
  31. BOOL fEOP;
  32. LPVOID lpCodec;
  33. FC_PARAM fcp;
  34. LPBUFFER lpbufIn;
  35. BUFFER bufOut;
  36. DWORD nTypeOut;
  37. WORD cbBand;
  38. MMRVIEW (DWORD nTypeOut);
  39. virtual BOOL Init (LPVOID, LPVIEWINFO, LPWORD);
  40. virtual BOOL SetPage (UINT iPage);
  41. virtual BOOL GetBand (LPBITMAP);
  42. virtual ~MMRVIEW();
  43. }
  44. FAR *LPMMRVIEW;
  45. #define MAX_PAGE 1024
  46. // RBA viewer context
  47. typedef struct FAR RBAVIEW : public VIEWREND
  48. {
  49. DWORD dwOffset[MAX_PAGE];
  50. BEGJOB BegJob;
  51. LPVOID ResDir[256];
  52. LPVOID lpCodec;
  53. BUFFER bufIn;
  54. DWORD nTypeOut;
  55. UINT iMaxPage;
  56. HANDLE hHRE;
  57. RBAVIEW (DWORD nTypeOut);
  58. virtual BOOL Init (LPVOID, LPVIEWINFO, LPWORD);
  59. virtual BOOL SetPage (UINT iPage);
  60. virtual BOOL GetBand (LPBITMAP);
  61. virtual ~RBAVIEW();
  62. BOOL ExecuteRPL (LPBITMAP, LPRESHDR);
  63. BOOL ExecuteBand (LPBITMAP, LPRESHDR);
  64. }
  65. FAR *LPRBAVIEW;
  66. // DCX viewer context
  67. typedef struct FAR DCXVIEW : public VIEWREND
  68. {
  69. LPVOID lpCodec;
  70. FC_PARAM fcp;
  71. DWORD nTypeOut;
  72. BUFFER bufIn;
  73. DWORD cbPage;
  74. BOOL fEndPage;
  75. WORD cbBand;
  76. DCXVIEW (DWORD nTypeOut);
  77. virtual BOOL Init (LPVOID, LPVIEWINFO, LPWORD);
  78. virtual BOOL SetPage (UINT iPage);
  79. virtual BOOL GetBand (LPBITMAP);
  80. virtual ~DCXVIEW();
  81. }
  82. FAR *LPDCXVIEW;
  83. #endif // _VIEWHPP_