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.

86 lines
2.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // sdoattribute.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the class SdoAttribute.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 03/01/1999 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef SDOATTRIBUTE_H
  19. #define SDOATTRIBUTE_H
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif
  23. #include <sdoias.h>
  24. #include "sdoiaspriv.h"
  25. class AttributeDefinition;
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // CLASS
  29. //
  30. // SdoAttribute
  31. //
  32. // DESCRIPTION
  33. //
  34. // Implements the profile attribute SDO.
  35. //
  36. ///////////////////////////////////////////////////////////////////////////////
  37. class SdoAttribute
  38. : public IDispatchImpl< ISdo, &__uuidof(ISdo), &LIBID_SDOIASLib >
  39. {
  40. public:
  41. // Create a new attribute with an empty value.
  42. static HRESULT createInstance(
  43. const AttributeDefinition* definition,
  44. SdoAttribute** newAttr
  45. ) throw ();
  46. //////////
  47. // IUnknown
  48. //////////
  49. STDMETHOD_(ULONG, AddRef)();
  50. STDMETHOD_(ULONG, Release)();
  51. STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject);
  52. //////////
  53. // ISdo
  54. //////////
  55. STDMETHOD(GetPropertyInfo)(LONG Id, IUnknown** ppPropertyInfo);
  56. STDMETHOD(GetProperty)(LONG Id, VARIANT* pValue);
  57. STDMETHOD(PutProperty)(LONG Id, VARIANT* pValue);
  58. STDMETHOD(ResetProperty)(LONG Id);
  59. STDMETHOD(Apply)();
  60. STDMETHOD(Restore)();
  61. STDMETHOD(get__NewEnum)(IUnknown** ppEnumVARIANT);
  62. protected:
  63. SdoAttribute(const AttributeDefinition* definition) throw ();
  64. ~SdoAttribute() throw ();
  65. public:
  66. const AttributeDefinition* def; // Definition for this attribute type.
  67. VARIANT value; // Value of this instance.
  68. private:
  69. LONG refCount; // Reference count.
  70. // Not implemented
  71. SdoAttribute(const SdoAttribute&);
  72. SdoAttribute& operator=(const SdoAttribute&);
  73. };
  74. #endif // SDOATTRIBUTE_H