cctools
nvpair_database.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2012- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef NVPAIR_DATABASE_H
8 #define NVPAIR_DATABASE_H
9 
57 #include "nvpair.h"
58 
64 struct nvpair_database * nvpair_database_create( const char *logdir );
65 
73 void nvpair_database_insert( struct nvpair_database *db, const char *key, struct nvpair *nv );
74 
81 struct nvpair * nvpair_database_lookup( struct nvpair_database *db, const char *key );
82 
90 struct nvpair * nvpair_database_remove( struct nvpair_database *db, const char *key );
91 
99 void nvpair_database_firstkey( struct nvpair_database *db );
100 
109 int nvpair_database_nextkey( struct nvpair_database *db, char **key, struct nvpair **nv );
110 
111 #endif
void nvpair_database_insert(struct nvpair_database *db, const char *key, struct nvpair *nv)
Insert or update an object into the database.
struct nvpair_database * nvpair_database_create(const char *logdir)
Create a new database, recovering state from disk if available.
struct nvpair * nvpair_database_lookup(struct nvpair_database *db, const char *key)
Look up an object in the database.
An nvpair object is a collection of name-value pairs that might describe a complex object such as a h...
void nvpair_database_firstkey(struct nvpair_database *db)
Begin iteration over all keys in the database.
Definition: nvpair_private.h:15
struct nvpair * nvpair_database_remove(struct nvpair_database *db, const char *key)
Remove an object from the database.
int nvpair_database_nextkey(struct nvpair_database *db, char **key, struct nvpair **nv)
Continue iteration over the database.