Replaced Tag File Path by Instance ID field
[strongswan.git] / src / libpts / swid / swid_tag.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 swid_tag
18 * @{ @ingroup swid
19 */
20
21 #ifndef SWID_TAG_H_
22 #define SWID_TAG_H_
23
24 #include <library.h>
25
26 typedef struct swid_tag_t swid_tag_t;
27
28
29 /**
30 * Class storing a SWID Tag
31 */
32 struct swid_tag_t {
33
34 /**
35 * Get UTF-8 XML encoding of SWID tag
36 *
37 * @return XML encoding of SWID tag
38 */
39 chunk_t (*get_encoding)(swid_tag_t *this);
40
41 /**
42 * Get the optional Tag Identifier Instance ID
43 *
44 * @return Optional Tag Identifier Instance ID
45 */
46 chunk_t (*get_instance_id)(swid_tag_t *this);
47
48 /**
49 * Get a new reference to the swid_tag object
50 *
51 * @return this, with an increased refcount
52 */
53 swid_tag_t* (*get_ref)(swid_tag_t *this);
54
55 /**
56 * Destroys a swid_tag_t object.
57 */
58 void (*destroy)(swid_tag_t *this);
59
60 };
61
62 /**
63 * Creates a swid_tag_t object
64 *
65 * @param encoding XML encoding of SWID tag
66 * @param instance_id Tag Identifier Instance ID or empty chunk
67 */
68 swid_tag_t* swid_tag_create(chunk_t encoding, chunk_t instance_id);
69
70 #endif /** SWID_TAG_H_ @}*/