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.

74 lines
2.1 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. //
  4. // File: aqstats.h
  5. //
  6. // Description: Header file for CAQStats class
  7. //
  8. // Author: Mike Swafford (MikeSwa)
  9. //
  10. // History:
  11. // 11/3/98 - MikeSwa Created
  12. //
  13. // Copyright (C) 1998 Microsoft Corporation
  14. //
  15. //-----------------------------------------------------------------------------
  16. #ifndef __AQSTATS_H__
  17. #define __AQSTATS_H__
  18. #include "cmt.h"
  19. #include "aqutil.h"
  20. enum NotifyType
  21. {
  22. NotifyTypeUndefined = 0x00000000,
  23. NotifyTypeDestMsgQueue = 0x00000001, //notification sender is a dest queue
  24. NotifyTypeLinkMsgQueue = 0x00000002, //notification sender is a link
  25. NotifyTypeReroute = 0x00000004, //notification sender is a reroute
  26. NotifyTypeNewLink = 0x10000000, //sender is a newly created link
  27. };
  28. class CDestMsgQueue;
  29. class CLinkMsgQueue;
  30. #define AQSTATS_SIG 'tatS'
  31. //---[ CAQStats ]-------------------------------------------------------
  32. //
  33. //
  34. // Hungarian: aqstat, paqstat
  35. //
  36. //
  37. //-----------------------------------------------------------------------------
  38. class CAQStats
  39. {
  40. protected:
  41. DWORD m_dwSignature;
  42. public:
  43. DWORD m_dwNotifyType; //Type of notification being sent
  44. DWORD m_cMsgs; //Total count of msgs
  45. DWORD m_cOtherDomainsMsgSpread; //Count of other domains message
  46. //is queued for
  47. DWORD m_rgcMsgPriorities[NUM_PRIORITIES]; //count per-priority
  48. ULARGE_INTEGER m_uliVolume;
  49. DWORD m_dwHighestPri;
  50. union //notification sender
  51. {
  52. PVOID m_pvContext;
  53. CDestMsgQueue *m_pdmq;
  54. CLinkMsgQueue *m_plmq;
  55. };
  56. DWORD m_cRetryMsgs; // Total count of messages in retry queue
  57. CAQStats();
  58. void Reset();
  59. //Used to provide thread-safe update
  60. void UpdateStats(CAQStats *paqstat, BOOL fAdd);
  61. void UpdateRetryStats(BOOL fAdd);
  62. };
  63. #endif //__AQSTATS_H__