| 1 | /* |
| 2 | * Copyright 2015 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 | * Jan Černý <[email protected]> |
| 21 | */ |
| 22 | |
| 23 | #ifndef OSCAP_DEBUG_H_ |
| 24 | #define OSCAP_DEBUG_H_cxx . . $ `src/common/public/oscap_debug.h:24:9`! |
| 25 | |
| 26 | #include "oscap_export.h"cxx . . $ `<file>/src/common/public/oscap_export.h`/ |
| 27 | |
| 28 | typedef enumcxx . . $ $anonymous_type_df56f8d0fbc6b1a6_0# { |
| 29 | DBG_Ecxx . . $ DBG_E. = 1, |
| 30 | DBG_Wcxx . . $ DBG_W., |
| 31 | DBG_Icxx . . $ DBG_I., |
| 32 | DBG_Dcxx . . $ DBG_D., |
| 33 | DBG_UNKNOWNcxx . . $ DBG_UNKNOWN. = -1 |
| 34 | } oscap_verbosity_levelscxx . . $ oscap_verbosity_levels#; |
| 35 | |
| 36 | /** |
| 37 | * Version of the oscap_dprintf function with support for debug level. |
| 38 | * Uses logic similar to the debug() macro described above. |
| 39 | * @param level debug level |
| 40 | * @param file name of the source file |
| 41 | * @param fn name of the function |
| 42 | * @param line current line |
| 43 | * @param delta_indent changes indentation |
| 44 | * @param fmt printf-line format string |
| 45 | * @param ... __oscap_dlprintf parameters |
| 46 | */ |
| 47 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void __oscap_dlprintfcxx . . $ __oscap_dlprintf(46abcccd4f14a385).(int level, const char *file, const char *fn, size_t line, int delta_indent, const char *fmt, ...); |
| 48 | |
| 49 | /** |
| 50 | * Turn on debugging information |
| 51 | * @param verbosity_level Verbosity level |
| 52 | * @param filename Name of file used as output file for store debugging |
| 53 | * and other additional information. |
| 54 | * @return When an error occurred, returns false, otherwise true. |
| 55 | */ |
| 56 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oscap_set_verbosecxx . . $ oscap_set_verbose(b7a7aa4a824b7595).(const char *verbosity_level, const char *filename); |
| 57 | |
| 58 | /** |
| 59 | * Parse verbosity level from a string. |
| 60 | * @param level_name Verbosity level as a C string. |
| 61 | * @return Verbosity level number (or -1 on error). |
| 62 | */ |
| 63 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! oscap_verbosity_levelscxx . . $ oscap_verbosity_levels# oscap_verbosity_level_from_cstrcxx . . $ oscap_verbosity_level_from_cstr(d17a359e3ebc1c52).(const char *level_name); |
| 64 | |
| 65 | /** |
| 66 | * Print an informational message (verbose level INFO) listing the values |
| 67 | * of all environment variables known by oscap. |
| 68 | * See the "List of accepted environment variables" section of the OpenSCAP User Manual. |
| 69 | */ |
| 70 | OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void oscap_print_env_varscxx . . $ oscap_print_env_vars(49f6e7a06ebc5aa8).(void); |
| 71 | |
| 72 | #if defined(_WIN32) |
| 73 | int setenv(const char *name, const char *value, int overwrite); |
| 74 | #endif |
| 75 | |
| 76 | #endif |