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.

87 lines
2.0 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1997, Microsoft Corporation
  4. //
  5. // File: csites.hxx
  6. //
  7. // Contents: Class to implement sites
  8. //
  9. // Classes: CSites
  10. //
  11. // Functions:
  12. //
  13. // History: Dec 12, 1997 JHarper created
  14. //
  15. //-----------------------------------------------------------------------------
  16. #ifndef _CSITES_HXX_
  17. #define _CSITES_HXX_
  18. typedef struct _DFSM_SITE_ENTRY {
  19. LIST_ENTRY Link;
  20. LPWSTR ServerName;
  21. ULONG Flags;
  22. DFS_SITELIST_INFO Info;
  23. } DFSM_SITE_ENTRY, *PDFSM_SITE_ENTRY, *LPDFSM_SITE_ENTRY;
  24. #define DFSM_SITE_ENTRY_DELETE_PENDING 0x000000001
  25. class CSites {
  26. public:
  27. CSites(
  28. LPWSTR pwszFileName,
  29. LPDWORD pdwErr);
  30. ~CSites();
  31. VOID AddRef();
  32. VOID Release();
  33. DWORD AddOrUpdateSiteInfo(
  34. LPWSTR pServerName,
  35. ULONG SiteCount,
  36. PDFS_SITENAME_INFO pSites);
  37. PDFSM_SITE_ENTRY LookupSiteInfo(
  38. LPWSTR pServerName);
  39. VOID MarkEntriesForMerge();
  40. VOID SyncPktSiteTable();
  41. private:
  42. DWORD _AllocateSiteInfo(
  43. LPWSTR pServerName,
  44. ULONG SiteCount,
  45. PDFS_SITENAME_INFO pSites,
  46. PDFSM_SITE_ENTRY *ppSiteInfo);
  47. DWORD _ReadSiteTable();
  48. DWORD _WriteSiteTable();
  49. VOID _DumpSiteTable();
  50. BOOLEAN _CompareEntries(
  51. PDFSM_SITE_ENTRY pDfsmInfo1,
  52. PDFSM_SITE_ENTRY pDfsmInfo2);
  53. ULONG _cRef;
  54. BOOLEAN _fDirty;
  55. LPWSTR _pwszFileName;
  56. GUID _SiteTableGuid;
  57. LIST_ENTRY _SiteTableHead;
  58. };
  59. NTSTATUS
  60. DfsSendUpdate(
  61. LPWSTR pServerName,
  62. ULONG SiteCount,
  63. PDFS_SITENAME_INFO pSites);
  64. #endif _CSITES_HXX_