]> git.proxmox.com Git - rustc.git/blob - src/vendor/winapi/src/um/timezoneapi.rs
New upstream version 1.31.0+dfsg1
[rustc.git] / src / vendor / winapi / src / um / timezoneapi.rs
1 // Copyright © 2015-2017 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 //! ApiSet Contract for api-ms-win-core-timezone-l1
8 use shared::minwindef::{BOOL, DWORD, FILETIME, LPDWORD, LPFILETIME, USHORT};
9 use um::minwinbase::{LPSYSTEMTIME, SYSTEMTIME};
10 use um::winnt::{BOOLEAN, LONG, WCHAR};
11 pub const TIME_ZONE_ID_INVALID: DWORD = 0xFFFFFFFF;
12 STRUCT!{struct TIME_ZONE_INFORMATION {
13 Bias: LONG,
14 StandardName: [WCHAR; 32],
15 StandardDate: SYSTEMTIME,
16 StandardBias: LONG,
17 DaylightName: [WCHAR; 32],
18 DaylightDate: SYSTEMTIME,
19 DaylightBias: LONG,
20 }}
21 pub type PTIME_ZONE_INFORMATION = *mut TIME_ZONE_INFORMATION;
22 pub type LPTIME_ZONE_INFORMATION = *mut TIME_ZONE_INFORMATION;
23 STRUCT!{struct DYNAMIC_TIME_ZONE_INFORMATION {
24 Bias: LONG,
25 StandardName: [WCHAR; 32],
26 StandardDate: SYSTEMTIME,
27 StandardBias: LONG,
28 DaylightName: [WCHAR; 32],
29 DaylightDate: SYSTEMTIME,
30 DaylightBias: LONG,
31 TimeZoneKeyName: [WCHAR; 128],
32 DynamicDaylightTimeDisabled: BOOLEAN,
33 }}
34 pub type PDYNAMIC_TIME_ZONE_INFORMATION = *mut DYNAMIC_TIME_ZONE_INFORMATION;
35 extern "system" {
36 pub fn SystemTimeToTzSpecificLocalTime(
37 lpTimeZoneInformation: *const TIME_ZONE_INFORMATION,
38 lpUniversalTime: *const SYSTEMTIME,
39 lpLocalTime: LPSYSTEMTIME,
40 ) -> BOOL;
41 pub fn TzSpecificLocalTimeToSystemTime(
42 lpTimeZoneInformation: *const TIME_ZONE_INFORMATION,
43 lpLocalTime: *const SYSTEMTIME,
44 lpUniversalTime: LPSYSTEMTIME,
45 ) -> BOOL;
46 pub fn FileTimeToSystemTime(
47 lpFileTime: *const FILETIME,
48 lpSystemTime: LPSYSTEMTIME,
49 ) -> BOOL;
50 pub fn SystemTimeToFileTime(
51 lpSystemTime: *const SYSTEMTIME,
52 lpFileTime: LPFILETIME,
53 ) -> BOOL;
54 pub fn GetTimeZoneInformation(
55 lpTimeZoneInformation: LPTIME_ZONE_INFORMATION,
56 ) -> DWORD;
57 pub fn SetTimeZoneInformation(
58 lpTimeZoneInformation: *const TIME_ZONE_INFORMATION,
59 ) -> BOOL;
60 pub fn SetDynamicTimeZoneInformation(
61 lpTimeZoneInformation: *const DYNAMIC_TIME_ZONE_INFORMATION,
62 ) -> BOOL;
63 pub fn GetDynamicTimeZoneInformation(
64 pTimeZoneInformation: PDYNAMIC_TIME_ZONE_INFORMATION,
65 ) -> DWORD;
66 pub fn GetTimeZoneInformationForYear(
67 wYear: USHORT,
68 pdtzi: PDYNAMIC_TIME_ZONE_INFORMATION,
69 ptzi: LPTIME_ZONE_INFORMATION,
70 ) -> BOOL;
71 pub fn EnumDynamicTimeZoneInformation(
72 dwIndex: DWORD,
73 lpTimeZoneInformation: PDYNAMIC_TIME_ZONE_INFORMATION,
74 ) -> DWORD;
75 pub fn GetDynamicTimeZoneInformationEffectiveYears(
76 lpTimeZoneInformation: PDYNAMIC_TIME_ZONE_INFORMATION,
77 FirstYear: LPDWORD,
78 LastYear: LPDWORD,
79 ) -> DWORD;
80 pub fn SystemTimeToTzSpecificLocalTimeEx(
81 lpTimeZoneInformation: *const DYNAMIC_TIME_ZONE_INFORMATION,
82 lpUniversalTime: *const SYSTEMTIME,
83 lpLocalTime: LPSYSTEMTIME,
84 ) -> BOOL;
85 pub fn TzSpecificLocalTimeToSystemTimeEx(
86 lpTimeZoneInformation: *const DYNAMIC_TIME_ZONE_INFORMATION,
87 lpLocalTime: *const SYSTEMTIME,
88 lpUniversalTime: LPSYSTEMTIME,
89 ) -> BOOL;
90 }