Debian Codegraph @

src/CPE/cpedict_priv.h

raw symbols SCIP
1 /**
2 * @file cpedict_priv.h
3 * @brief Interface to Common Platform Enumeration (CPE) Dictionary.
4 *
5 * See more details at http://nvd.nist.gov/cpe.cfm
6 */
7
8 /*
9 * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina.
10 * All Rights Reserved.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 *
26 * Authors:
27 * Maros Barabas <[email protected]>
28 */
29
30 #ifndef CPEDICT_PRIV_H_
31 #define CPEDICT_PRIV_H_cxx . . $ `src/CPE/cpedict_priv.h:31:9`!
32
33 #include <libxml/xmlreader.h>
34 #include <libxml/xmlwriter.h>
35 #include <stdlib.h>
36
37 #include "cpe_name.h"cxx . . $ `<file>/src/CPE/public/cpe_name.h`/
38 #include "cpe_ctx_priv.h"cxx . . $ `<file>/src/CPE/cpe_ctx_priv.h`/
39 #include "cpe_dict.h"cxx . . $ `<file>/src/CPE/public/cpe_dict.h`/
40
41 #include "../common/public/oscap.h"cxx . . $ `<file>/src/common/public/oscap.h`/
42 #include "../common/util.h"cxx . . $ `<file>/src/common/util.h`/
43 #include "../common/elements.h"cxx . . $ `<file>/src/common/elements.h`/
44
45 /**
46 * @cond INTERNAL
47 */
48 /* @endcond */
49
50 /**
51 * Parse generator part of CPE dictionary XML file
52 * @param ctx CPE Parser's context
53 * @return new structure cpe_generator
54 */
55 struct cpe_generatorcxx . . $ cpe_generator# *cpe_generator_parsecxx . . $ cpe_generator_parse(76548b63e5a1c9fc).(struct cpe_parser_ctxcxx . . $ cpe_parser_ctx# *ctx);
56
57 /**
58 * New dictionary item from XML
59 * @param ctx CPE parser's context
60 * @return new dictionary item
61 * @retval NULL on failure
62 */
63 struct cpe_itemcxx . . $ cpe_item# *cpe_item_parsecxx . . $ cpe_item_parse(39ba1f7d39abb029).(struct cpe_parser_ctxcxx . . $ cpe_parser_ctx# *ctx);
64
65 /**
66 * Parsing function to parse vendors of CPE dictionary
67 * @param reader xmlTextReaderPtr representing XML model
68 * @return new structure cpe_vendor
69 */
70 struct cpe_vendorcxx . . $ cpe_vendor# *cpe_vendor_parsecxx . . $ cpe_vendor_parse(869b5aacb6b94023).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader);
71
72 /**
73 * Load new CPE dictionary from XML node
74 * @param ctx CPE parser context
75 * @return new dictionary
76 * @retval NULL on failure
77 */
78 struct cpe_dict_modelcxx . . $ cpe_dict_model# *cpe_dict_model_parsecxx . . $ cpe_dict_model_parse(d014d982a14f83fe).(struct cpe_parser_ctxcxx . . $ cpe_parser_ctx# *ctx);
79
80 /**
81 * Get a version info from xmlTextReader
82 * @param reader xmlTextReader
83 * @returns version string that shall be disposed by caller
84 */
85 char *cpe_dict_detect_version_privcxx . . $ cpe_dict_detect_version_priv(93c99f8009311dd0).(xmlTextReadercxx . . $ xmlTextReader# *reader);
86
87 /**
88 * Export function for CPE dictionary model
89 * @param dict CPE dictionary structure
90 * @param file filename to export
91 */
92 void cpe_dict_model_export_xmlcxx . . $ cpe_dict_model_export_xml(8b983929fdf096f8).(const struct cpe_dict_modelcxx . . $ cpe_dict_model# *dict, const char *file);
93
94 /**
95 * Internal export function for CPE dictionary model
96 * @param dict CPE dictionary
97 * @param writer xmlTextWriterPtr representing XML model
98 */
99 void cpe_dict_exportcxx . . $ cpe_dict_export(4b5b08d0da02f342).(const struct cpe_dict_modelcxx . . $ cpe_dict_model# *dict, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer);
100
101 /**
102 * Exporting function for CPE generator - information of XML document
103 * @param generator CPE generator structure
104 * @param writer xmlTextWriterPtr representing XML model
105 */
106 void cpe_generator_exportcxx . . $ cpe_generator_export(edb600c2de36990).(const struct cpe_generatorcxx . . $ cpe_generator# *generator, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer);
107
108 /**
109 * Exporting function for CPE item
110 * @param item CPE item structure
111 * @param writer xmlTextWriterPtr representing XML model
112 * @param base_version what is the base version of target CPE dict (1 for CPE 1.x, 2 for CPE 2.x, ...)
113 */
114 void cpe_item_exportcxx . . $ cpe_item_export(7e62b63abb340dcd).(const struct cpe_itemcxx . . $ cpe_item# *item, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer, int base_version);
115
116 /**
117 * Exporting function for CPE vendor
118 * @param vendor CPE vendor structure
119 * @param writer xmlTextWriterPtr representing XML model
120 */
121 void cpe_vendor_exportcxx . . $ cpe_vendor_export(22dd32596ffa6c09).(const struct cpe_vendorcxx . . $ cpe_vendor# *vendor, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer);
122
123 /**
124 * Sets the origin file hint
125 * @see cpe_dict_model_get_origin_file
126 */
127 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! cpe_dict_model_set_origin_filecxx . . $ cpe_dict_model_set_origin_file(7b7239c1e1f068e0).(struct cpe_dict_modelcxx . . $ cpe_dict_model#* dict, const char* origin_file);
128
129 /**
130 * Gets the file the CPE dict model was loaded from
131 * This is necessary to figure out the full OVAL file path for applicability
132 * testing. We can't do applicability here in the CPE module because that
133 * would create awful interdependencies.
134 */
135 const char* cpe_dict_model_get_origin_filecxx . . $ cpe_dict_model_get_origin_file(ce13055568eecbfc).(const struct cpe_dict_modelcxx . . $ cpe_dict_model#* dict);
136
137 /* <cpe-list>
138 * */
139 struct cpe_dict_modelcxx . . $ cpe_dict_model# { // the main node
140 struct oscap_listcxx . . $ oscap_list# *itemscxx . . $ cpe_dict_model#items.; // dictionary items
141 struct oscap_listcxx . . $ oscap_list# *vendorscxx . . $ cpe_dict_model#vendors.;
142 int base_versioncxx . . $ cpe_dict_model#base_version.;
143 struct cpe_generatorcxx . . $ cpe_generator# *generatorcxx . . $ cpe_dict_model#generator.;
144 char* origin_filecxx . . $ cpe_dict_model#origin_file.;
145 };
146
147 /**
148 * @cond INTERNAL
149 */
150 /* @endcond */
151
152 #endif