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.

88 lines
2.5 KiB

  1. //****************************************************************************
  2. //
  3. // Module: ULS.DLL
  4. // File: attribs.h
  5. // Content: This file contains the attributes object definition.
  6. // History:
  7. // Wed 17-Apr-1996 11:18:47 -by- Viroon Touranachun [viroont]
  8. //
  9. // Copyright (c) Microsoft Corporation 1995-1996
  10. //
  11. //****************************************************************************
  12. #ifndef _ATTRIBS_H_
  13. #define _ATTRIBS_H_
  14. //****************************************************************************
  15. // CAttributes definition
  16. //****************************************************************************
  17. //
  18. class CAttributes : public IIlsAttributes
  19. {
  20. friend class CIlsMain;
  21. friend class CIlsUser;
  22. friend class CIlsMeetingPlace;
  23. private:
  24. LONG m_cRef;
  25. ILS_ATTR_TYPE m_AccessType;
  26. ULONG m_cAttrs;
  27. ULONG m_cchNames;
  28. ULONG m_cchValues;
  29. CList m_AttrList;
  30. // Private methods
  31. //
  32. HRESULT InternalSetAttribute ( TCHAR *pszName, TCHAR *pszValue );
  33. HRESULT InternalCheckAttribute ( TCHAR *pszName, BOOL fRemove );
  34. HRESULT InternalSetAttributeName ( TCHAR *pszName );
  35. protected:
  36. VOID SetAccessType ( ILS_ATTR_TYPE AttrType ) { m_AccessType = AttrType; }
  37. public:
  38. // Constructor and destructor
  39. //
  40. CAttributes ( VOID );
  41. ~CAttributes ( VOID );
  42. // For internal use
  43. //
  44. ULONG GetCount ( VOID ) { return m_cAttrs; }
  45. ILS_ATTR_TYPE GetAccessType( void) { return m_AccessType; }
  46. HRESULT GetAttributeList ( TCHAR **ppszList, ULONG *pcList, ULONG *pcb );
  47. HRESULT GetAttributePairs ( TCHAR **ppszPairs, ULONG *pcList, ULONG *pcb );
  48. HRESULT SetAttributePairs( TCHAR *pszPairs, ULONG cPair );
  49. HRESULT SetAttributes ( CAttributes *pAttributes );
  50. HRESULT RemoveAttributes ( CAttributes *pAttributes);
  51. HRESULT CloneNameValueAttrib(CAttributes **ppClone);
  52. // IUnknown
  53. //
  54. STDMETHODIMP QueryInterface (REFIID iid, void **ppv);
  55. STDMETHODIMP_(ULONG) AddRef (void);
  56. STDMETHODIMP_(ULONG) Release (void);
  57. // IIlsAttributes
  58. //
  59. // For ILS_ATTRTYPE_NAME_VALUE
  60. //
  61. STDMETHODIMP SetAttribute (BSTR bstrName, BSTR bstrValue);
  62. STDMETHODIMP GetAttribute (BSTR bstrName, BSTR *pbstrValue);
  63. STDMETHODIMP EnumAttributes (IEnumIlsNames **ppEnumAttribute);
  64. // For ILS_ATTRTYPE_NAME_ONLY
  65. //
  66. STDMETHODIMP SetAttributeName ( BSTR bstrName );
  67. #ifdef DEBUG
  68. // For debugging
  69. //
  70. void DebugOut (void);
  71. #endif // DEBUG
  72. };
  73. #endif //_ATTRIBS_H_