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