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.

89 lines
2.2 KiB

  1. // Job.h: interface for the CJob class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_JOB_H__0021D6D0_519B_42BA_85C7_8C9E600E408A__INCLUDED_)
  5. #define AFX_JOB_H__0021D6D0_519B_42BA_85C7_8C9E600E408A__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. //
  10. // Possible operations on a job / message
  11. //
  12. enum
  13. {
  14. FAX_JOB_OP_PROPERTIES = 0x0080,
  15. FAX_JOB_OP_ALL = FAX_JOB_OP_VIEW | FAX_JOB_OP_PAUSE |
  16. FAX_JOB_OP_RESUME | FAX_JOB_OP_RESTART |
  17. FAX_JOB_OP_DELETE | FAX_JOB_OP_RECIPIENT_INFO |
  18. FAX_JOB_OP_SENDER_INFO | FAX_JOB_OP_PROPERTIES,
  19. FAX_JOB_OP_NUMBER = 8 // The number of possible operations
  20. };
  21. class CJob : public CFaxMsg
  22. {
  23. public:
  24. DECLARE_DYNCREATE(CJob)
  25. //
  26. // Init / shutdown:
  27. //
  28. CJob () {}
  29. virtual ~CJob() {}
  30. DWORD Init (PFAX_JOB_ENTRY_EX pJob, CServerNode* pServer);
  31. DWORD UpdateStatus (PFAX_JOB_STATUS pStatus);
  32. BOOL IsNewStatus (PFAX_JOB_STATUS pStatus);
  33. DWORD Copy(const CJob& other);
  34. //
  35. // Operations:
  36. //
  37. DWORD GetTiff (CString &cstrTiffLocation) const;
  38. DWORD Pause ()
  39. { return DoJobOperation (FAX_JOB_OP_PAUSE); }
  40. DWORD Resume ()
  41. { return DoJobOperation (FAX_JOB_OP_RESUME); }
  42. DWORD Restart ()
  43. { return DoJobOperation (FAX_JOB_OP_RESTART); }
  44. DWORD Delete ()
  45. { return DoJobOperation (FAX_JOB_OP_DELETE); }
  46. //
  47. // Item retrival:
  48. //
  49. const JobStatusType GetStatus () const;
  50. const CString &GetExtendedStatusString () const
  51. { ASSERT (m_bValid); return m_cstrExtendedStatus; }
  52. const DWORD GetCurrentPage () const
  53. { ASSERT (m_bValid); return m_dwCurrentPage; }
  54. const CFaxTime &GetScheduleTime () const
  55. { ASSERT (m_bValid); return m_tmScheduleTime; }
  56. private:
  57. DWORD DoJobOperation (DWORD dwJobOp);
  58. DWORD m_dwCurrentPage;
  59. CString m_cstrExtendedStatus;
  60. CFaxTime m_tmScheduleTime;
  61. };
  62. #endif // !defined(AFX_JOB_H__0021D6D0_519B_42BA_85C7_8C9E600E408A__INCLUDED_)