spandsp 0.0.6
timezone.h
Go to the documentation of this file.
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * timezone.h - Timezone handling for time interpretation
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2010 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26/*! \file */
27
28#if !defined(_SPANDSP_TIMEZONE_H_)
29#define _SPANDSP_TIMEZONE_H_
30
31/*! \page timezone_page Timezone handling
32
33\section timezone_sec_1 What does it do?
34
35\section timezone_sec_2 How does it work?
36
37*/
38
39typedef struct tz_s tz_t;
40
41enum
42{
43 TM_SUNDAY = 0,
44 TM_MONDAY,
45 TM_TUESDAY,
46 TM_WEDNESDAY,
47 TM_THURSDAY,
48 TM_FRIDAY,
49 TM_SATURDAY
50};
51
52enum
53{
54 TM_JANUARY = 0,
55 TM_FEBRUARY,
56 TM_MARCH,
57 TM_APRIL,
58 TM_MAY,
59 TM_JUNE,
60 TM_JULY,
61 TM_AUGUST,
62 TM_SEPTEMBER,
63 TM_OCTOBER,
64 TM_NOVEMBER,
65 TM_DECEMBER
66};
67
68#if defined(__cplusplus)
69extern "C"
70{
71#endif
72
73SPAN_DECLARE(tz_t *) tz_init(tz_t *tz, const char *tzstring);
74
75SPAN_DECLARE(int) tz_release(tz_t *tz);
76
77SPAN_DECLARE(int) tz_free(tz_t *tz);
78
79SPAN_DECLARE(int) tz_localtime(tz_t *tz, struct tm *tm, time_t t);
80
81SPAN_DECLARE(const char *) tz_tzname(tz_t *tz, int isdst);
82
83#if defined(__cplusplus)
84}
85#endif
86
87#endif
88/*- End of file ------------------------------------------------------------*/
Definition private/timezone.h:82