]> git.saurik.com Git - apple/cf.git/blob - CFTimeZone.h
b042cac921e2b24cc713a7b4be2f264b68defd55
[apple/cf.git] / CFTimeZone.h
1 /*
2 * Copyright (c) 2014 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /* CFTimeZone.h
25 Copyright (c) 1998-2014, Apple Inc. All rights reserved.
26 */
27
28 #if !defined(__COREFOUNDATION_CFTIMEZONE__)
29 #define __COREFOUNDATION_CFTIMEZONE__ 1
30
31 #include <CoreFoundation/CFBase.h>
32 #include <CoreFoundation/CFArray.h>
33 #include <CoreFoundation/CFData.h>
34 #include <CoreFoundation/CFDate.h>
35 #include <CoreFoundation/CFDictionary.h>
36 #include <CoreFoundation/CFString.h>
37
38 CF_IMPLICIT_BRIDGING_ENABLED
39 CF_EXTERN_C_BEGIN
40
41 CF_EXPORT
42 CFTypeID CFTimeZoneGetTypeID(void);
43
44 CF_EXPORT
45 CFTimeZoneRef CFTimeZoneCopySystem(void);
46
47 CF_EXPORT
48 void CFTimeZoneResetSystem(void);
49
50 CF_EXPORT
51 CFTimeZoneRef CFTimeZoneCopyDefault(void);
52
53 CF_EXPORT
54 void CFTimeZoneSetDefault(CFTimeZoneRef tz);
55
56 CF_EXPORT
57 CFArrayRef CFTimeZoneCopyKnownNames(void);
58
59 CF_EXPORT
60 CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary(void);
61
62 CF_EXPORT
63 void CFTimeZoneSetAbbreviationDictionary(CFDictionaryRef dict);
64
65 CF_EXPORT
66 CFTimeZoneRef CFTimeZoneCreate(CFAllocatorRef allocator, CFStringRef name, CFDataRef data);
67
68 CF_EXPORT
69 CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT(CFAllocatorRef allocator, CFTimeInterval ti);
70
71 CF_EXPORT
72 CFTimeZoneRef CFTimeZoneCreateWithName(CFAllocatorRef allocator, CFStringRef name, Boolean tryAbbrev);
73
74 CF_EXPORT
75 CFStringRef CFTimeZoneGetName(CFTimeZoneRef tz);
76
77 CF_EXPORT
78 CFDataRef CFTimeZoneGetData(CFTimeZoneRef tz);
79
80 CF_EXPORT
81 CFTimeInterval CFTimeZoneGetSecondsFromGMT(CFTimeZoneRef tz, CFAbsoluteTime at);
82
83 CF_EXPORT
84 CFStringRef CFTimeZoneCopyAbbreviation(CFTimeZoneRef tz, CFAbsoluteTime at);
85
86 CF_EXPORT
87 Boolean CFTimeZoneIsDaylightSavingTime(CFTimeZoneRef tz, CFAbsoluteTime at);
88
89 CF_EXPORT
90 CFTimeInterval CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz, CFAbsoluteTime at) CF_AVAILABLE(10_5, 2_0);
91
92 CF_EXPORT
93 CFAbsoluteTime CFTimeZoneGetNextDaylightSavingTimeTransition(CFTimeZoneRef tz, CFAbsoluteTime at) CF_AVAILABLE(10_5, 2_0);
94
95 typedef CF_ENUM(CFIndex, CFTimeZoneNameStyle) {
96 kCFTimeZoneNameStyleStandard,
97 kCFTimeZoneNameStyleShortStandard,
98 kCFTimeZoneNameStyleDaylightSaving,
99 kCFTimeZoneNameStyleShortDaylightSaving,
100 kCFTimeZoneNameStyleGeneric,
101 kCFTimeZoneNameStyleShortGeneric
102 } CF_ENUM_AVAILABLE(10_5, 2_0);
103
104 CF_EXPORT
105 CFStringRef CFTimeZoneCopyLocalizedName(CFTimeZoneRef tz, CFTimeZoneNameStyle style, CFLocaleRef locale) CF_AVAILABLE(10_5, 2_0);
106
107 CF_EXPORT
108 const CFStringRef kCFTimeZoneSystemTimeZoneDidChangeNotification CF_AVAILABLE(10_5, 2_0);
109
110 CF_EXTERN_C_END
111 CF_IMPLICIT_BRIDGING_DISABLED
112
113 #endif /* ! __COREFOUNDATION_CFTIMEZONE__ */
114