GNUstep CoreBase Library 0.2
CFTimeZone.h
1/* CFTimeZone.c
2
3 Copyright (C) 2011 Free Software Foundation, Inc.
4
5 Written by: Stefan Bidigaray
6 Date: July, 2011
7
8 This file is part of the GNUstep CoreBase Library.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; see the file COPYING.LIB.
22 If not, see <http://www.gnu.org/licenses/> or write to the
23 Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __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/CFLocale.h>
36
37CF_EXTERN_C_BEGIN
38
42CF_EXPORT const CFStringRef kCFTimeZoneSystemTimeZoneDidChangeNotification;
43
44#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
45typedef enum
46{
47 kCFTimeZoneNameStyleStandard,
48 kCFTimeZoneNameStyleShortStandard,
49 kCFTimeZoneNameStyleDaylightSaving,
50 kCFTimeZoneNameStyleShortDaylightSaving
51} CFTimeZoneNameStyle;
52#endif
53
54
55CF_EXPORT CFTimeZoneRef
56CFTimeZoneCreateWithName (CFAllocatorRef alloc, CFStringRef name,
57 Boolean tryAbbrev);
58
59CF_EXPORT CFTimeZoneRef
60CFTimeZoneCreateWithTimeIntervalFromGMT (CFAllocatorRef alloc,
61 CFTimeInterval ti);
62
63CF_EXPORT CFTimeZoneRef
64CFTimeZoneCreate (CFAllocatorRef alloc, CFStringRef name, CFDataRef data);
65
66CF_EXPORT CFDictionaryRef
67CFTimeZoneCopyAbbreviationDictionary (void);
68
69CF_EXPORT CFStringRef
70CFTimeZoneCopyAbbreviation (CFTimeZoneRef tz, CFAbsoluteTime at);
71
72CF_EXPORT CFTimeZoneRef
73CFTimeZoneCopyDefault (void);
74
75CF_EXPORT CFTimeZoneRef
76CFTimeZoneCopySystem (void);
77
78CF_EXPORT void
79CFTimeZoneSetDefault (CFTimeZoneRef tz);
80
81CF_EXPORT CFArrayRef
82CFTimeZoneCopyKnownNames (void);
83
84CF_EXPORT void
85CFTimeZoneResetSystem (void);
86
87CF_EXPORT void
88CFTimeZoneSetAbbreviationDictionary (CFDictionaryRef dict);
89
90CF_EXPORT CFStringRef
91CFTimeZoneGetName (CFTimeZoneRef tz);
92
93CF_EXPORT CFTimeInterval
94CFTimeZoneGetSecondsFromGMT (CFTimeZoneRef tz, CFAbsoluteTime at);
95
96CF_EXPORT CFDataRef
97CFTimeZoneGetData (CFTimeZoneRef tz);
98
99CF_EXPORT Boolean
100CFTimeZoneIsDaylightSavingTime (CFTimeZoneRef tz, CFAbsoluteTime at);
101
102CF_EXPORT CFTypeID
103CFTimeZoneGetTypeID (void);
104
105#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
106CF_EXPORT CFStringRef
107CFTimeZoneCopyLocalizedName (CFTimeZoneRef tz, CFTimeZoneNameStyle style,
108 CFLocaleRef locale);
109
110CF_EXPORT CFTimeInterval
111CFTimeZoneGetDaylightSavingTimeOffset (CFTimeZoneRef tz, CFAbsoluteTime at);
112
113CF_EXPORT CFAbsoluteTime
114CFTimeZoneGetNextDaylightSavingTimeTransition (CFTimeZoneRef tz,
115 CFAbsoluteTime at);
116#endif
119CF_EXTERN_C_END
120
121#endif /* __COREFOUNDATION_CFTIMEZONE__ */
122
const struct __CFAllocator * CFAllocatorRef
A reference to a CFAllocator object.
Definition CFBase.h:301
const struct __CFArray * CFArrayRef
Reference to an immutable array object.
Definition CFArray.h:37