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.

119 lines
3.6 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 __PROPSNMP_H
  13. #define __PROPSNMP_H
  14. class SnmpV1OverIp ;
  15. class GetOperation ;
  16. class SetOperation ;
  17. class RefreshOperation ;
  18. class SetQueryOperation ;
  19. class AutoRetrieveOperation ;
  20. class SnmpResponseEventObject ;
  21. #define SYTEM_PROPERTY_START_CHARACTER L'_'
  22. class SnmpClassObject : public WbemSnmpClassObject
  23. {
  24. private:
  25. protected:
  26. BOOL m_accessible ;
  27. ULONG snmpVersion ;
  28. SnmpResponseEventObject *m_parentOperation ;
  29. public:
  30. SnmpClassObject ( SnmpResponseEventObject *parentOperation ) ;
  31. SnmpClassObject ( const SnmpClassObject &a_SnmpClassObject ) ;
  32. ~SnmpClassObject () ;
  33. ULONG GetSnmpVersion () { return snmpVersion ; }
  34. } ;
  35. class SnmpGetClassObject : public SnmpClassObject
  36. {
  37. private:
  38. BOOL CheckProperty ( WbemSnmpErrorObject &a_errorObject , WbemSnmpProperty *property ) ;
  39. protected:
  40. public:
  41. SnmpGetClassObject ( SnmpResponseEventObject *m_parentOperation ) ;
  42. ~SnmpGetClassObject () ;
  43. BOOL Check ( WbemSnmpErrorObject &a_errorObject ) ;
  44. } ;
  45. class SnmpResponseEventObject : public SnmpTaskObject
  46. {
  47. private:
  48. LONG m_ReferenceCount ;
  49. protected:
  50. //HRESULT completionCode ;
  51. WbemSnmpErrorObject m_errorObject ;
  52. CImpPropProv *provider ;
  53. IWbemClassObject *m_namespaceObject ;
  54. IWbemContext *m_Context ;
  55. ULONG m_agentVersion ;
  56. BOOL GetNamespaceObject ( WbemSnmpErrorObject &a_errorObject ) ;
  57. BOOL GetAgentTransport ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , wchar_t *&agentTransport ) ;
  58. BOOL GetAgentAddress ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , wchar_t *&agentAddress ) ;
  59. BOOL GetAgentReadCommunityName ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , wchar_t *&agentReadCommunityName ) ;
  60. BOOL GetAgentWriteCommunityName ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , wchar_t *&agentReadCommunityName ) ;
  61. BOOL GetAgentRetryCount ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , ULONG &agentRetryCount ) ;
  62. BOOL GetAgentRetryTimeout( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , ULONG &agentRetryTimeout ) ;
  63. BOOL GetAgentMaxVarBindsPerPdu ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , ULONG &agentVarBindsPerPdu ) ;
  64. BOOL GetAgentFlowControlWindowSize ( WbemSnmpErrorObject &a_errorObject , IWbemQualifierSet *classQualifierObject , ULONG &agentFlowControlWindowSize ) ;
  65. BOOL GetNotifyStatusObject ( IWbemClassObject **notifyObject ) ;
  66. BOOL GetSnmpNotifyStatusObject ( IWbemClassObject **notifyObject ) ;
  67. BOOL HasNonNullKeys ( IWbemClassObject *a_Obj ) ;
  68. public:
  69. SnmpResponseEventObject ( CImpPropProv *provider , IWbemContext *a_Context ) ;
  70. ~SnmpResponseEventObject () ;
  71. //HRESULT GetCompletionCode () { return completionCode ; }
  72. WbemSnmpErrorObject &GetErrorObject () { return m_errorObject ; }
  73. ULONG SetAgentVersion ( WbemSnmpErrorObject &a_errorObject ) ;
  74. virtual SnmpClassObject *GetSnmpClassObject () = 0 ;
  75. virtual SnmpClassObject *GetSnmpRequestClassObject () { return NULL ; }
  76. virtual void ReceiveComplete () = 0 ;
  77. virtual void SnmpTooBig () {} ;
  78. ULONG AddRef () ;
  79. ULONG Release () ;
  80. } ;
  81. #endif