index 703bc55e476c0b3ef2663ec28ac63098a0d2399b..6dc68c0c1fe6f837a55c61b1c92b5208d342cf58 100644 (file)
--- a/src/core/store-private.h
+++ b/src/core/store-private.h
#define SVC(obj) ((sdb_service_t *)(obj))
#define CONST_SVC(obj) ((const sdb_service_t *)(obj))
+typedef struct {
+ sdb_store_obj_t super;
+
+ sdb_avltree_t *attributes;
+ struct {
+ char *type;
+ char *id;
+ } store;
+} sdb_metric_t;
+#define METRIC(obj) ((sdb_metric_t *)(obj))
+
typedef struct {
sdb_store_obj_t super;
sdb_avltree_t *services;
+ sdb_avltree_t *metrics;
sdb_avltree_t *attributes;
} sdb_host_t;
#define HOST(obj) ((sdb_host_t *)(obj))
* conditionals
*/
-/* compares a host using the specified conditional and taking the specified
+/* compares an object using the specified conditional and taking the specified
* filter into account */
-typedef int (*cmp_cb)(sdb_host_t *, sdb_store_cond_t *,
+typedef int (*cmp_cb)(sdb_store_obj_t *, sdb_store_cond_t *,
sdb_store_matcher_t *);
struct sdb_store_cond {
} attr_cond_t;
#define ATTR_C(obj) ((attr_cond_t *)(obj))
+typedef struct {
+ sdb_store_cond_t super;
+ int field;
+ sdb_store_expr_t *expr;
+} obj_cond_t;
+#define OBJ_C(obj) ((obj_cond_t *)(obj))
+
/*
* matchers
*/