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.
 
 

91 lines
5.2 KiB

  1. /* Copyright (C) 2008-2016 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. * THE SOFTWARE.
  20. */
  21. using System;
  22. using System.Diagnostics.CodeAnalysis;
  23. namespace Alphaleonis.Win32.Network
  24. {
  25. /// <summary>Contains information about the shared resource.</summary>
  26. /// <remarks>
  27. /// <para>Minimum supported client: Windows XP [desktop apps only]</para>
  28. /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>
  29. /// </remarks>
  30. [Flags]
  31. public enum ShareResourceTypes
  32. {
  33. /// <summary>No specific resource type used.</summary>
  34. None = 0,
  35. /// <summary>SHI1005_FLAGS_DFS
  36. /// <para>The specified share is present in a DFS tree structure. This flag cannot be set with NetShareSetInfo.</para>
  37. /// </summary>
  38. [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dfs")]
  39. Dfs = 1,
  40. /// <summary>SHI1005_FLAGS_DFS_ROOT
  41. /// <para>The specified share is the root volume in a DFS tree structure. This flag cannot be set with NetShareSetInfo.</para>
  42. /// </summary>
  43. [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dfs")]
  44. DfsRoot = 2,
  45. /// <summary>SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS
  46. /// <para>The specified share disallows exclusive file opens, where reads to an open file are disallowed.</para>
  47. /// </summary>
  48. RestrictExclusiveOpens = 256,
  49. /// <summary>SHI1005_FLAGS_FORCE_SHARED_DELETE
  50. /// <para>Shared files in the specified share can be forcibly deleted.</para>
  51. /// </summary>
  52. ForceSharedDelete = 512,
  53. /// <summary>SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING
  54. /// <para>Clients are allowed to cache the namespace of the specified share.</para>
  55. /// </summary>
  56. AllowNamespaceCaching = 1024,
  57. /// <summary>SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM
  58. /// <para>The server will filter directory entries based on the access permissions that the user on the client computer has for the server on which the files reside.</para>
  59. /// <para>Only files for which the user has read access and directories for which the user has FILE_LIST_DIRECTORY access will be returned. If the user has SeBackupPrivilege, all available information will be returned.</para>
  60. /// </summary>
  61. /// <remarks>This flag is supported only on servers running Windows Server 2003 with SP1 or later.</remarks>
  62. AccessBasedDirectoryEnum = 2048,
  63. /// <summary>SHI1005_FLAGS_FORCE_LEVELII_OPLOCK
  64. /// <para>Prevents exclusive caching modes that can cause delays for highly shared read-only data.</para>
  65. /// </summary>
  66. /// <remarks>This flag is supported only on servers running Windows Server 2008 R2 or later.</remarks>
  67. ForceLevel2OpLock = 4096,
  68. /// <summary>SHI1005_FLAGS_ENABLE_HASH</summary>
  69. /// <para>Enables server-side functionality needed for peer caching support.</para>
  70. /// <para>Clients on high-latency or low-bandwidth connections can use alternate methods to retrieve data from peers if available, instead of sending requests to the server.</para>
  71. /// <para>This is only supported on shares configured for manual caching (CSC_CACHE_MANUAL_REINT).</para>
  72. /// <remarks>This flag is supported only on servers running Windows Server 2008 R2 or later.</remarks>
  73. EnableHash = 8192,
  74. /// <summary>SHI1005_FLAGS_ENABLE_CA (0X4000) - Enables server-side functionality needed for peer caching support. Clients on high-latency or low-bandwidth connections can use alternate methods to retrieve data from peers if available, instead of sending requests to the server. This is only supported on shares configured for manual caching (CSC_CACHE_MANUAL_REINT).</summary>
  75. /// <remarks>Windows 7, Windows Server 2008 R2, Windows Vista, Windows Server 2008, and Windows Server 2003: This flag is not supported.</remarks>
  76. [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Ca")]
  77. [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ca")]
  78. EnableCa = 16384
  79. }
  80. }