Open SCAP Library

oval_smc_impl.h

00001 /*
00002  * Copyright 2013 Red Hat Inc., Durham, North Carolina.
00003  * All Rights Reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  * Authors:
00020  *      Šimon Lukašík
00021  *
00022  *
00023  * Structure providing 1--N mapping, by integrating two structures:
00024  * oval_string_map and oval_collection.
00025  */
00026 
00027 #ifndef OVAL_SMC_H
00028 #define OVAL_SMC_H
00029 
00030 #include "common/util.h"
00031 
00032 OSCAP_HIDDEN_START;
00033 
00034 struct oval_smc;
00035 
00036 struct oval_smc *oval_smc_new(void);
00037 
00038 void oval_smc_put_last(struct oval_smc *map, const char *key, void *item);
00039 
00040 void oval_smc_put_last_if_not_exists(struct oval_smc *map, const char *key, void *item);
00041 
00042 struct oval_iterator *oval_smc_get_all_it(struct oval_smc *map, const char *key);
00043 
00044 void *oval_smc_get_last(struct oval_smc *map, const char *key);
00045 
00046 void oval_smc_free0(struct oval_smc *map);
00047 
00048 void oval_smc_free(struct oval_smc *map, oscap_destruct_func destructor);
00049 
00050 typedef void *(*oval_smc_user_clone_func) (void *user_data, void *item);
00051 
00052 struct oval_smc *oval_smc_clone_user(struct oval_smc *oldmap, oval_smc_user_clone_func cloner, void *user_data);
00053 
00054 OSCAP_HIDDEN_END;
00055 
00056 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines