Open SCAP Library
oval_smc_impl.h
1 /*
2  * Copyright 2013 Red Hat Inc., Durham, North Carolina.
3  * All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * Authors:
20  * Šimon Lukašík
21  *
22  *
23  * Structure providing 1--N mapping, by integrating two structures:
24  * oval_string_map and oval_collection.
25  */
26 
27 #ifndef OVAL_SMC_H
28 #define OVAL_SMC_H
29 
30 #include "common/util.h"
31 
32 
33 struct oval_smc;
34 
35 struct oval_smc *oval_smc_new(void);
36 
37 void oval_smc_put_last(struct oval_smc *map, const char *key, void *item);
38 
39 void oval_smc_put_last_if_not_exists(struct oval_smc *map, const char *key, void *item);
40 
41 struct oval_iterator *oval_smc_get_all_it(struct oval_smc *map, const char *key);
42 
43 void *oval_smc_get_last(struct oval_smc *map, const char *key);
44 
45 void oval_smc_free0(struct oval_smc *map);
46 
47 void oval_smc_free(struct oval_smc *map, oscap_destruct_func destructor);
48 
49 typedef void *(*oval_smc_user_clone_func) (void *user_data, void *item);
50 
51 struct oval_smc *oval_smc_clone_user(struct oval_smc *oldmap, oval_smc_user_clone_func cloner, void *user_data);
52 
53 
54 #endif
Definition: oval_collection.c:54