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.

161 lines
4.5 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. #ifndef _SNMPSMIRClassFactory_H
  13. #define _SNMPSMIRClassFactory_H
  14. /////////////////////////////////////////////////////////////////////////
  15. // This class is the class factory for the interogative and administrative interfaces
  16. class CSMIRGenericClassFactory : public IClassFactory
  17. {
  18. private:
  19. CCriticalSection criticalSection ;
  20. long m_referenceCount ;
  21. public:
  22. CSMIRGenericClassFactory (CLSID m_clsid) ;
  23. virtual ~CSMIRGenericClassFactory ( void ) ;
  24. //IUnknown members
  25. virtual STDMETHODIMP QueryInterface (IN REFIID , OUT LPVOID FAR * )PURE;
  26. STDMETHODIMP_( ULONG ) AddRef (void);
  27. STDMETHODIMP_( ULONG ) Release (void) ;
  28. //IClassFactory members
  29. virtual STDMETHODIMP CreateInstance ( IN LPUNKNOWN , IN REFIID , OUT LPVOID FAR * )PURE;
  30. virtual STDMETHODIMP LockServer (IN BOOL )PURE;
  31. };
  32. class CSMIRClassFactory : public CSMIRGenericClassFactory
  33. {
  34. public:
  35. static LONG objectsInProgress ;
  36. static LONG locksInProgress ;
  37. BOOL bConstructed;
  38. CSMIRClassFactory (CLSID m_clsid);
  39. virtual ~CSMIRClassFactory ( void );
  40. //IUnknown members
  41. STDMETHODIMP QueryInterface (IN REFIID , OUT LPVOID FAR * ) ;
  42. //IClassFactory members
  43. STDMETHODIMP CreateInstance ( IN LPUNKNOWN , IN REFIID , OUT LPVOID FAR * ) ;
  44. STDMETHODIMP LockServer (IN BOOL ) ;
  45. };
  46. /////////////////////////////////////////////////////////////////////////
  47. // These classes are the class factories for the handle interfaces
  48. class CModHandleClassFactory : public CSMIRGenericClassFactory
  49. {
  50. public:
  51. static LONG locksInProgress ;
  52. static LONG objectsInProgress ;
  53. CModHandleClassFactory (CLSID m_clsid) :CSMIRGenericClassFactory(m_clsid){} ;
  54. virtual ~CModHandleClassFactory ( void ){} ;
  55. //IUnknown members
  56. STDMETHODIMP QueryInterface (IN REFIID ,OUT LPVOID FAR * ) ;
  57. //IClassFactory members
  58. STDMETHODIMP CreateInstance (IN LPUNKNOWN ,IN REFIID ,OUT LPVOID FAR * ) ;
  59. STDMETHODIMP LockServer (IN BOOL ) ;
  60. };
  61. class CClassHandleClassFactory : public CSMIRGenericClassFactory
  62. {
  63. public:
  64. static LONG locksInProgress ;
  65. static LONG objectsInProgress ;
  66. CClassHandleClassFactory (CLSID m_clsid) :CSMIRGenericClassFactory(m_clsid){};
  67. virtual ~CClassHandleClassFactory ( void ) {};
  68. //IUnknown members
  69. STDMETHODIMP QueryInterface (IN REFIID ,OUT LPVOID FAR * ) ;
  70. //IClassFactory members
  71. STDMETHODIMP CreateInstance (IN LPUNKNOWN ,IN REFIID ,OUT LPVOID FAR * ) ;
  72. STDMETHODIMP LockServer (IN BOOL ) ;
  73. };
  74. class CGroupHandleClassFactory : public CSMIRGenericClassFactory
  75. {
  76. public:
  77. static LONG locksInProgress ;
  78. static LONG objectsInProgress ;
  79. CGroupHandleClassFactory (CLSID m_clsid) :CSMIRGenericClassFactory(m_clsid){};
  80. virtual ~CGroupHandleClassFactory ( void ) {};
  81. //IUnknown members
  82. STDMETHODIMP QueryInterface (IN REFIID ,OUT LPVOID FAR * ) ;
  83. //IClassFactory members
  84. STDMETHODIMP CreateInstance (IN LPUNKNOWN ,IN REFIID ,OUT LPVOID FAR * ) ;
  85. STDMETHODIMP LockServer (IN BOOL ) ;
  86. };
  87. //****************************NotificationClass stuff*****************
  88. class CNotificationClassHandleClassFactory : public CSMIRGenericClassFactory
  89. {
  90. public:
  91. static LONG locksInProgress ;
  92. static LONG objectsInProgress ;
  93. CNotificationClassHandleClassFactory (CLSID m_clsid) :CSMIRGenericClassFactory(m_clsid){};
  94. virtual ~CNotificationClassHandleClassFactory ( void ) {};
  95. //IUnknown members
  96. STDMETHODIMP QueryInterface (IN REFIID ,OUT LPVOID FAR * ) ;
  97. //IClassFactory members
  98. STDMETHODIMP CreateInstance (IN LPUNKNOWN ,IN REFIID ,OUT LPVOID FAR * ) ;
  99. STDMETHODIMP LockServer (IN BOOL ) ;
  100. };
  101. class CExtNotificationClassHandleClassFactory : public CSMIRGenericClassFactory
  102. {
  103. public:
  104. static LONG locksInProgress ;
  105. static LONG objectsInProgress ;
  106. CExtNotificationClassHandleClassFactory (CLSID m_clsid) :CSMIRGenericClassFactory(m_clsid){};
  107. virtual ~CExtNotificationClassHandleClassFactory ( void ) {};
  108. //IUnknown members
  109. STDMETHODIMP QueryInterface (IN REFIID ,OUT LPVOID FAR * ) ;
  110. //IClassFactory members
  111. STDMETHODIMP CreateInstance (IN LPUNKNOWN ,IN REFIID ,OUT LPVOID FAR * ) ;
  112. STDMETHODIMP LockServer (IN BOOL ) ;
  113. };
  114. #endif // _SNMPSMIRClassFactory_H