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.

144 lines
3.2 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 __PROPSET_H
  13. #define __PROPSET_H
  14. class SnmpSetClassObject : public SnmpClassObject
  15. {
  16. private:
  17. BOOL m_RowStatusSpecified ;
  18. BOOL m_RowStatusPresent ;
  19. wchar_t **m_WritableSet ;
  20. ULONG m_WritableSetCount ;
  21. BOOL CheckProperty ( WbemSnmpErrorObject &a_errorObject , WbemSnmpProperty *property ) ;
  22. protected:
  23. public:
  24. SnmpSetClassObject ( SnmpResponseEventObject *parentOperation ) ;
  25. ~SnmpSetClassObject () ;
  26. BOOL Check ( WbemSnmpErrorObject &a_errorObject ) ;
  27. BOOL RowStatusSpecified () { return m_RowStatusSpecified ; }
  28. BOOL RowStatusPresent () { return m_RowStatusPresent ; }
  29. ULONG NumberOfWritable () ;
  30. BOOL IsWritable ( WbemSnmpProperty *a_Property ) ;
  31. void SetWritableSet (
  32. wchar_t **a_WritableSet ,
  33. ULONG a_WritableSetCount
  34. ) ;
  35. } ;
  36. class SnmpSetResponseEventObject : public SnmpResponseEventObject
  37. {
  38. private:
  39. protected:
  40. /*
  41. * State variables for event based processing.
  42. */
  43. ULONG state ;
  44. ULONG m_VarBindsLeftBeforeTooBig ;
  45. BOOL m_SnmpTooBig ;
  46. long m_lflags ;
  47. IWbemClassObject *classObject ;
  48. SnmpSetClassObject snmpObject ;
  49. BOOL processComplete ;
  50. SnmpSession *session ;
  51. SetOperation *operation ;
  52. SetQueryOperation *m_QueryOperation ;
  53. BOOL SendSnmp ( WbemSnmpErrorObject &a_errorObject , const ULONG &a_NumberToSend = 0xffffffff ) ;
  54. public:
  55. SnmpSetResponseEventObject ( CImpPropProv *provider , IWbemClassObject *classObject , IWbemContext *a_Context , long lflags ) ;
  56. ~SnmpSetResponseEventObject () ;
  57. SnmpClassObject *GetSnmpClassObject () { return & snmpObject ; }
  58. IWbemClassObject *GetClassObject () { return classObject ; }
  59. } ;
  60. class SnmpUpdateEventObject : public SnmpSetResponseEventObject
  61. {
  62. private:
  63. protected:
  64. BOOL Create_Only () ;
  65. BOOL Update_Only () ;
  66. BOOL Create_Or_Update () ;
  67. BOOL Send_Variable_Binding_List (
  68. SnmpSetClassObject &a_SnmpSetClassObject ,
  69. ULONG a_NumberToSend
  70. ) ;
  71. BOOL Send_Variable_Binding_List (
  72. SnmpSetClassObject &a_SnmpSetClassObject ,
  73. ULONG a_NumberToSend ,
  74. SnmpRowStatusType :: SnmpRowStatusEnum a_SnmpRowStatusEnum
  75. ) ;
  76. BOOL CheckForRowExistence ( WbemSnmpErrorObject &a_ErrorObject ) ;
  77. BOOL HandleSnmpVersion ( WbemSnmpErrorObject &a_ErrorObject ) ;
  78. BOOL Update ( WbemSnmpErrorObject &a_errorObject ) ;
  79. public:
  80. SnmpUpdateEventObject ( CImpPropProv *provider , IWbemClassObject *classObject , IWbemContext *a_Context , long lflags ) ;
  81. ~SnmpUpdateEventObject () ;
  82. } ;
  83. class SnmpUpdateAsyncEventObject : public SnmpUpdateEventObject
  84. {
  85. private:
  86. IWbemObjectSink *notificationHandler ;
  87. protected:
  88. void SetComplete () ;
  89. public:
  90. SnmpUpdateAsyncEventObject ( CImpPropProv *provider , IWbemClassObject *classObject , IWbemObjectSink *notify , IWbemContext *a_Context , long lflags ) ;
  91. ~SnmpUpdateAsyncEventObject () ;
  92. void Process () ;
  93. void ReceiveComplete () ;
  94. void SnmpTooBig () ;
  95. } ;
  96. #endif // __PROPSET_H