Source code of Windows XP (NT5)
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.

105 lines
2.5 KiB

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