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.

116 lines
2.8 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 __PROPINST_H
  13. #define __PROPINST_H
  14. class SnmpInstanceClassObject : public SnmpClassObject
  15. {
  16. private:
  17. BOOL CheckProperty ( WbemSnmpErrorObject &a_errorObject , WbemSnmpProperty *property ) ;
  18. protected:
  19. public:
  20. SnmpInstanceClassObject ( SnmpResponseEventObject *parentOperation ) ;
  21. SnmpInstanceClassObject ( const SnmpInstanceClassObject & snmpInstanceClassObject ) ;
  22. ~SnmpInstanceClassObject () ;
  23. BOOL Check ( WbemSnmpErrorObject &a_errorObject ) ;
  24. } ;
  25. class SnmpInstanceResponseEventObject : public SnmpResponseEventObject
  26. {
  27. private:
  28. protected:
  29. SnmpSession *session ;
  30. AutoRetrieveOperation *operation ;
  31. IWbemClassObject *classObject ;
  32. IWbemClassObject *instanceObject ;
  33. #if 0
  34. IWbemObjectAccess *instanceAccessObject ;
  35. #endif
  36. SnmpInstanceClassObject snmpObject ;
  37. PartitionSet *m_PartitionSet ;
  38. BOOL SendSnmp ( WbemSnmpErrorObject &a_errorObject ) ;
  39. public:
  40. SnmpInstanceResponseEventObject ( CImpPropProv *provider , IWbemContext *a_Context ) ;
  41. ~SnmpInstanceResponseEventObject () ;
  42. IWbemClassObject *GetClassObject () { return classObject ; }
  43. IWbemClassObject *GetInstanceObject () { return instanceObject ; }
  44. #if 0
  45. IWbemObjectAccess *GetInstanceAccessObject () { return instanceAccessObject ; }
  46. #endif
  47. PartitionSet *GetPartitionSet () { return m_PartitionSet ; }
  48. SnmpClassObject *GetSnmpClassObject () { return & snmpObject ; }
  49. SnmpClassObject *GetSnmpRequestClassObject () { return & snmpObject ; }
  50. virtual void ReceiveRow ( SnmpInstanceClassObject *snmpObject ) = 0 ;
  51. virtual void ReceiveRow ( IWbemClassObject *snmpObject ) {}
  52. } ;
  53. class SnmpInstanceEventObject : public SnmpInstanceResponseEventObject
  54. {
  55. private:
  56. protected:
  57. wchar_t *Class ;
  58. public:
  59. SnmpInstanceEventObject ( CImpPropProv *provider , BSTR Class , IWbemContext *a_Context ) ;
  60. ~SnmpInstanceEventObject () ;
  61. SnmpClassObject *GetSnmpClassObject () { return & snmpObject ; }
  62. BOOL Instantiate ( WbemSnmpErrorObject &a_errorObject ) ;
  63. } ;
  64. class SnmpInstanceAsyncEventObject : public SnmpInstanceEventObject
  65. {
  66. private:
  67. ULONG state ;
  68. IWbemObjectSink *notificationHandler ;
  69. protected:
  70. public:
  71. SnmpInstanceAsyncEventObject ( CImpPropProv *provider , BSTR Class , IWbemObjectSink *notify , IWbemContext *a_Context ) ;
  72. ~SnmpInstanceAsyncEventObject () ;
  73. void Process () ;
  74. void ReceiveRow ( SnmpInstanceClassObject *snmpObject ) ;
  75. void ReceiveRow ( IWbemClassObject *snmpObject ) ;
  76. void ReceiveComplete () ;
  77. } ;
  78. #endif // __PROPINST_H