access_rights.hpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // access_rights.hpp --------------------------------------------------------------//
  2. // Copyright 2016 Andrey Semashev
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See http://www.boost.org/LICENSE_1_0.txt
  5. #ifndef BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
  6. #define BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
  7. #include <boost/detail/winapi/basic_types.hpp>
  8. #ifdef BOOST_HAS_PRAGMA_ONCE
  9. #pragma once
  10. #endif
  11. namespace boost {
  12. namespace detail {
  13. namespace winapi {
  14. #if defined( BOOST_USE_WINDOWS_H )
  15. const DWORD_ DELETE_ = DELETE;
  16. const DWORD_ READ_CONTROL_ = READ_CONTROL;
  17. const DWORD_ WRITE_DAC_ = WRITE_DAC;
  18. const DWORD_ WRITE_OWNER_ = WRITE_OWNER;
  19. const DWORD_ SYNCHRONIZE_ = SYNCHRONIZE;
  20. const DWORD_ STANDARD_RIGHTS_ALL_ = STANDARD_RIGHTS_ALL;
  21. const DWORD_ STANDARD_RIGHTS_EXECUTE_ = STANDARD_RIGHTS_EXECUTE;
  22. const DWORD_ STANDARD_RIGHTS_READ_ = STANDARD_RIGHTS_READ;
  23. const DWORD_ STANDARD_RIGHTS_REQUIRED_ = STANDARD_RIGHTS_REQUIRED;
  24. const DWORD_ STANDARD_RIGHTS_WRITE_ = STANDARD_RIGHTS_WRITE;
  25. const DWORD_ SPECIFIC_RIGHTS_ALL_ = SPECIFIC_RIGHTS_ALL;
  26. const DWORD_ ACCESS_SYSTEM_SECURITY_ = ACCESS_SYSTEM_SECURITY;
  27. const DWORD_ MAXIMUM_ALLOWED_ = MAXIMUM_ALLOWED;
  28. const DWORD_ GENERIC_ALL_ = GENERIC_ALL;
  29. const DWORD_ GENERIC_EXECUTE_ = GENERIC_EXECUTE;
  30. const DWORD_ GENERIC_WRITE_ = GENERIC_WRITE;
  31. const DWORD_ GENERIC_READ_ = GENERIC_READ;
  32. typedef ::ACCESS_MASK ACCESS_MASK_;
  33. typedef ::PACCESS_MASK PACCESS_MASK_;
  34. #else // defined( BOOST_USE_WINDOWS_H )
  35. const DWORD_ DELETE_ = 0x00010000;
  36. const DWORD_ READ_CONTROL_ = 0x00020000;
  37. const DWORD_ WRITE_DAC_ = 0x00040000;
  38. const DWORD_ WRITE_OWNER_ = 0x00080000;
  39. const DWORD_ SYNCHRONIZE_ = 0x00100000;
  40. const DWORD_ STANDARD_RIGHTS_ALL_ = 0x001F0000;
  41. const DWORD_ STANDARD_RIGHTS_EXECUTE_ = READ_CONTROL_;
  42. const DWORD_ STANDARD_RIGHTS_READ_ = READ_CONTROL_;
  43. const DWORD_ STANDARD_RIGHTS_REQUIRED_ = 0x000F0000;
  44. const DWORD_ STANDARD_RIGHTS_WRITE_ = READ_CONTROL_;
  45. const DWORD_ SPECIFIC_RIGHTS_ALL_ = 0x0000FFFF;
  46. const DWORD_ ACCESS_SYSTEM_SECURITY_ = 0x01000000;
  47. const DWORD_ MAXIMUM_ALLOWED_ = 0x02000000;
  48. const DWORD_ GENERIC_ALL_ = 0x10000000;
  49. const DWORD_ GENERIC_EXECUTE_ = 0x20000000;
  50. const DWORD_ GENERIC_WRITE_ = 0x40000000;
  51. const DWORD_ GENERIC_READ_ = 0x80000000;
  52. typedef DWORD_ ACCESS_MASK_;
  53. typedef ACCESS_MASK_* PACCESS_MASK_;
  54. #endif // defined( BOOST_USE_WINDOWS_H )
  55. }
  56. }
  57. }
  58. #endif // BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP