1.1.2
by Michael Biebl
Import upstream version 3.14.2 |
1 |
/* The datetime object. Contains time-related functions.
|
2 |
*
|
|
3 |
* Copyright 2008 Rainer Gerhards and Adiscon GmbH.
|
|
4 |
*
|
|
5 |
* This file is part of rsyslog.
|
|
6 |
*
|
|
7 |
* Rsyslog is free software: you can redistribute it and/or modify
|
|
8 |
* it under the terms of the GNU General Public License as published by
|
|
9 |
* the Free Software Foundation, either version 3 of the License, or
|
|
10 |
* (at your option) any later version.
|
|
11 |
*
|
|
12 |
* Rsyslog is distributed in the hope that it will be useful,
|
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 |
* GNU General Public License for more details.
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License
|
|
18 |
* along with Rsyslog. If not, see <http://www.gnu.org/licenses/>.
|
|
19 |
*
|
|
20 |
* A copy of the GPL can be found in the file "COPYING" in this distribution.
|
|
21 |
*/
|
|
22 |
#ifndef INCLUDED_DATETIME_H
|
|
23 |
#define INCLUDED_DATETIME_H
|
|
24 |
||
25 |
#include "datetime.h" |
|
26 |
||
27 |
/* TODO: define error codes */
|
|
28 |
#define NO_ERRCODE -1
|
|
29 |
||
30 |
/* the datetime object */
|
|
31 |
typedef struct datetime_s { |
|
32 |
} datetime_t; |
|
33 |
||
34 |
||
35 |
/* interfaces */
|
|
36 |
BEGINinterface(datetime) /* name must also be changed in ENDinterface macro! */ |
|
37 |
void (*getCurrTime)(struct syslogTime *t); |
|
38 |
//static int srSLMGParseInt32(char** ppsz);
|
|
39 |
int (*ParseTIMESTAMP3339)(struct syslogTime *pTime, char** ppszTS); |
|
1.2.2
by Michael Biebl
Import upstream version 3.18.5 |
40 |
int (*ParseTIMESTAMP3164)(struct syslogTime *pTime, char** pszTS); |
1.1.2
by Michael Biebl
Import upstream version 3.14.2 |
41 |
int (*formatTimestampToMySQL)(struct syslogTime *ts, char* pDst, size_t iLenDst); |
42 |
int (*formatTimestampToPgSQL)(struct syslogTime *ts, char *pDst, size_t iLenDst); |
|
43 |
int (*formatTimestamp3339)(struct syslogTime *ts, char* pBuf, size_t iLenBuf); |
|
44 |
int (*formatTimestamp3164)(struct syslogTime *ts, char* pBuf, size_t iLenBuf); |
|
45 |
ENDinterface(datetime) |
|
1.2.2
by Michael Biebl
Import upstream version 3.18.5 |
46 |
#define datetimeCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */ |
47 |
/* interface changes:
|
|
48 |
* 1 - initial version
|
|
49 |
* 2 - not compatible to 1 - bugfix required ParseTIMESTAMP3164 to accept char ** as
|
|
50 |
* last parameter. Did not try to remain compatible as this is not something any
|
|
51 |
* third-party module should call. -- rgerhards, 2008.-09-12
|
|
52 |
*/
|
|
1.1.2
by Michael Biebl
Import upstream version 3.14.2 |
53 |
|
54 |
/* prototypes */
|
|
55 |
PROTOTYPEObj(datetime); |
|
56 |
||
57 |
#endif /* #ifndef INCLUDED_DATETIME_H */ |