Code

grammar.y: Added some (very) short documentation for each statement.
[sysdb.git] / src / frontend / connection-private.h
index 39fc85240e7c637817f2495a1e9bea07f62737df..534d3cbd3978d3ca43707aba0a071ad9bdd9281d 100644 (file)
 #ifndef SDB_FRONTEND_CONNECTION_PRIVATE_H
 #define SDB_FRONTEND_CONNECTION_PRIVATE_H 1
 
+#include "frontend/connection.h"
+
 #include "core/object.h"
+#include "core/store.h"
 #include "utils/strbuf.h"
-#include "frontend/connection.h"
 
 #include <inttypes.h>
 #include <arpa/inet.h>
 
+#include <stdlib.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -67,6 +71,32 @@ struct sdb_conn {
 };
 #define CONN(obj) ((sdb_conn_t *)(obj))
 
+/*
+ * node types
+ */
+
+typedef struct {
+       sdb_conn_node_t super;
+       char *name;
+} conn_fetch_t;
+#define CONN_FETCH(obj) ((conn_fetch_t *)(obj))
+
+typedef struct {
+       sdb_conn_node_t super;
+       sdb_store_matcher_t *matcher;
+} conn_node_matcher_t;
+#define CONN_MATCHER(obj) ((conn_node_matcher_t *)(obj))
+
+/*
+ * type helper functions
+ */
+static void __attribute__((unused))
+conn_fetch_destroy(sdb_object_t *obj)
+{
+       if (CONN_FETCH(obj)->name)
+               free(CONN_FETCH(obj)->name);
+} /* conn_fetch_destroy */
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif