diff options
author | Christian Pointner <equinox@helsinki.at> | 2009-11-02 11:13:07 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2009-11-02 11:13:07 (GMT) |
commit | bb4a1f01ff4dd9650f0dec7085ae7733373b42cf (patch) | |
tree | 111bf42f37bf4e1afc794559e72ec7d8220106aa /key_value_storage.h |
switched to svn directory structure
Diffstat (limited to 'key_value_storage.h')
-rw-r--r-- | key_value_storage.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/key_value_storage.h b/key_value_storage.h new file mode 100644 index 0000000..b62a1d5 --- /dev/null +++ b/key_value_storage.h @@ -0,0 +1,41 @@ +/* + * rhctl + * + * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org> + * + * This file is part of rhctl. + * + * rhctl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * rhctl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rhctl. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _KEY_VALUE_STORAGE_H_ +#define _KEY_VALUE_STORAGE_H_ + +#include "string_list.h" + +struct key_value_storage_struct { + string_list_t keys_; + string_list_t values_; +}; +typedef struct key_value_storage_struct key_value_storage_t; + +void key_value_storage_init(key_value_storage_t* stor); +void key_value_storage_clear(key_value_storage_t* stor); +int key_value_storage_add(key_value_storage_t* stor, const char* key, const char* value); +char* key_value_storage_find(key_value_storage_t* stor, const char* key); + +void key_value_storage_print(key_value_storage_t* stor); + + +#endif |