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.

215 lines
6.2 KiB

  1. // FaxMsg.h: interface for the CFaxMsg class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_FAXMSG_H__3B753848_4860_4DC5_AC1E_F3514CE4E839__INCLUDED_)
  5. #define AFX_FAXMSG_H__3B753848_4860_4DC5_AC1E_F3514CE4E839__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. //
  10. // Enumeration of all job types:
  11. //
  12. typedef enum
  13. {
  14. JOB_STAT_PENDING,
  15. JOB_STAT_INPROGRESS,
  16. JOB_STAT_DELETING,
  17. JOB_STAT_PAUSED,
  18. JOB_STAT_RETRYING,
  19. JOB_STAT_RETRIES_EXCEEDED,
  20. JOB_STAT_COMPLETED,
  21. JOB_STAT_CANCELED,
  22. JOB_STAT_CANCELING,
  23. JOB_STAT_ROUTING,
  24. JOB_STAT_ROUTING_RETRY,
  25. JOB_STAT_ROUTING_INPROGRESS,
  26. JOB_STAT_ROUTING_FAILED,
  27. NUM_JOB_STATUS
  28. } JobStatusType;
  29. class CFaxMsg : public CObject
  30. {
  31. public:
  32. CFaxMsg() :
  33. m_pServer(NULL),
  34. m_bValid (FALSE),
  35. m_dwValidityMask(0),
  36. m_dwPossibleOperations(0)
  37. {}
  38. virtual ~CFaxMsg() {}
  39. CServerNode* GetServer() const
  40. { ASSERT (m_bValid); return m_pServer; }
  41. //
  42. // Operation query:
  43. //
  44. DWORD GetPossibleOperations () const
  45. { ASSERT (m_bValid); return m_dwPossibleOperations; }
  46. const DWORD GetValidityMask() const
  47. { ASSERT (m_bValid); return m_dwValidityMask; }
  48. //
  49. // Item retrival:
  50. //
  51. const DWORDLONG GetId () const
  52. { ASSERT (m_bValid); return m_dwlMessageId; }
  53. const DWORDLONG GetBroadcastId () const
  54. { ASSERT (m_bValid); return m_dwlBroadcastId; }
  55. const CString &GetServerName () const
  56. { ASSERT (m_bValid); return m_cstrServerName; }
  57. const DWORD GetExtendedStatus () const
  58. { ASSERT (m_bValid); return m_dwExtendedStatus; }
  59. const CString &GetCSID () const
  60. { ASSERT (m_bValid); return m_cstrCsid; }
  61. const CString &GetTSID () const
  62. { ASSERT (m_bValid); return m_cstrTsid; }
  63. const DWORD GetSize () const
  64. { ASSERT (m_bValid); return m_dwSize; }
  65. const CString &GetDevice () const
  66. { ASSERT (m_bValid); return m_cstrDeviceName; }
  67. const DWORD GetRetries () const
  68. { ASSERT (m_bValid); return m_dwRetries; }
  69. const CString &GetCallerId () const
  70. { ASSERT (m_bValid); return m_cstrCallerID; }
  71. const CString &GetRoutingInfo () const
  72. { ASSERT (m_bValid); return m_cstrRoutingInfo; }
  73. const CString &GetDocName () const
  74. { ASSERT (m_bValid); return m_cstrDocumentName; }
  75. const CString &GetSubject () const
  76. { ASSERT (m_bValid); return m_cstrSubject; }
  77. const CString &GetRecipientName () const
  78. { ASSERT (m_bValid); return m_cstrRecipientName; }
  79. const CString &GetRecipientNumber () const
  80. { ASSERT (m_bValid); return m_cstrRecipientNumber; }
  81. const CString &GetUser () const
  82. { ASSERT (m_bValid); return m_cstrSenderUserName; }
  83. const CString &GetBilling () const
  84. { ASSERT (m_bValid); return m_cstrBillingCode; }
  85. const DWORD GetType () const
  86. { ASSERT (m_bValid); return m_dwJobType; }
  87. const CFaxTime &GetOrigTime () const
  88. { ASSERT (m_bValid); return m_tmOriginalScheduleTime;}
  89. const CFaxTime &GetSubmissionTime () const
  90. { ASSERT (m_bValid); return m_tmSubmissionTime; }
  91. const CFaxTime &GetTransmissionStartTime () const
  92. { ASSERT (m_bValid); return m_tmTransmissionStartTime; }
  93. const CFaxTime &GetTransmissionEndTime () const
  94. { ASSERT(m_bValid); return m_tmTransmissionEndTime;}
  95. const DWORD GetNumPages () const
  96. { ASSERT (m_bValid); return m_dwPageCount; }
  97. const FAX_ENUM_PRIORITY_TYPE GetPriority () const
  98. { ASSERT (m_bValid); return m_Priority; }
  99. virtual DWORD GetTiff (CString &cstrTiffLocation) const=0;
  100. virtual DWORD Delete ()=0;
  101. //
  102. // Message specific
  103. //
  104. virtual const CString &GetSenderName () const
  105. { ASSERT(FALSE); return *((CString*)NULL);}
  106. virtual const CString &GetSenderNumber () const
  107. { ASSERT(FALSE); return *((CString*)NULL);}
  108. virtual const CFaxDuration &GetTransmissionDuration () const
  109. { ASSERT(FALSE); return *((CFaxDuration*)NULL);}
  110. //
  111. // Job specific
  112. //
  113. virtual DWORD Pause ()
  114. { ASSERT(FALSE); return 0;}
  115. virtual DWORD Resume ()
  116. { ASSERT(FALSE); return 0;}
  117. virtual DWORD Restart()
  118. { ASSERT(FALSE); return 0;}
  119. virtual const JobStatusType GetStatus() const
  120. { ASSERT(FALSE); return JOB_STAT_COMPLETED;}
  121. virtual const CString &GetExtendedStatusString() const
  122. { ASSERT(FALSE); return *((CString*)NULL);}
  123. virtual const DWORD GetCurrentPage () const
  124. { ASSERT(FALSE); return 0;}
  125. virtual const CFaxTime &GetScheduleTime () const
  126. { ASSERT(FALSE); return *((CFaxTime*)NULL);}
  127. protected:
  128. CServerNode* m_pServer;
  129. BOOL m_bValid;
  130. DWORDLONG m_dwlMessageId;
  131. DWORDLONG m_dwlBroadcastId;
  132. DWORD m_dwPossibleOperations;
  133. DWORD m_dwValidityMask;
  134. DWORD m_dwJobOnlyValidityMask; // Validity mask (not status)
  135. DWORD m_dwJobID;
  136. DWORD m_dwJobType;
  137. DWORD m_dwQueueStatus;
  138. DWORD m_dwExtendedStatus;
  139. DWORD m_dwSize;
  140. DWORD m_dwPageCount;
  141. DWORD m_dwDeviceID;
  142. DWORD m_dwRetries;
  143. CString m_cstrRecipientNumber;
  144. CString m_cstrRecipientName;
  145. CString m_cstrSenderUserName;
  146. CString m_cstrBillingCode;
  147. CString m_cstrDocumentName;
  148. CString m_cstrSubject;
  149. CString m_cstrTsid;
  150. CString m_cstrCsid;
  151. CString m_cstrDeviceName;
  152. CString m_cstrCallerID;
  153. CString m_cstrRoutingInfo;
  154. CString m_cstrServerName;
  155. CFaxTime m_tmOriginalScheduleTime;
  156. CFaxTime m_tmSubmissionTime;
  157. CFaxTime m_tmTransmissionStartTime;
  158. CFaxTime m_tmTransmissionEndTime;
  159. FAX_ENUM_PRIORITY_TYPE m_Priority;
  160. };
  161. #endif // !defined(AFX_FAXMSG_H__3B753848_4860_4DC5_AC1E_F3514CE4E839__INCLUDED_)