wofi/inc/map.h

41 lines
1.1 KiB
C
Raw Permalink Normal View History

2019-08-17 21:19:32 -04:00
/*
2020-01-06 19:42:52 -05:00
* Copyright (C) 2019-2020 Scoopta
2019-08-17 21:19:32 -04:00
* This file is part of Wofi
* Wofi 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
(at your option) any later version.
Wofi 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 Wofi. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAP_H
#define MAP_H
2020-01-20 19:22:14 -05:00
#include <stddef.h>
2019-08-17 21:19:32 -04:00
#include <stdbool.h>
2020-01-06 03:39:47 -05:00
struct map* map_init(void);
2019-08-17 21:19:32 -04:00
2020-01-06 03:39:47 -05:00
struct map* map_init_void(void);
2019-08-17 21:19:32 -04:00
2020-01-06 03:39:47 -05:00
void map_free(struct map* map);
2019-08-17 21:19:32 -04:00
bool map_put(struct map* map, const char* key, char* value);
bool map_put_void(struct map* map, const char* key, void* value);
void* map_get(struct map* map, const char* key);
2019-08-18 23:49:12 -04:00
bool map_contains(struct map* map, const char* key);
2019-08-17 21:19:32 -04:00
size_t map_size(struct map* map);
#endif