Merged libpts into libimcv
[strongswan.git] / src / libimcv / swid / swid_tag_id.h
1 /*
2 * Copyright (C) 2013-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 swid_tag_id swid_tag_id
18 * @{ @ingroup swid
19 */
20
21 #ifndef SWID_TAG_ID_H_
22 #define SWID_TAG_ID_H_
23
24 #include <library.h>
25
26 typedef struct swid_tag_id_t swid_tag_id_t;
27
28
29 /**
30 * Class storing a SWID Tag ID
31 */
32 struct swid_tag_id_t {
33
34 /**
35 * Get the Tag Creator
36 *
37 * @return Tag Creator
38 */
39 chunk_t (*get_tag_creator)(swid_tag_id_t *this);
40
41 /**
42 * Get the Unique Software ID and optional Tag File Path
43 *
44 * @param instance_id Optional Tag Identifier Instance ID
45 * @return Unique Software ID
46 */
47 chunk_t (*get_unique_sw_id)(swid_tag_id_t *this, chunk_t *instance_id);
48
49 /**
50 * Get a new reference to the swid_tag_id object
51 *
52 * @return this, with an increased refcount
53 */
54 swid_tag_id_t* (*get_ref)(swid_tag_id_t *this);
55
56 /**
57 * Destroys a swid_tag_id_t object.
58 */
59 void (*destroy)(swid_tag_id_t *this);
60
61 };
62
63 /**
64 * Creates a swid_tag_id_t object
65 *
66 * @param tag_creator Tag Creator
67 * @param unique_sw_id Unique Software ID
68 * @param instance_id Tag Identifier Instance ID or empty chunk
69 */
70 swid_tag_id_t* swid_tag_id_create(chunk_t tag_creator, chunk_t unique_sw_id,
71 chunk_t instance_id);
72
73 #endif /** SWID_TAG_ID_H_ @}*/