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.

72 lines
2.0 KiB

  1. #ifndef __AQADMCLI__
  2. #define __AQADMCLI__
  3. const unsigned MAX_CMD_LEN = 127; // reading command with _cgets
  4. const unsigned MAX_SERVER_NAME = 64;
  5. class CAQAdminCli
  6. {
  7. public:
  8. enum DispFlags
  9. {
  10. DF_NONE = 0x00000000,
  11. DF_LINK = 0x00000001,
  12. DF_QUEUE = 0x00000002,
  13. DF_MSG = 0x00000004
  14. };
  15. private:
  16. IAQAdmin *m_pAdmin;
  17. IVSAQAdmin *m_pVS;
  18. public:
  19. DispFlags m_dwDispFlags;
  20. CCmdInfo *m_pFilterCmd;
  21. CCmdInfo *m_pActionCmd;
  22. BOOL m_fUseMTA;
  23. public:
  24. CAQAdminCli();
  25. ~CAQAdminCli();
  26. void Help();
  27. HRESULT GetQueue(IN IEnumLinkQueues *pQueueEnum, OUT ILinkQueue **ppQueue, IN OUT QUEUE_INFO *pQueueInf);
  28. HRESULT PrintQueueInfo();
  29. HRESULT GetLink(IN IEnumVSAQLinks *pLinkEnum, OUT IVSAQLink **ppLink, IN OUT LINK_INFO *pLinkInf);
  30. HRESULT PrintLinkInfo();
  31. HRESULT GetMsg(IN IAQEnumMessages *pMsgEnum, OUT IAQMessage **ppMsg, IN OUT MESSAGE_INFO *pMsgInf);
  32. HRESULT PrintMsgInfo();
  33. BOOL IsContinue(LPSTR pszTag, LPWSTR pszVal);
  34. inline void PInfo(int nCrt, LINK_INFO linkInf);
  35. inline void PInfo(int nCrt, QUEUE_INFO queueInf);
  36. inline void PInfo(int nCrt, MESSAGE_INFO msgInf);
  37. HRESULT SetMsgEnumFilter(MESSAGE_ENUM_FILTER *pFilter, CCmdInfo *pCmd);
  38. HRESULT SetMsgFilter(MESSAGE_FILTER *pFilter, CCmdInfo *pCmd);
  39. HRESULT SetServer(LPSTR pszServerName, LPSTR pszVSNumber);
  40. HRESULT SetMsgAction(MESSAGE_ACTION *pAction, CCmdInfo *pCmd);
  41. HRESULT ExecuteCmd(CAQAdminCli& Admcli, LPSTR szCmd);
  42. HRESULT UseMTA(BOOL fUseMTA);
  43. HRESULT Init();
  44. HRESULT StopAllLinks();
  45. HRESULT StartAllLinks();
  46. HRESULT GetGlobalLinkState();
  47. HRESULT MessageAction(MESSAGE_FILTER *pFilter, MESSAGE_ACTION action);
  48. void Cleanup();
  49. void FreeStruct(MESSAGE_FILTER *pStruct);
  50. void FreeStruct(LINK_INFO *pStruct);
  51. void FreeStruct(QUEUE_INFO *pStruct);
  52. void FreeStruct(MESSAGE_INFO *pStruct);
  53. BOOL LocalTimeToUTC(SYSTEMTIME *stLocTime, SYSTEMTIME *stUTCTime);
  54. BOOL StringToUTCTime(LPSTR szTime, SYSTEMTIME *pstUTCTime);
  55. };
  56. #endif