nvpair.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef NVPAIR_H
00009 #define NVPAIR_H
00010
00011 #include <stdio.h>
00012
00013 #include "int_sizes.h"
00014 #include "hash_table.h"
00015
00036 struct nvpair *nvpair_create();
00037
00041 void nvpair_delete(struct nvpair *n);
00042
00047 void nvpair_parse(struct nvpair *n, const char *text);
00048
00053 int nvpair_parse_stream(struct nvpair *n, FILE * stream);
00054
00061 int nvpair_print(struct nvpair *n, char *text, int length);
00062
00068 int nvpair_print_alloc(struct nvpair *n, char **text);
00069
00074 void nvpair_remove( struct nvpair *n, const char *name );
00075
00081 void nvpair_insert_string(struct nvpair *n, const char *name, const char *value);
00082 void nvpair_insert_integer(struct nvpair *n, const char *name, INT64_T value);
00088
00094 void nvpair_insert_float(struct nvpair *n, const char *name, double value);
00095
00101 const char *nvpair_lookup_string(struct nvpair *n, const char *name);
00102
00108 INT64_T nvpair_lookup_integer(struct nvpair *n, const char *name);
00109
00115 double nvpair_lookup_float(struct nvpair *n, const char *name);
00116
00121 void nvpair_export( struct nvpair *nv );
00122
00123
00131 void nvpair_first_item(struct nvpair *nv);
00132
00141 int nvpair_next_item(struct nvpair *nv, char **name, char **value);
00142
00145 #endif