Added add_segment() method to IETF attributes
[strongswan.git] / src / libimcv / imv / imv_os_info.h
1 /*
2 * Copyright (C) 2014 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 imv_os_info imv_os_info
18 * @{ @ingroup libimcv
19 */
20
21 #ifndef IMV_OS_INFO_H_
22 #define IMV_OS_INFO_H_
23
24 typedef struct imv_os_info_t imv_os_info_t;
25
26 #include "os_info/os_info.h"
27
28 #include <library.h>
29
30 /**
31 * Interface for the IMV Operating System (OS) information module
32 */
33 struct imv_os_info_t {
34
35 /**
36 * Get the OS type
37 *
38 * @return OS type
39 */
40 os_type_t (*get_type)(imv_os_info_t *this);
41
42 /**
43 * Set the OS product name or distribution
44 *
45 * @param name OS name
46 */
47 void (*set_name)(imv_os_info_t *this, chunk_t name);
48
49 /**
50 * Get the OS product name or distribution
51 *
52 * @return OS name
53 */
54 chunk_t (*get_name)(imv_os_info_t *this);
55
56 /**
57 * Set the OS version or release
58 *
59 * @param version OS version
60 */
61 void (*set_version)(imv_os_info_t *this, chunk_t version);
62
63 /**
64 * Get the OS version or release
65 *
66 * @return OS version
67 */
68 chunk_t (*get_version)(imv_os_info_t *this);
69
70 /**
71 * Get the OS version or release
72 *
73 * @return OS name | OS version
74 */
75 char* (*get_info)(imv_os_info_t *this);
76
77 /**
78 * Destroys an imv_os_info_t object.
79 */
80 void (*destroy)(imv_os_info_t *this);
81 };
82
83 /**
84 * Create an imv_os_info_t object
85 */
86 imv_os_info_t* imv_os_info_create(void);
87
88 #endif /** IMV_OS_INFO_H_ @}*/