OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / rsyslog / objomsr.h
1 /* Definition of the omsr (omodStringRequest) object.
2  *
3  * Copyright 2007 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
23 #ifndef OBJOMSR_H_INCLUDED
24 #define OBJOMSR_H_INCLUDED
25
26 /* define flags for required template options */
27 #define OMSR_NO_RQD_TPL_OPTS    0
28 #define OMSR_RQD_TPL_OPT_SQL    1
29 /* next option is 2, 4, 8, ... */
30
31 struct omodStringRequest_s {    /* strings requested by output module for doAction() */
32         int iNumEntries;        /* number of array entries for data elements below */
33         uchar **ppTplName;      /* pointer to array of template names */
34         int *piTplOpts;/* pointer to array of check-options when pulling template */
35 };
36 typedef struct omodStringRequest_s omodStringRequest_t;
37
38 /* prototypes */
39 rsRetVal OMSRdestruct(omodStringRequest_t *pThis);
40 rsRetVal OMSRconstruct(omodStringRequest_t **ppThis, int iNumEntries);
41 rsRetVal OMSRsetEntry(omodStringRequest_t *pThis, int iEntry, uchar *pTplName, int iTplOpts);
42 int OMSRgetEntryCount(omodStringRequest_t *pThis);
43 int OMSRgetEntry(omodStringRequest_t *pThis, int iEntry, uchar **ppTplName, int *piTplOpts);
44
45 #endif /* #ifndef OBJOMSR_H_INCLUDED */