]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libimcv/swid_gen/swid_gen.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libimcv / swid_gen / swid_gen.h
1 /*
2 * Copyright (C) 2017 Andreas Steffen
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup swid_gen swid_gen
19 * @{ @ingroup libimcv
20 */
21
22 #ifndef SWID_GEN_H_
23 #define SWID_GEN_H_
24
25 #include <library.h>
26
27 typedef struct swid_gen_t swid_gen_t;
28
29 /**
30 * Class generating a either a full or a minimalistic ISO 19770-2:2015 SWID tag
31 */
32 struct swid_gen_t {
33
34 /**
35 * Generate a SWID tag
36 *
37 * @param sw_id Software identifier
38 * @param package Package name (can be NULL)
39 * @param version Package version (can be NULL)
40 * @param full Generate full SWID tags with file information
41 * @param pretty Generate SWID tags with pretty formatting
42 * @return SWID tag
43 */
44 char* (*generate_tag)(swid_gen_t *this, char *sw_id, char *package,
45 char *version, bool full, bool pretty);
46
47 /**
48 * Generate SWID tags or software identifiers for all installed packages
49 *
50 * @param sw_id_only Return software identifier only
51 * @param full Generate full SWID tags with file information
52 * @param pretty Generate SWID tags with pretty formatting
53 * @return Tag enumerator (sw_id, tag)
54 */
55 enumerator_t* (*create_tag_enumerator)(swid_gen_t *this, bool sw_id_only,
56 bool full, bool pretty);
57
58 /**
59 * Destroys a swid_gen_t object.
60 */
61 void (*destroy)(swid_gen_t *this);
62
63 };
64
65 /**
66 * Creates a swid_gen_t object
67 */
68 swid_gen_t* swid_gen_create(void);
69
70 #endif /** SWID_GEN_H_ @}*/