]> git.saurik.com Git - apple/cf.git/blob - CFTimeZone.h
CF-550.13.tar.gz
[apple/cf.git] / CFTimeZone.h
1 /*
2 * Copyright (c) 2009 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-2009, 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_EXTERN_C_BEGIN
39
40 CF_EXPORT
41 CFTypeID CFTimeZoneGetTypeID(void);
42
43 CF_EXPORT
44 CFTimeZoneRef CFTimeZoneCopySystem(void);
45
46 CF_EXPORT
47 void CFTimeZoneResetSystem(void);
48
49 CF_EXPORT
50 CFTimeZoneRef CFTimeZoneCopyDefault(void);
51
52 CF_EXPORT
53 void CFTimeZoneSetDefault(CFTimeZoneRef tz);
54
55 CF_EXPORT
56 CFArrayRef CFTimeZoneCopyKnownNames(void);
57
58 CF_EXPORT
59 CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary(void);
60
61 CF_EXPORT
62 void CFTimeZoneSetAbbreviationDictionary(CFDictionaryRef dict);
63
64 CF_EXPORT
65 CFTimeZoneRef CFTimeZoneCreate(CFAllocatorRef allocator, CFStringRef name, CFDataRef data);
66
67 CF_EXPORT
68 CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT(CFAllocatorRef allocator, CFTimeInterval ti);
69
70 CF_EXPORT
71 CFTimeZoneRef CFTimeZoneCreateWithName(CFAllocatorRef allocator, CFStringRef name, Boolean tryAbbrev);
72
73 CF_EXPORT
74 CFStringRef CFTimeZoneGetName(CFTimeZoneRef tz);
75
76 CF_EXPORT
77 CFDataRef CFTimeZoneGetData(CFTimeZoneRef tz);
78
79 CF_EXPORT
80 CFTimeInterval CFTimeZoneGetSecondsFromGMT(CFTimeZoneRef tz, CFAbsoluteTime at);
81
82 CF_EXPORT
83 CFStringRef CFTimeZoneCopyAbbreviation(CFTimeZoneRef tz, CFAbsoluteTime at);
84
85 CF_EXPORT
86 Boolean CFTimeZoneIsDaylightSavingTime(CFTimeZoneRef tz, CFAbsoluteTime at);
87
88 CF_EXPORT
89 CFTimeInterval CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz, CFAbsoluteTime at) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
90
91 CF_EXPORT
92 CFAbsoluteTime CFTimeZoneGetNextDaylightSavingTimeTransition(CFTimeZoneRef tz, CFAbsoluteTime at) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
93
94 #if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
95 enum {
96 kCFTimeZoneNameStyleStandard,
97 kCFTimeZoneNameStyleShortStandard,
98 kCFTimeZoneNameStyleDaylightSaving,
99 kCFTimeZoneNameStyleShortDaylightSaving,
100 kCFTimeZoneNameStyleGeneric,
101 kCFTimeZoneNameStyleShortGeneric
102 };
103 typedef CFIndex CFTimeZoneNameStyle;
104
105 CF_EXPORT
106 CFStringRef CFTimeZoneCopyLocalizedName(CFTimeZoneRef tz, CFTimeZoneNameStyle style, CFLocaleRef locale) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
107 #endif
108
109 CF_EXPORT
110 const CFStringRef kCFTimeZoneSystemTimeZoneDidChangeNotification AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
111
112 CF_EXTERN_C_END
113
114 #endif /* ! __COREFOUNDATION_CFTIMEZONE__ */
115