sw-collector: Check for epoch-less Debian package versions
[strongswan.git] / src / libimcv / plugins / imc_swima / sw_collector / sw_collector_info.h
1 /*
2 * Copyright (C) 2017 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup sw_collector_info_t sw_collector_info
18 * @{ @ingroup sw_collector
19 */
20
21 #ifndef SW_COLLECTOR_INFO_H_
22 #define SW_COLLECTOR_INFO_H_
23
24 typedef struct sw_collector_info_t sw_collector_info_t;
25
26 #include "imc/imc_os_info.h"
27
28 struct sw_collector_info_t {
29
30 /**
31 * Get OS type
32 *
33 * @return OS type
34 */
35 os_type_t (*get_os_type)(sw_collector_info_t *this);
36
37 /**
38 * Get OS and product strings
39 *
40 * @param product Product string 'Name Version Arch'
41 * @return OS string 'Name_Version-Arch'
42 */
43 char* (*get_os)(sw_collector_info_t *this, char **product);
44
45 /**
46 * Create software identifier including tagCreator and OS
47 *
48 * @param package Package string
49 * @param version Version string
50 * @return Software Identifier string
51 */
52 char* (*create_sw_id)(sw_collector_info_t *this, char *package,
53 char *version);
54
55 /**
56 * Destroy sw_collector_info_t object
57 */
58 void (*destroy)(sw_collector_info_t *this);
59
60 };
61
62 /**
63 * Create an sw_collector_info_t instance
64 *
65 * @param tag_creator Regid of tagCreator
66 */
67 sw_collector_info_t* sw_collector_info_create(char *tag_creator);
68
69 #endif /** SW_COLLECTOR_INFO_H_ @}*/