index a6f58cbdab8e00eca517557d14d68736c3600263..22b13157cfb72772501206c698aae949ce00c4c1 100644 (file)
--- a/src/include/core/store.h
+++ b/src/include/core/store.h
#include "sysdb.h"
#include "core/object.h"
-#include "utils/time.h"
+#include "core/time.h"
#include "utils/llist.h"
#include <stdio.h>
extern const sdb_type_t sdb_service_type;
typedef struct {
- sdb_object_t parent;
-
+ sdb_object_t super;
sdb_time_t last_update;
- char *name;
} sdb_store_obj_t;
-#define SDB_STORE_OBJ_INIT(t) { SDB_OBJECT_TYPED_INIT(t), 0, NULL }
+#define SDB_STORE_OBJ_INIT(t) { SDB_OBJECT_TYPED_INIT(t), 0 }
#define SDB_STORE_OBJ(obj) ((sdb_store_obj_t *)(obj))
#define SDB_CONST_STORE_OBJ(obj) ((const sdb_store_obj_t *)(obj))
typedef struct {
- sdb_store_obj_t parent;
+ sdb_store_obj_t super;
char *hostname;
} sdb_service_t;
#define SDB_CONST_SVC(obj) ((const sdb_service_t *)(obj))
typedef struct {
- sdb_store_obj_t parent;
+ sdb_store_obj_t super;
char *attr_value;
char *hostname;
#define SDB_CONST_ATTR(obj) ((const sdb_attribute_t *)(obj))
typedef struct {
- sdb_store_obj_t parent;
+ sdb_store_obj_t super;
sdb_llist_t *attributes;
sdb_llist_t *services;
/* shortcuts for accessing the sdb_store_obj_t attributes of inheriting
* objects */
-#define _last_update parent.last_update
-#define _name parent.name
-
-sdb_host_t *
-sdb_host_create(const char *name);
+#define _last_update super.last_update
/*
* sdb_store_host: