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.

129 lines
3.7 KiB

  1. // FaxJob.h : Declaration of the CFaxJobs
  2. #ifndef __FAXJOBS_H_
  3. #define __FAXJOBS_H_
  4. #include "resource.h" // main symbols
  5. #include <winfax.h>
  6. #include "faxsvr.h"
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CFaxJobs
  9. class ATL_NO_VTABLE CFaxJobs :
  10. public CComObjectRootEx<CComSingleThreadModel>,
  11. public CComCoClass<CFaxJobs, &CLSID_FaxJobs>,
  12. public IDispatchImpl<IFaxJobs, &IID_IFaxJobs, &LIBID_FAXCOMLib>
  13. {
  14. public:
  15. CFaxJobs()
  16. {
  17. m_Jobs = 0;
  18. m_LastFaxError = 0;
  19. m_pFaxServer = NULL;
  20. m_VarVect = NULL;
  21. }
  22. DECLARE_REGISTRY_RESOURCEID(IDR_FAXJOBS)
  23. BEGIN_COM_MAP(CFaxJobs)
  24. COM_INTERFACE_ENTRY(IFaxJobs)
  25. COM_INTERFACE_ENTRY(IDispatch)
  26. END_COM_MAP()
  27. // IFaxJobs
  28. public:
  29. STDMETHOD(get_Item)(long Index, /*[out, retval]*/ VARIANT *pVal);
  30. STDMETHOD(get_Count)(/*[out, retval]*/ long *pVal);
  31. BOOL Init(CFaxServer *pFaxServer);
  32. ~CFaxJobs();
  33. private:
  34. CComVariant* m_VarVect;
  35. CFaxServer* m_pFaxServer;
  36. DWORD m_Jobs;
  37. DWORD m_LastFaxError;
  38. };
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CFaxJob
  41. class ATL_NO_VTABLE CFaxJob :
  42. public CComObjectRootEx<CComSingleThreadModel>,
  43. public CComCoClass<CFaxJob, &CLSID_FaxJob>,
  44. public IDispatchImpl<IFaxJob, &IID_IFaxJob, &LIBID_FAXCOMLib>
  45. {
  46. public:
  47. CFaxJob()
  48. {
  49. m_JobId = 0;
  50. m_UserName = NULL;
  51. m_JobType = JT_UNKNOWN;
  52. m_QueueStatus = 0 ;
  53. m_DeviceStatus = 0 ;
  54. m_szQueueStatus = NULL;
  55. m_szDeviceStatus = NULL;
  56. m_PageCount=0;
  57. m_RecipientNumber = NULL;
  58. m_RecipientName = NULL;
  59. m_Tsid = NULL;
  60. m_SenderName = NULL;
  61. m_SenderCompany = NULL;
  62. m_SenderDept = NULL;
  63. m_BillingCode = NULL;
  64. m_DiscountTime = FALSE;
  65. m_DisplayName = NULL;
  66. m_Command = JC_UNKNOWN;
  67. m_pFaxServer = NULL;
  68. }
  69. DECLARE_REGISTRY_RESOURCEID(IDR_FAXJOB)
  70. BEGIN_COM_MAP(CFaxJob)
  71. COM_INTERFACE_ENTRY(IFaxJob)
  72. COM_INTERFACE_ENTRY(IDispatch)
  73. END_COM_MAP()
  74. // IFaxJob
  75. public:
  76. STDMETHOD(Refresh)();
  77. STDMETHOD(SetStatus)(long Command);
  78. BOOL SetJob();
  79. ~CFaxJob();
  80. BOOL Initialize(CFaxServer *pFaxServer,DWORD JobId,LPCWSTR UserName,DWORD JobType,DWORD QueueStatus,DWORD DeviceStatus,DWORD PageCount,LPCWSTR RecipientNumber,LPCWSTR RecipientName,LPCWSTR Tsid,LPCWSTR SenderName,LPCWSTR SenderCompany,LPCWSTR SenderDept,LPCWSTR BillingCode,DWORD ScheduleAction,LPCWSTR DisplayName);
  81. STDMETHOD(get_DiscountSend)(/*[out, retval]*/ BOOL *pVal);
  82. STDMETHOD(get_DisplayName)(/*[out, retval]*/ BSTR *pVal);
  83. STDMETHOD(get_BillingCode)(/*[out, retval]*/ BSTR *pVal);
  84. STDMETHOD(get_SenderDept)(/*[out, retval]*/ BSTR *pVal);
  85. STDMETHOD(get_SenderCompany)(/*[out, retval]*/ BSTR *pVal);
  86. STDMETHOD(get_SenderName)(/*[out, retval]*/ BSTR *pVal);
  87. STDMETHOD(get_Tsid)(/*[out, retval]*/ BSTR *pVal);
  88. STDMETHOD(get_RecipientName)(/*[out, retval]*/ BSTR *pVal);
  89. STDMETHOD(get_FaxNumber)(/*[out, retval]*/ BSTR *pVal);
  90. STDMETHOD(get_PageCount)(/*[out, retval]*/ long *pVal);
  91. STDMETHOD(get_DeviceStatus)(/*[out, retval]*/ BSTR *pVal);
  92. STDMETHOD(get_QueueStatus)(/*[out, retval]*/ BSTR *pVal);
  93. STDMETHOD(get_UserName)(/*[out, retval]*/ BSTR *pVal);
  94. STDMETHOD(get_Type)(/*[out, retval]*/ long *pVal);
  95. STDMETHOD(get_JobId)(/*[out, retval]*/ long *pVal);
  96. private:
  97. DWORD m_JobId;
  98. BSTR m_UserName;
  99. DWORD m_JobType;
  100. DWORD m_QueueStatus;
  101. DWORD m_DeviceStatus;
  102. BSTR m_szQueueStatus;
  103. BSTR m_szDeviceStatus;
  104. DWORD m_PageCount;
  105. BSTR m_RecipientNumber;
  106. BSTR m_RecipientName;
  107. BSTR m_Tsid;
  108. BSTR m_SenderName;
  109. BSTR m_SenderCompany;
  110. BSTR m_SenderDept;
  111. BSTR m_BillingCode;
  112. BOOL m_DiscountTime;
  113. BSTR m_DisplayName;
  114. DWORD m_Command;
  115. CFaxServer * m_pFaxServer;
  116. };
  117. #endif //__FAXJOBS_H_