This file is indexed.

/usr/include/openscap/cpe_dict.h is in libopenscap-dev 1.2.15-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
/**
 * @addtogroup CPE
 * @{
 * @addtogroup cpedict CPE Dictionary
 * @{
 *
 * @image html cpe_dictionary.png "Class diagram"
 * @file cpe_dict.h
 *
 * \brief Interface to Common Platform Enumeration (CPE) Dictionary.
 */

/*
 * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina.
 * All Rights Reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Authors:
 *      Maros Barabas <mbarabas@redhat.com>
 *      Lukas Kuklinek <lkuklinek@redhat.com>
 *      Šimon Lukašík
 */

#ifndef CPEDICT_H_
#define CPEDICT_H_

#include "oscap.h"
#include "cpe_name.h"
#include "oscap_text.h"
#include "oscap_source.h"

/**
 * @struct cpe_dict_model
 * Structure representing a CPE dictionary.
 */
struct cpe_dict_model;

/**
 * @struct cpe_item
 * Structure representing single CPE dictionary item.
 */
struct cpe_item;

/**
 * @struct cpe_vendor
 * Structure with information about vendor
 */
struct cpe_vendor;

/**
 * @struct cpe_generator
 * Structure with information about document
 */
struct cpe_generator;

/**
 * @struct cpe_check
 * Structure representing single CPE check.
 */
struct cpe_check;

/**
 * @struct cpe_reference
 * CPE dictionary item reference.
 */
struct cpe_reference;

/**
 * @struct cpe_item_metadata
 * Structure representing metadata of CPE item
 */
struct cpe_item_metadata;

/**
 * @struct cpe_product
 * Product of some vendor
 */
struct cpe_product;
/**
 * @struct cpe_version
 * Version of product
 */
struct cpe_version;
/**
 * @struct cpe_update
 * Update of product version
 */
struct cpe_update;
/**
 * @struct cpe_edition
 * Edition of product update
 */
struct cpe_edition;
/**
 * @struct cpe_language
 * Language of product edition
 */
struct cpe_language;

/************************************************************/
/**
 * @name Getters
 * Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. 
 * Use remove function otherwise.
 * @{
 * */

/** cpe_item_metadata function to get date
 * @memberof cpe_item_metadata
 * @param item metadata of CPE item
 */
const char *cpe_item_metadata_get_modification_date(const struct cpe_item_metadata *item);

/** cpe_item_metadata function to get status
 * @memberof cpe_item_metadata
 * @param item metadata of CPE item
 */
const char *cpe_item_metadata_get_status(const struct cpe_item_metadata *item);

/** cpe_item_metadata function to get nvd ID
 * @memberof cpe_item_metadata
 * @param item metadata of CPE item
 */
const char *cpe_item_metadata_get_nvd_id(const struct cpe_item_metadata *item);

/** cpe_item_metadata function to get NVD ID of deprecated item
 * @memberof cpe_item_metadata
 * @param item metadata of CPE item
 */
const char *cpe_item_metadata_get_deprecated_by_nvd_id(const struct cpe_item_metadata *item);

/** cpe_check functions to get system
 * @memberof cpe_check
 * @param item CPE check item
 */
const char *cpe_check_get_system(const struct cpe_check *item);

/** cpe_check functions to get href
 * @memberof cpe_check
 * @param item CPE check item
 */
const char *cpe_check_get_href(const struct cpe_check *item);

/** cpe_check functions to get identifier
 * @memberof cpe_check
 * @param item CPE check item
 */
const char *cpe_check_get_identifier(const struct cpe_check *item);

/** cpe_reference functions to get href of reference
 * @memberof cpe_reference
 * @param item CPE reference item
 */
const char *cpe_reference_get_href(const struct cpe_reference *item);

/** cpe_reference functions to get content of reference
 * @memberof cpe_reference
 * @param item CPE reference item
 */
const char *cpe_reference_get_content(const struct cpe_reference *item);

/** cpe_item functions to get variable member name
 * @memberof cpe_item
 * @param item CPE item
 */
struct cpe_name *cpe_item_get_name(const struct cpe_item *item);

/** cpe_item functions to get variable member deprecated_by
 * @memberof cpe_item
 * @param item CPE item
 */
struct cpe_name *cpe_item_get_deprecated_by(const struct cpe_item *item);

/** cpe_item functions to get variable member deprecated_by
 * @memberof cpe_item
 * @param item CPE item
 * @returns deprecated_by attribute
 * @deprecated This function has been deprecated by @ref cpe_item_get_deprecated_by.
 * This function may be dropped from later versions of the library.
 */
OSCAP_DEPRECATED(struct cpe_name *cpe_item_get_deprecated(const struct cpe_item *item));

/** cpe_item functions to get variable member date
 * @memberof cpe_item
 * @param item CPE item
 */
const char *cpe_item_get_deprecation_date(const struct cpe_item *item);

/** cpe_item functions to get metadata of cpe_item
 * @memberof cpe_item
 * @param item CPE item
 */
struct cpe_item_metadata *cpe_item_get_metadata(const struct cpe_item *item);

/** cpe_item functions to get CPE references
 * @memberof cpe_item
 * @param item CPE item
 */
struct cpe_reference_iterator *cpe_item_get_references(const struct cpe_item *item);

/** cpe_item functions to get CPE checks
 * @memberof cpe_item
 * @param item CPE item
 */
struct cpe_check_iterator *cpe_item_get_checks(const struct cpe_item *item);

/** cpe_item functions to get CPE titles
 * @memberof cpe_item
 * @param item CPE item
 */
struct oscap_text_iterator *cpe_item_get_titles(const struct cpe_item *item);

/** cpe_item functions to get CPE notes
 * @memberof cpe_item
 * @param item CPE item
 * @deprecated This function has been deprecated and it may be dropped from later
 * versions of the library. (Please see upstream ticket #339 for further details).
 */
OSCAP_DEPRECATED(struct oscap_text_iterator *cpe_item_get_notes(const struct cpe_item *item));

/** cpe_generator functions to get product name
 * @memberof cpe_generator
 * @param item document generator
 */
const char *cpe_generator_get_product_name(const struct cpe_generator *item);

/** cpe_generator functions to get product version
 * @memberof cpe_generator
 * @param item document generator
 */
const char *cpe_generator_get_product_version(const struct cpe_generator *item);

/** cpe_generator functions to get document schema version
 * @memberof cpe_generator
 * @param item document generator
 */
const char *cpe_generator_get_schema_version(const struct cpe_generator *item);

/** cpe_generator functions to get timestamp from generator
 * @memberof cpe_generator
 * @param item document generator
 */
const char *cpe_generator_get_timestamp(const struct cpe_generator *item);

/** cpe_dict_model functions to get the base version from CPE dictionary model
 *
 * The base version is the major CPE version, 1 or 2. These two versions differ
 * in namespace when exporting so we have to remember which version we loaded.
 *
 * CPE 1.0 also doesn't have cpe_generator structure inside so we can't get
 * the version info from there.
 *
 * @memberof cpe_dict_model
 * @param item dictionary model
 */
int cpe_dict_model_get_base_version(const struct cpe_dict_model *item);

/** cpe_dict_model functions to get the base version from CPE dictionary model
 * @memberof cpe_dict_model
 * @param item dictionary model
 */
bool cpe_dict_model_set_base_version(struct cpe_dict_model *item, int base_version);

/** cpe_dict_model functions to get generator from CPE dictionary model
 * @memberof cpe_dict_model
 * @memberof cpe_generator
 * @param item dictionary model
 */
struct cpe_generator *cpe_dict_model_get_generator(const struct cpe_dict_model *item);

/** cpe_dict_model functions to get CPE items
 * @memberof cpe_dict_model
 * @param item dictionary model
 */
struct cpe_item_iterator *cpe_dict_model_get_items(const struct cpe_dict_model *item);

/** cpe_dict_model functions to get vendors
 * @memberof cpe_dict_model
 * @param item dictionary model
 */
struct cpe_vendor_iterator *cpe_dict_model_get_vendors(const struct cpe_dict_model *item);

/** cpe_vendor functions to get vendor value
 * @memberof cpe_vendor
 * @param item cpe_vendor
 */
const char *cpe_vendor_get_value(const struct cpe_vendor *item);

/** cpe_vendor functions to get vendor titles
 * @memberof cpe_vendor
 * @param item cpe_vendor
 */
struct oscap_text_iterator *cpe_vendor_get_titles(const struct cpe_vendor *item);

/** cpe_vendor functions to get vendor products
 * @memberof cpe_vendor
 * @param item cpe_vendor
 */
struct cpe_product_iterator *cpe_vendor_get_products(const struct cpe_vendor *item);

/** cpe_product functions to get product value
 * @memberof cpe_product
 * @param item cpe_product
 */
const char *cpe_product_get_value(const struct cpe_product *item);

/** cpe_product functions to get product part
 * @memberof cpe_product
 * @param item cpe_product
 */
cpe_part_t cpe_product_get_part(const struct cpe_product *item);

/** cpe_product functions to get versions of product
 * @memberof cpe_product
 * @memberof cpe_version
 * @param item cpe_product
 */
struct cpe_version_iterator *cpe_product_get_versions(const struct cpe_product *item);

/** cpe_version functions to get vupdates of versions
 * @memberof cpe_version
 * @param item cpe_version
 */
const char *cpe_version_get_value(const struct cpe_version *item);

/** cpe_version functions to get value of version
 * @memberof cpe_version
 * @memberof cpe_update
 * @param item cpe_version
 */
struct cpe_update_iterator *cpe_version_get_updates(const struct cpe_version *item);

/** cpe_update functions to get updates of version
 * @memberof cpe_update
 * @param item
 */
const char *cpe_update_get_value(const struct cpe_update *item);

/** cpe_update functions to get editions of update
 * @memberof cpe_update
 * @memberof cpe_edition
 * @param item cpe_update of product element
 */
struct cpe_edition_iterator *cpe_update_get_editions(const struct cpe_update *item);

/** cpe_edition functions to get value of edition
 * @memberof cpe_edition
 * @param item cpe_edition of update
 */
const char *cpe_edition_get_value(const struct cpe_edition *item);

/** cpe_edition functions to get languages of edition
 * @memberof cpe_edition
 * @memberof cpe_language
 * @param item cpe_edition of update
 */
struct cpe_language_iterator *cpe_edition_get_languages(const struct cpe_edition *item);

/** cpe_language functions to get value of language
 * @memberof cpe_language
 * @param item language
 */
const char *cpe_language_get_value(const struct cpe_language *item);

/************************************************************/
/** @} End of Getters group */

/// @memberof cpe_check
void cpe_check_free(struct cpe_check *check);
/// @memberof cpe_reference
void cpe_reference_free(struct cpe_reference *ref);
/// @memberof cpe_vendor
void cpe_vendor_free(struct cpe_vendor *vendor);
/// @memberof cpe_product
void cpe_product_free(struct cpe_product *product);
/// @memberof cpe_version
void cpe_version_free(struct cpe_version *version);
/// @memberof cpe_update
void cpe_update_free(struct cpe_update *update);
/// @memberof cpe_edition
void cpe_edition_free(struct cpe_edition *edition);
/// @memberof cpe_language
void cpe_language_free(struct cpe_language *language);
/// @memberof cpe_itemmetadata
void cpe_itemmetadata_free(struct cpe_item_metadata *meta);
/// @memberof cpe_dict_model
void cpe_dict_model_free(struct cpe_dict_model *dict);
/// @memberof cpe_generator
void cpe_generator_free(struct cpe_generator *generator);
/// @memberof cpe_item
void cpe_item_free(struct cpe_item *item);

/// @memberof cpe_dict_model
struct cpe_dict_model *cpe_dict_model_new(void);
/// @memberof cpe_generator
struct cpe_generator *cpe_generator_new(void);
/// @memberof cpe_check
struct cpe_check *cpe_check_new(void);
/// @memberof cpe_reference
struct cpe_reference *cpe_reference_new(void);
/// @memberof cpe_item
struct cpe_item *cpe_item_new(void);
/// @memberof cpe_vendor
struct cpe_vendor *cpe_vendor_new(void);
/// @memberof cpe_product
struct cpe_product *cpe_product_new(void);
/// @memberof cpe_version
struct cpe_version *cpe_version_new(void);
/// @memberof cpe_update
struct cpe_update *cpe_update_new(void);
/// @memberof cpe_edition
struct cpe_edition *cpe_edition_new(void);
/// @memberof cpe_language
struct cpe_language *cpe_language_new(void);
/// @memberof cpe_item_metadata
struct cpe_item_metadata *cpe_item_metadata_new(void);

/************************************************************/
/**
 * @name Setters
 * For lists use add functions. Parameters of set functions are duplicated in memory and need to 
 * be freed by caller.
 * @{
 */

/// @memberof cpe_item
bool cpe_item_set_name(struct cpe_item *item, const struct cpe_name *new_name);

/// @memberof cpe_item
bool cpe_item_set_deprecated_by(struct cpe_item *item, const struct cpe_name *new_deprecated_by);

/// @memberof cpe_item
bool cpe_item_set_deprecation_date(struct cpe_item *item, const char *new_deprecation_date);

/// @memberof cpe_item_metadata
bool cpe_item_metadata_set_modification_date(struct cpe_item_metadata *item_metadata,
					     const char *new_modification_date);

/// @memberof cpe_item_metadata
bool cpe_item_metadata_set_status(struct cpe_item_metadata *item_metadata, const char *new_status);

/// @memberof cpe_item_metadata
bool cpe_item_metadata_set_nvd_id(struct cpe_item_metadata *item_metadata, const char *new_nvd_id);

/// @memberof cpe_item_metadata
bool cpe_item_metadata_set_deprecated_by_nvd_id(struct cpe_item_metadata *item_metadata,
						const char *new_deprecated_by_nvd_id);

/// @memberof cpe_check
bool cpe_check_set_system(struct cpe_check *check, const char *new_system);

/// @memberof cpe_check
bool cpe_check_set_href(struct cpe_check *check, const char *new_href);

/// @memberof cpe_check
bool cpe_check_set_identifier(struct cpe_check *check, const char *new_identifier);

/// @memberof cpe_reference
bool cpe_reference_set_href(struct cpe_reference *reference, const char *new_href);

/// @memberof cpe_reference
bool cpe_reference_set_content(struct cpe_reference *reference, const char *new_content);

/// @memberof cpe_generator
bool cpe_generator_set_product_name(struct cpe_generator *generator, const char *new_product_name);

/// @memberof cpe_generator
bool cpe_generator_set_product_version(struct cpe_generator *generator, const char *new_product_version);

/// @memberof cpe_generator
bool cpe_generator_set_schema_version(struct cpe_generator *generator, const char *new_schema_version);

/// @memberof cpe_generator
bool cpe_generator_set_timestamp(struct cpe_generator *generator, const char *new_timestamp);

/// @memberof cpe_vendor
bool cpe_vendor_set_value(struct cpe_vendor *vendor, const char *new_value);

/// @memberof cpe_product
bool cpe_product_set_value(struct cpe_product *product, const char *new_value);

/// @memberof cpe_product
bool cpe_product_set_part(struct cpe_product *product, cpe_part_t new_part);

/// @memberof cpe_version
bool cpe_version_set_value(struct cpe_version *version, const char *new_value);

/// @memberof cpe_update
bool cpe_update_set_value(struct cpe_update *update, const char *new_value);

/// @memberof cpe_edition
bool cpe_edition_set_value(struct cpe_edition *edition, const char *new_value);

/// @memberof cpe_language
bool cpe_language_set_value(struct cpe_language *language, const char *new_value);

/*
 * Add functions
 */

/// @memberof cpe_item
bool cpe_item_add_reference(struct cpe_item *item, struct cpe_reference *new_reference);

/// @memberof cpe_item
bool cpe_item_add_check(struct cpe_item *item, struct cpe_check *new_check);

/// @memberof cpe_item
bool cpe_item_add_title(struct cpe_item *item, struct oscap_text *new_title);

/**
 * @memberof cpe_item
 * @deprecated This function has been deprecated and it may be dropped from later
 * versions of the library. (Please see upstream ticket #339 for further details).
 */
OSCAP_DEPRECATED(bool cpe_item_add_note(struct cpe_item *item, struct oscap_text *new_title));

/// @memberof cpe_dict_model
bool cpe_dict_model_add_item(struct cpe_dict_model *dict, struct cpe_item *new_item);

/// @memberof cpe_dict_model
bool cpe_dict_model_add_vendor(struct cpe_dict_model *dict, struct cpe_vendor *new_vendor);

/// @memberof cpe_vendor
bool cpe_vendor_add_title(struct cpe_vendor *vendor, struct oscap_text *new_title);

/// @memberof cpe_vendor
bool cpe_vendor_add_product(struct cpe_vendor *vendor, struct cpe_product *new_product);

/// @memberof cpe_product
bool cpe_product_add_version(struct cpe_product *product, struct cpe_version *new_version);

/// @memberof cpe_version
bool cpe_version_add_update(struct cpe_version *version, struct cpe_update *new_update);

/// @memberof cpe_update
bool cpe_update_add_edition(struct cpe_update *update, struct cpe_edition *new_edition);

/// @memberof cpe_edition
bool cpe_edition_add_language(struct cpe_edition *edition, struct cpe_language *new_language);


/************************************************************/
/** @} End of Setters group */

/************************************************************/
/**
 * @name Iterators
 * @{
 * */

/**
 * @struct cpe_item_iterator
 * Iterator over CPE dictionary items.
 * @see oscap_iterator
 */
struct cpe_item_iterator;

/**
 * Iterator over CPE dictionary items.
 * @see oscap_iterator
 * @memberof cpe_item_iterator
 */
struct cpe_item *cpe_item_iterator_next(struct cpe_item_iterator *it);

/**
 * Iterator over CPE dictionary items.
 * @see oscap_iterator
 * @memberof cpe_item_iterator
 */
bool cpe_item_iterator_has_more(struct cpe_item_iterator *it);

/**
 * Iterator over CPE dictionary items.
 * @see oscap_iterator
 * @memberof cpe_item_iterator
 */
void cpe_item_iterator_free(struct cpe_item_iterator *it);

/// @memberof cpe_item
void cpe_item_iterator_remove(struct cpe_item_iterator *it);
/// @memberof cpe_item_iterator
void cpe_item_iterator_reset(struct cpe_item_iterator *it);

/**
 * @struct cpe_reference_iterator
 * Iterator over CPE dictionary references.
 * @see oscap_iterator
 */
struct cpe_reference_iterator;

/**
 * Iterator over CPE item reference items.
 * @see oscap_iterator
 * @memberof cpe_reference_iterator
 */
struct cpe_reference *cpe_reference_iterator_next(struct cpe_reference_iterator *it);

/**
 * Iterator over CPE item reference items.
 * @see oscap_iterator
 * @memberof cpe_reference_iterator
 */
bool cpe_reference_iterator_has_more(struct cpe_reference_iterator *it);

/**
 * Iterator over CPE item reference items.
 * @see oscap_iterator
 * @memberof cpe_reference_iterator
 */
void cpe_reference_iterator_free(struct cpe_reference_iterator *it);

/// @memberof cpe_reference_iterator
void cpe_reference_iterator_remove(struct cpe_reference_iterator *it);
/// @memberof cpe_reference_iterator
void cpe_reference_iterator_reset(struct cpe_reference_iterator *it);

/**
 * @struct cpe_check_iterator
 * Iterator over CPE dictionary checks.
 * @see oscap_iterator
 */
struct cpe_check_iterator;

/**
 * Iterator over CPE item check items.
 * @see oscap_iterator
 * @memberof cpe_check_iterator
 */
struct cpe_check *cpe_check_iterator_next(struct cpe_check_iterator *it);

/**
 * Iterator over CPE item check items.
 * @see oscap_iterator
 * @memberof cpe_check_iterator
 */
bool cpe_check_iterator_has_more(struct cpe_check_iterator *it);

/**
 * Iterator over CPE item check items.
 * @see oscap_iterator
 * @memberof cpe_check_iterator
 */
void cpe_check_iterator_free(struct cpe_check_iterator *it);

/// @memberof cpe_check_iterator
void cpe_check_iterator_remove(struct cpe_check_iterator *it);
/// @memberof cpe_check_iterator
void cpe_check_iterator_reset(struct cpe_check_iterator *it);

/**
 * @struct cpe_vendor_iterator
 * Iterator over CPE dictionary item vendors.
 * @see oscap_iterator
 */
struct cpe_vendor_iterator;

/**
 * Iterator over CPE vendor items.
 * @see oscap_iterator
 * @memberof cpe_vendor_iterator
 */
struct cpe_vendor *cpe_vendor_iterator_next(struct cpe_vendor_iterator *it);

/**
 * Iterator over CPE vendor items.
 * @see oscap_iterator
 * @memberof cpe_vendor_iterator
 */
bool cpe_vendor_iterator_has_more(struct cpe_vendor_iterator *it);

/**
 * Iterator over CPE vendor items.
 * @see oscap_iterator
 * @memberof cpe_vendor_iterator
 */
void cpe_vendor_iterator_free(struct cpe_vendor_iterator *it);

/// @memberof cpe_vendor_iterator
void cpe_vendor_iterator_remove(struct cpe_vendor_iterator *it);
/// @memberof cpe_vendor_iterator
void cpe_vendor_iterator_reset(struct cpe_vendor_iterator *it);

/**
 * @struct cpe_product_iterator
 * Iterator over CPE dictionary item products.
 * @see oscap_iterator
 */
struct cpe_product_iterator;

/**
 * Iterator over CPE product items.
 * @see oscap_iterator
 * @memberof cpe_product_iterator
 */
struct cpe_product *cpe_product_iterator_next(struct cpe_product_iterator *it);

/**
 * Iterator over CPE product items.
 * @see oscap_iterator
 * @memberof cpe_product_iterator
 */
bool cpe_product_iterator_has_more(struct cpe_product_iterator *it);

/**
 * Iterator over CPE product items.
 * @see oscap_iterator
 * @memberof cpe_product_iterator
 */
void cpe_product_iterator_free(struct cpe_product_iterator *it);

/// @memberof cpe_product_iterator
void cpe_product_iterator_remove(struct cpe_product_iterator *it);
/// @memberof cpe_product_iterator
void cpe_product_iterator_reset(struct cpe_product_iterator *it);

/**
 * @struct cpe_version_iterator
 * Iterator over CPE dictionary item versions.
 * @see oscap_iterator
 */
struct cpe_version_iterator;

/**
 * Iterator over CPE version items.
 * @see oscap_iterator
 * @memberof cpe_version_iterator
 */
struct cpe_version *cpe_version_iterator_next(struct cpe_version_iterator *it);

/**
 * Iterator over CPE version items.
 * @see oscap_iterator
 * @memberof cpe_version_iterator
 */
bool cpe_version_iterator_has_more(struct cpe_version_iterator *it);

/**
 * Iterator over CPE version items.
 * @see oscap_iterator
 * @memberof cpe_version_iterator
 */
void cpe_version_iterator_free(struct cpe_version_iterator *it);

/// @memberof cpe_version_iterator
void cpe_version_iterator_remove(struct cpe_version_iterator *it);
/// @memberof cpe_version_iterator
void cpe_version_iterator_reset(struct cpe_version_iterator *it);

/**
 * @struct cpe_update_iterator
 * Iterator over CPE dictionary item updates.
 * @see oscap_iterator
 */
struct cpe_update_iterator;

/**
 * Iterator over CPE update items.
 * @see oscap_iterator
 * @memberof cpe_update_iterator
 */
struct cpe_update *cpe_update_iterator_next(struct cpe_update_iterator *it);

/**
 * Iterator over CPE update items.
 * @see oscap_iterator
 * @memberof cpe_update_iterator
 */
bool cpe_update_iterator_has_more(struct cpe_update_iterator *it);

/**
 * Iterator over CPE update items.
 * @see oscap_iterator
 * @memberof cpe_update_iterator
 */
void cpe_update_iterator_free(struct cpe_update_iterator *it);

/// @memberof cpe_update_iterator
void cpe_update_iterator_remove(struct cpe_update_iterator *it);
/// @memberof cpe_update_iterator
void cpe_update_iterator_reset(struct cpe_update_iterator *it);

/**
 * @struct cpe_edition_iterator
 * Iterator over CPE dictionary item editions.
 * @see oscap_iterator
 */
struct cpe_edition_iterator;

/**
 * Iterator over CPE edition items.
 * @see oscap_iterator
 * @memberof cpe_edition_iterator
 */
struct cpe_edition *cpe_edition_iterator_next(struct cpe_edition_iterator *it);

/**
 * Iterator over CPE edition items.
 * @see oscap_iterator
 * @memberof cpe_edition_iterator
 */
bool cpe_edition_iterator_has_more(struct cpe_edition_iterator *it);

/**
 * Iterator over CPE edition items.
 * @see oscap_iterator
 * @memberof cpe_edition_iterator
 */
void cpe_edition_iterator_free(struct cpe_edition_iterator *it);

/// @memberof cpe_edition_iterator
void cpe_edition_iterator_remove(struct cpe_edition_iterator *it);
/// @memberof cpe_edition_iterator
void cpe_edition_iterator_reset(struct cpe_edition_iterator *it);

/**
 * @struct cpe_language_iterator
 * Iterator over CPE dictionary item languages.
 * @see oscap_iterator
 */
struct cpe_language_iterator;

/**
 * Iterator over CPE language items.
 * @see oscap_iterator
 * @memberof cpe_language_iterator
 */
struct cpe_language *cpe_language_iterator_next(struct cpe_language_iterator *it);

/**
 * Iterator over CPE language items.
 * @see oscap_iterator
 * @memberof cpe_language_iterator
 */
bool cpe_language_iterator_has_more(struct cpe_language_iterator *it);

/**
 * Iterator over CPE language items.
 * @see oscap_iterator
 * @memberof cpe_language_iterator
 */
void cpe_language_iterator_free(struct cpe_language_iterator *it);

/// @memberof cpe_language_iterator
void cpe_language_iterator_remove(struct cpe_language_iterator *it);
/// @memberof cpe_language_iterator
void cpe_language_iterator_reset(struct cpe_language_iterator *it);

/************************************************************/
/** @} End of Iterators group */

/************************************************************/
/**
 * @name Evaluators
 * @{
 * */

/**
 * Get the newest supported version of CPE dictionary XML
 * @return version of XML file format
 * @memberof cpe_dict_model
 */
const char * cpe_dict_model_supported(void);

/**
 * Detects which version the given CPE file is
 *
 * Deallocate the result after use with "free(..)".
 * @deprecated This function has been deprecated by @ref oscap_source_get_schema_version.
 * This function may be dropped from later versions of the library.
 */
OSCAP_DEPRECATED(char *cpe_dict_detect_version(const char* file));

/** 
 * Verify wether given CPE is known according to specified dictionary
 * @memberof cpe_name
 * @memberof cpe_dict_model
 * @param cpe CPE to verify
 * @param dict used CPE dictionary
 * @return true if dictionary contains given CPE
 */
bool cpe_name_match_dict(struct cpe_name *cpe, struct cpe_dict_model *dict);

/** 
 * Verify if CPE given by string is known according to specified dictionary
 * @memberof cpe_name
 * @memberof cpe_dict_model
 * @param cpe CPE to verify
 * @param dict used CPE dictionary
 * @return true if dictionary contains given CPE
 */
bool cpe_name_match_dict_str(const char *cpe, struct cpe_dict_model *dict);

/**
 * Verify whether given CPE is applicable to current platform by evaluating checks associated with it
 *
 * @memberof cpe_name
 * @memberof cpe_dict_model
 * @param cpe CPE to verify
 * @param dict used CPE dictionary
 * @return true if dictionary contains given CPE and the CPE is applicable
 */
bool cpe_name_applicable_dict(struct cpe_name *cpe, struct cpe_dict_model *dict, cpe_check_fn cb, void* usr);

/// @memberof cpe_item
bool cpe_item_is_applicable(struct cpe_item* item, cpe_check_fn cb, void* usr);

/************************************************************/
/** @} End of Evaluators group */

/**
 * Write the dict_model to a file.
 * @param dict CPE Dict model
 * @memberof cpe_dict_model
 */
void cpe_dict_model_export(const struct cpe_dict_model *dict, const char *file);

/** 
 * Load new CPE dictionary from file
 * @memberof cpe_dict_model
 * @param file filename
 * @return new dictionary
 * @retval NULL on failure
 * @deprecated This function has been deprecated by @ref cpe_dict_model_import_source.
 * This function may be dropped from later versions of the library.
 */
OSCAP_DEPRECATED(struct cpe_dict_model *cpe_dict_model_import(const char *file));

/**
 * Load new CPE dictionary from an oscap_source
 * @memberof cpe_dict_model
 * @param source The oscap_source to parse content from
 * @returns new dictionary or NULL
 */
struct cpe_dict_model *cpe_dict_model_import_source(struct oscap_source *source);


/**
 * Sets the origin file hint
 * @note This is intended for internal use only!
 * @see cpe_dict_model_get_origin_file
 */
bool cpe_dict_model_set_origin_file(struct cpe_dict_model* dict, const char* origin_file);

/**
 * Gets the file the CPE dict model was loaded from
 * @internal
 * This is necessary to figure out the full OVAL file path for applicability
 * testing. We can't do applicability here in the CPE module because that
 * would create awful interdependencies.
 */
const char* cpe_dict_model_get_origin_file(const struct cpe_dict_model* dict);

/** @} */

/** @} */

#endif				/* _CPEDICT_H_ */