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.

90 lines
2.6 KiB

  1. /* ----------------------------------------------------------------------
  2. Module: ULS.DLL (Service Provider)
  3. File: spanyatt.h
  4. Content: This file contains the arbitrary-attribute object definition.
  5. History:
  6. 10/15/96 Chu, Lon-Chan [lonchanc]
  7. Created.
  8. Copyright (c) Microsoft Corporation 1996-1997
  9. ---------------------------------------------------------------------- */
  10. #ifndef _ULS_SP_ANYATTR_H_
  11. #define _ULS_SP_ANYATTR_H_
  12. #include <pshpack8.h>
  13. // this structure is used to remember which arbitrary attributes
  14. // have been created at the server side.
  15. // in isbu server implementation, all the applications' and
  16. // protocols' arbitrary attributes are under RTPerson; therefore,
  17. // it is important to clean up arbitrary attributes propertly.
  18. typedef struct tagAnyAttr
  19. {
  20. struct tagAnyAttr *prev;
  21. struct tagAnyAttr *next;
  22. LONG mod_op; // used in temp list only
  23. TCHAR *pszAttrName;
  24. // followed by attr name
  25. }
  26. ANY_ATTR;
  27. class UlsLdap_CAnyAttrs
  28. {
  29. friend class UlsLdap_CLocalApp;
  30. friend class UlsLdap_CLocalProt;
  31. public:
  32. UlsLdap_CAnyAttrs ( VOID );
  33. ~UlsLdap_CAnyAttrs ( VOID );
  34. protected:
  35. HRESULT SetAnyAttrs ( ULONG *puRespID, ULONG *puMsgID, ULONG uNotifyMsg,
  36. ULONG cPrefix, TCHAR *pszPrefix,
  37. ULONG cAttrs, TCHAR *pszAttrs,
  38. LONG ModOp, SERVER_INFO *pServerInfo, TCHAR *pszDN );
  39. HRESULT RemoveAnyAttrs ( ULONG *puRespID, ULONG *puMsgID, ULONG uNotifyMsg,
  40. ULONG cPrefix, TCHAR *pszPrefix,
  41. ULONG cAttrs, TCHAR *pszAttrs,
  42. SERVER_INFO *pServerInfo, TCHAR *pszDN );
  43. HRESULT RemoveAllAnyAttrs ( ULONG *puMsgID, ULONG cPrefix, TCHAR *pszPrefix,
  44. SERVER_INFO *pServerInfo, TCHAR *pszDN );
  45. ULONG GetAnyAttrsCount ( VOID ) { return m_cAttrs; }
  46. private:
  47. HRESULT RemoveAnyAttrsEx ( ULONG *puRespID, ULONG *puMsgID, ULONG uNotifyMsg,
  48. ULONG cPrefix, TCHAR *pszPrefix,
  49. ULONG cAttrs, TCHAR *pszAttrs,
  50. SERVER_INFO *pServerInfo, TCHAR *pszDN );
  51. HRESULT SetAttrsAux ( ULONG cAttrs, TCHAR *pszAttrs,
  52. ULONG cPrefix, TCHAR *pszPrefix, LONG ModOp,
  53. LDAPMod ***pppMod );
  54. HRESULT RemoveAttrsAux ( ULONG cAttrs, TCHAR *pszAttrs,
  55. ULONG cPrefix, TCHAR *pszPrefix,
  56. LDAPMod ***pppMod );
  57. VOID RemoveAttrFromList ( TCHAR *pszAttrName );
  58. VOID FreeAttrList ( ANY_ATTR *AttrList );
  59. ANY_ATTR *LocateAttr ( TCHAR *pszAttrName );
  60. ULONG m_cAttrs;
  61. ANY_ATTR *m_AttrList;
  62. };
  63. const TCHAR *SkipAnyAttrNamePrefix ( const TCHAR *pszAttrName );
  64. const TCHAR *IsAnyAttrName ( const TCHAR *pszAttrName );
  65. TCHAR *PrefixNameValueArray ( BOOL fPair, ULONG cAttrs, const TCHAR *pszAttrs );
  66. #include <poppack.h>
  67. #endif // _ULS_SP_ANYATTR_H_