jabberd2  2.5.0
datetime.h
Go to the documentation of this file.
1 /*
2  * jabberd - Jabber Open Source Server
3  * Copyright (c) 2002-2004 Jeremie Miller, Thomas Muldowney,
4  * Ryan Eatmon, Robert Norris
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA
19  */
20 
28 #ifndef INCL_UTIL_DATETIME_H
29 #define INCL_UTIL_DATETIME_H 1
30 
31 #ifdef HAVE_CONFIG_H
32 # include <config.h>
33 #endif
34 
35 #include <time.h>
36 
37 /* jabberd2 Windows DLL */
38 #ifndef JABBERD2_API
39 # ifdef _WIN32
40 # ifdef JABBERD2_EXPORTS
41 # define JABBERD2_API __declspec(dllexport)
42 # else /* JABBERD2_EXPORTS */
43 # define JABBERD2_API __declspec(dllimport)
44 # endif /* JABBERD2_EXPORTS */
45 # else /* _WIN32 */
46 # define JABBERD2_API extern
47 # endif /* _WIN32 */
48 #endif /* JABBERD2_API */
49 
50 typedef enum {
51  dt_DATE = 1,
52  dt_TIME = 2,
55 } datetime_t;
56 
57 JABBERD2_API time_t datetime_in(char *date);
58 JABBERD2_API void datetime_out(time_t t, datetime_t type, const char *date, int datelen);
59 
60 #endif
datetime_t
Definition: datetime.h:50
#define JABBERD2_API
Definition: datetime.h:46
JABBERD2_API time_t datetime_in(char *date)
Definition: datetime.c:34
JABBERD2_API void datetime_out(time_t t, datetime_t type, const char *date, int datelen)