]> git.saurik.com Git - apple/cf.git/blame - CFTimeZone.h
CF-476.18.tar.gz
[apple/cf.git] / CFTimeZone.h
CommitLineData
9ce05555 1/*
bd5b749c 2 * Copyright (c) 2008 Apple Inc. All rights reserved.
9ce05555
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
9ce05555
A
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/* CFTimeZone.h
bd5b749c 24 Copyright (c) 1998-2007, Apple Inc. All rights reserved.
9ce05555
A
25*/
26
27#if !defined(__COREFOUNDATION_CFTIMEZONE__)
28#define __COREFOUNDATION_CFTIMEZONE__ 1
29
30#include <CoreFoundation/CFBase.h>
31#include <CoreFoundation/CFArray.h>
32#include <CoreFoundation/CFData.h>
33#include <CoreFoundation/CFDate.h>
34#include <CoreFoundation/CFDictionary.h>
35#include <CoreFoundation/CFString.h>
36
bd5b749c 37CF_EXTERN_C_BEGIN
9ce05555
A
38
39CF_EXPORT
40CFTypeID CFTimeZoneGetTypeID(void);
41
42CF_EXPORT
43CFTimeZoneRef CFTimeZoneCopySystem(void);
44
45CF_EXPORT
46void CFTimeZoneResetSystem(void);
47
48CF_EXPORT
49CFTimeZoneRef CFTimeZoneCopyDefault(void);
50
51CF_EXPORT
52void CFTimeZoneSetDefault(CFTimeZoneRef tz);
53
54CF_EXPORT
55CFArrayRef CFTimeZoneCopyKnownNames(void);
56
57CF_EXPORT
58CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary(void);
59
60CF_EXPORT
61void CFTimeZoneSetAbbreviationDictionary(CFDictionaryRef dict);
62
63CF_EXPORT
64CFTimeZoneRef CFTimeZoneCreate(CFAllocatorRef allocator, CFStringRef name, CFDataRef data);
65
66CF_EXPORT
67CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT(CFAllocatorRef allocator, CFTimeInterval ti);
68
69CF_EXPORT
70CFTimeZoneRef CFTimeZoneCreateWithName(CFAllocatorRef allocator, CFStringRef name, Boolean tryAbbrev);
71
72CF_EXPORT
73CFStringRef CFTimeZoneGetName(CFTimeZoneRef tz);
74
75CF_EXPORT
76CFDataRef CFTimeZoneGetData(CFTimeZoneRef tz);
77
78CF_EXPORT
79CFTimeInterval CFTimeZoneGetSecondsFromGMT(CFTimeZoneRef tz, CFAbsoluteTime at);
80
81CF_EXPORT
82CFStringRef CFTimeZoneCopyAbbreviation(CFTimeZoneRef tz, CFAbsoluteTime at);
83
84CF_EXPORT
85Boolean CFTimeZoneIsDaylightSavingTime(CFTimeZoneRef tz, CFAbsoluteTime at);
86
bd5b749c
A
87CF_EXPORT
88CFTimeInterval CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz, CFAbsoluteTime at) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
89
90CF_EXPORT
91CFAbsoluteTime CFTimeZoneGetNextDaylightSavingTimeTransition(CFTimeZoneRef tz, CFAbsoluteTime at) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
92
93#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
94enum {
95 kCFTimeZoneNameStyleStandard,
96 kCFTimeZoneNameStyleShortStandard,
97 kCFTimeZoneNameStyleDaylightSaving,
98 kCFTimeZoneNameStyleShortDaylightSaving
99};
100typedef CFIndex CFTimeZoneNameStyle;
101
102CF_EXPORT
103CFStringRef CFTimeZoneCopyLocalizedName(CFTimeZoneRef tz, CFTimeZoneNameStyle style, CFLocaleRef locale) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
9ce05555
A
104#endif
105
bd5b749c
A
106CF_EXPORT
107const CFStringRef kCFTimeZoneSystemTimeZoneDidChangeNotification AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
108
109CF_EXTERN_C_END
110
9ce05555
A
111#endif /* ! __COREFOUNDATION_CFTIMEZONE__ */
112