summaryrefslogtreecommitdiffstats
path: root/sysvar.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-25 14:44:16 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-25 14:44:16 +0000
commitd03bf9c18cd0a150490eb375bd22d99d52b4832f (patch)
treee625d65af141ea96dee618ae6aa5e6b764918761 /sysvar.h
parent5ebc0db1a6d4c75ce9c26449ef2a2e3d7b340e10 (diff)
downloadrsyslog-d03bf9c18cd0a150490eb375bd22d99d52b4832f.tar.gz
rsyslog-d03bf9c18cd0a150490eb375bd22d99d52b4832f.tar.xz
rsyslog-d03bf9c18cd0a150490eb375bd22d99d52b4832f.zip
- added sysvar class
- added PUSHSYSVAR operation to vm
Diffstat (limited to 'sysvar.h')
-rw-r--r--sysvar.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/sysvar.h b/sysvar.h
new file mode 100644
index 00000000..67a1450e
--- /dev/null
+++ b/sysvar.h
@@ -0,0 +1,46 @@
+/* The sysvar object. So far, no instance can be defined (makes logically no
+ * sense).
+ *
+ * Copyright 2008 Rainer Gerhards and Adiscon GmbH.
+ *
+ * This file is part of rsyslog.
+ *
+ * Rsyslog is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Rsyslog is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Rsyslog. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * A copy of the GPL can be found in the file "COPYING" in this distribution.
+ */
+#ifndef INCLUDED_SYSVAR_H
+#define INCLUDED_SYSVAR_H
+
+/* the sysvar object - not really used... */
+typedef struct sysvar_s {
+ BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */
+} sysvar_t;
+
+
+/* interfaces */
+BEGINinterface(sysvar) /* name must also be changed in ENDinterface macro! */
+ INTERFACEObjDebugPrint(sysvar);
+ rsRetVal (*Construct)(sysvar_t **ppThis);
+ rsRetVal (*ConstructFinalize)(sysvar_t __attribute__((unused)) *pThis);
+ rsRetVal (*Destruct)(sysvar_t **ppThis);
+ rsRetVal (*GetVar)(cstr_t *pstrPropName, var_t **ppVar);
+ENDinterface(sysvar)
+#define sysvarCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+
+
+/* prototypes */
+PROTOTYPEObj(sysvar);
+
+#endif /* #ifndef INCLUDED_SYSVAR_H */