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.

114 lines
2.9 KiB

  1. class CLDAPNamespace;
  2. class CLDAPNamespace : INHERIT_TRACKING,
  3. public CCoreADsObject,
  4. public ISupportErrorInfo,
  5. public IADsContainer,
  6. public IADs,
  7. public IADsOpenDSObject,
  8. public IADsPathnameProvider
  9. {
  10. public:
  11. /* IUnknown methods */
  12. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  13. DECLARE_STD_REFCOUNTING
  14. DECLARE_IDispatch_METHODS
  15. DECLARE_ISupportErrorInfo_METHODS
  16. DECLARE_IADs_METHODS
  17. DECLARE_IADsContainer_METHODS
  18. DECLARE_IADsOpenDSObject_METHODS
  19. CLDAPNamespace::CLDAPNamespace();
  20. CLDAPNamespace::~CLDAPNamespace();
  21. STDMETHOD(ParsePath)(THIS_ BSTR bstrPath, DWORD dwType, PPATH_OBJECTINFO pObjectInfo);
  22. STDMETHOD(ConstructPath)(THIS_ PPATH_OBJECTINFO pObjectInfo, DWORD dwType, DWORD dwFlag, DWORD dwEscapedMode, BSTR *pbstrPath);
  23. static
  24. HRESULT
  25. CLDAPNamespace::CreateNamespace(
  26. BSTR Parent,
  27. BSTR NamespaceName,
  28. CCredentials& Credentials,
  29. DWORD dwObjectState,
  30. REFIID riid,
  31. void **ppvObj
  32. );
  33. static
  34. HRESULT
  35. CLDAPNamespace::SetObjInfoComponents(OBJECTINFO *pObjectInfo,
  36. PATH_OBJECTINFO *pObjectInfoTarget);
  37. static
  38. void
  39. CLDAPNamespace::FreeObjInfoComponents(
  40. PATH_OBJECTINFO *pObjectInfo
  41. );
  42. static
  43. HRESULT
  44. CLDAPNamespace::AllocateNamespaceObject(
  45. CCredentials& Credentials,
  46. CLDAPNamespace ** ppNamespace
  47. );
  48. void
  49. CLDAPNamespace::SetComponent(
  50. LPWSTR szReturn,
  51. DWORD cComponents,
  52. DWORD dwEscaped
  53. );
  54. HRESULT
  55. CLDAPNamespace::SetComponents(
  56. LPWSTR szReturn,
  57. BOOLEAN fIsWindowsPath,
  58. LPWSTR chSeparator,
  59. DWORD dwType,
  60. DWORD dwEscaped
  61. );
  62. STDMETHODIMP
  63. CLDAPNamespace::GetEscapedElement(
  64. LONG lnReserved,
  65. BSTR bstrInStr,
  66. BSTR* pbstrOutStr
  67. );
  68. protected:
  69. VARIANT _vFilter;
  70. CAggregatorDispMgr *_pDispMgr;
  71. CCredentials _Credentials;
  72. PPATH_OBJECTINFO _pObjectInfo; // PathCracker pathinfo
  73. BOOLEAN _fNamingAttribute; // PathCracker naming attribute
  74. };
  75. enum {
  76. ADS_COMPONENT_LEAF,
  77. ADS_COMPONENT_DN,
  78. ADS_COMPONENT_PARENT
  79. };
  80. BOOL NeedsEscaping (WCHAR c);
  81. WCHAR * EscapedVersion (WCHAR c);
  82. HRESULT HelperEscapeRDN (IN BSTR bstrIn,OUT BSTR * pbstrOut);