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.

60 lines
1.1 KiB

  1. //***************************************************************************
  2. //
  3. // File:
  4. //
  5. // Module: MS SNMP Provider
  6. //
  7. // Purpose:
  8. //
  9. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. /*--------------------------------------------------
  13. Filename: opreg.hpp
  14. Author: B.Rajeev
  15. Purpose: Provides declarations for the OperationRegistry class
  16. --------------------------------------------------*/
  17. #ifndef __OPERATION_REGISTRY__
  18. #define __OPERATION_REGISTRY__
  19. #include "common.h"
  20. #include "forward.h"
  21. // stores the registered SnmpOperation instances and keeps a count of them
  22. class OperationRegistry
  23. {
  24. typedef CMap<SnmpOperation *, SnmpOperation *, void *, void *> Store;
  25. Store store;
  26. UINT num_registered;
  27. public:
  28. OperationRegistry();
  29. void Register(IN SnmpOperation &operation);
  30. void Deregister(IN SnmpOperation &operation);
  31. UINT GetNumRegistered()
  32. {
  33. return num_registered;
  34. }
  35. ~OperationRegistry();
  36. };
  37. #endif // __OPERATION_REGISTRY__