1 /* Copyright (C) 2020 Greenbone Networks GmbH 2 * 3 * SPDX-License-Identifier: AGPL-3.0-or-later 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU Affero General Public License as 7 * published by the Free Software Foundation, either version 3 of the 8 * License, or (at your option) any later version. 9 * 10 * This program 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 13 * GNU Affero General Public License for more details. 14 * 15 * You should have received a copy of the GNU Affero General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 /* 20 * @file manage_preferences.h 21 * @brief Headers for Greenbone Vulnerability Manager: Manage lib: Preferences. 22 */ 23 24 #ifndef _GVMD_MANAGE_PREFERENCES_H 25 #define _GVMD_MANAGE_PREFERENCES_H 26 27 #include <gvm/base/array.h> 28 29 /** 30 * @brief An NVT preference. 31 */ 32 typedef struct 33 { 34 char *name; ///< Name of preference. 35 char *id; ///< ID of preference. 36 char *type; ///< Type of preference (radio, password, ...). 37 char *value; ///< Value of preference. 38 char *nvt_name; ///< Name of NVT preference affects. 39 char *nvt_oid; ///< OID of NVT preference affects. 40 array_t *alts; ///< Array of gchar's. Alternate values for radio type. 41 char *default_value; ///< Default value of preference. 42 char *hr_name; ///< Extended, more human-readable name used by OSP. 43 int free_strings; ///< Whether string fields are freed by preference_free. 44 } preference_t; 45 46 gpointer 47 preference_new (char *, char *, char *, char *, char *, 48 char *, array_t *, char*, 49 char *, int); 50 51 void 52 preference_free (preference_t *); 53 54 void 55 cleanup_import_preferences (array_t *); 56 57 #endif /* not _GVMD_MANAGE_PREFERENCES_H */ 58