index fe7eb750b8860e45b3810ef76b938d1494459e88..5d11c09975277ded9c43d1425a02d3ac387a207a 100644 (file)
--- a/src/include/core/store.h
+++ b/src/include/core/store.h
sc_host_t *
sc_host_clone(const sc_host_t *host);
+/*
+ * sc_store_host:
+ * Add/update a host in the store. If the host, identified by its name,
+ * already exists, it will be updated according to the specified 'host'
+ * object. Else, a new entry will be created in the store. Any memory required
+ * for storing the entry will be allocated an managed by the store itself. The
+ * specified host-object will not be referenced or further accessed.
+ *
+ * Returns:
+ * - 0 on success
+ * - a positive value if the new entry is older than the currently stored
+ * entry (in this case, no update will happen)
+ * - a negative value on error
+ */
int
sc_store_host(const sc_host_t *host);
sc_service_t *
sc_service_clone(const sc_service_t *svc);
+/*
+ * sc_store_service:
+ * Add/update a store in the store. If the service, identified by its name,
+ * already exists for the specified host, it will be updated according to the
+ * specified 'service' object. If the referenced host does not exist, an error
+ * will be reported. Else, a new entry will be created in the store. Any
+ * memory required for storing the entry will be allocated an managed by the
+ * store itself. The specified service-object will not be referenced or
+ * further accessed.
+ *
+ * Returns:
+ * - 0 on success
+ * - a positive value if the new entry is older than the currently stored
+ * entry (in this case, no update will happen)
+ * - a negative value on error
+ */
int
sc_store_service(const sc_service_t *svc);