summaryrefslogtreecommitdiffstats
path: root/var.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-21 13:27:51 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-21 13:27:51 +0000
commit04622f7d2210cbb8036502afadf5bcdcb0394d28 (patch)
tree1ba5f0321aaf86f6050193dd8283d85a7f4acd39 /var.h
parent1cc790fae01e4392d4cf96820f6402528f611c44 (diff)
downloadrsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.tar.gz
rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.tar.xz
rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.zip
first steps in implementing object interfaces (stage work for later dynamic
class loading)
Diffstat (limited to 'var.h')
-rw-r--r--var.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/var.h b/var.h
index c02b93b2..f400b109 100644
--- a/var.h
+++ b/var.h
@@ -51,12 +51,20 @@ typedef struct var_s {
} var_t;
+/* interfaces */
+typedef struct var_if_s {
+ ifBEGIN; /* This MUST always be the first interface member */
+ INTERFACEObjDebugPrint(var);
+ rsRetVal (*Construct)(var_t **ppThis);
+ rsRetVal (*ConstructFinalize)(var_t __attribute__((unused)) *pThis);
+ rsRetVal (*Destruct)(var_t **ppThis);
+ rsRetVal (*SetString)(var_t *pThis, cstr_t *pCStr);
+} var_if_t;
+#define varCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+
+
/* prototypes */
-rsRetVal varConstruct(var_t **ppThis);
-rsRetVal varConstructFinalize(var_t __attribute__((unused)) *pThis);
-rsRetVal varDestruct(var_t **ppThis);
-rsRetVal varSetString(var_t *pThis, cstr_t *pCStr);
PROTOTYPEObjClassInit(var);
-PROTOTYPEObjDebugPrint(var);
+PROTOTYPEObjQueryInterface(var);
#endif /* #ifndef INCLUDED_VAR_H */