spandsp 0.0.6
|
00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * timezone.h - Timezone handling for time interpretation 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2010 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 */ 00025 00026 /*! \file */ 00027 00028 #if !defined(_SPANDSP_TIMEZONE_H_) 00029 #define _SPANDSP_TIMEZONE_H_ 00030 00031 /*! \page timezone_page Timezone handling 00032 00033 \section timezone_sec_1 What does it do? 00034 00035 \section timezone_sec_2 How does it work? 00036 00037 */ 00038 00039 typedef struct tz_s tz_t; 00040 00041 enum 00042 { 00043 TM_SUNDAY = 0, 00044 TM_MONDAY, 00045 TM_TUESDAY, 00046 TM_WEDNESDAY, 00047 TM_THURSDAY, 00048 TM_FRIDAY, 00049 TM_SATURDAY 00050 }; 00051 00052 enum 00053 { 00054 TM_JANUARY = 0, 00055 TM_FEBRUARY, 00056 TM_MARCH, 00057 TM_APRIL, 00058 TM_MAY, 00059 TM_JUNE, 00060 TM_JULY, 00061 TM_AUGUST, 00062 TM_SEPTEMBER, 00063 TM_OCTOBER, 00064 TM_NOVEMBER, 00065 TM_DECEMBER 00066 }; 00067 00068 #if defined(__cplusplus) 00069 extern "C" 00070 { 00071 #endif 00072 00073 SPAN_DECLARE(tz_t *) tz_init(tz_t *tz, const char *tzstring); 00074 00075 SPAN_DECLARE(int) tz_release(tz_t *tz); 00076 00077 SPAN_DECLARE(int) tz_free(tz_t *tz); 00078 00079 SPAN_DECLARE(int) tz_localtime(tz_t *tz, struct tm *tm, time_t t); 00080 00081 SPAN_DECLARE(const char *) tz_tzname(tz_t *tz, int isdst); 00082 00083 #if defined(__cplusplus) 00084 } 00085 #endif 00086 00087 #endif 00088 /*- End of file ------------------------------------------------------------*/