Open SCAP Library: oval_smc_impl.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 OSCAP_HIDDEN_START;
33
34 struct oval_smc;
35
36 struct oval_smc *oval_smc_new(void);
37
38 void oval_smc_put_last(struct oval_smc *map, const char *key, void *item);
39
40 void oval_smc_put_last_if_not_exists(struct oval_smc *map, const char *key, void *item);
41
42 struct oval_iterator *oval_smc_get_all_it(struct oval_smc *map, const char *key);
43
44 void *oval_smc_get_last(struct oval_smc *map, const char *key);
45
46 void oval_smc_free0(struct oval_smc *map);
47
48 void oval_smc_free(struct oval_smc *map, oscap_destruct_func destructor);
49
50 typedef void *(*oval_smc_user_clone_func) (void *user_data, void *item);
51
52 struct oval_smc *oval_smc_clone_user(struct oval_smc *oldmap, oval_smc_user_clone_func cloner, void *user_data);
53
54 OSCAP_HIDDEN_END;
55
56 #endif