2 * Copyright (C) 2013-2014 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
17 * @defgroup tcg_swid_attr_tag_id_inv tcg_swid_attr_tag_id_inv
18 * @{ @ingroup tcg_attr
21 #ifndef TCG_SWID_ATTR_TAG_ID_INV_H_
22 #define TCG_SWID_ATTR_TAG_ID_INV_H_
24 typedef struct tcg_swid_attr_tag_id_inv_t tcg_swid_attr_tag_id_inv_t
;
26 #include "tcg/tcg_attr.h"
27 #include "swid/swid_tag_id.h"
28 #include "swid/swid_inventory.h"
30 #include <pa_tnc/pa_tnc_attr.h>
32 #define TCG_SWID_TAG_ID_INV_MIN_SIZE 16
35 * Class implementing the TCG SWID Tag Identifier Inventory attribute
38 struct tcg_swid_attr_tag_id_inv_t
{
41 * Public PA-TNC attribute interface
43 pa_tnc_attr_t pa_tnc_attribute
;
46 * Add a Tag ID to the attribute
48 * @param tag_id SWID Tag ID to be added
50 void (*add
)(tcg_swid_attr_tag_id_inv_t
*this, swid_tag_id_t
*tag_id
);
57 uint32_t (*get_request_id
)(tcg_swid_attr_tag_id_inv_t
*this);
62 * @param eid_epoch Event ID Epoch
63 * @return Last Event ID
65 uint32_t (*get_last_eid
)(tcg_swid_attr_tag_id_inv_t
*this,
69 * Get count of remaining SWID tag IDs
71 * @return SWID Tag ID count
73 uint32_t (*get_tag_id_count
)(tcg_swid_attr_tag_id_inv_t
*this);
76 * Get Inventory of SWID tag IDs
78 * @result SWID Tag ID Inventory
80 swid_inventory_t
* (*get_inventory
)(tcg_swid_attr_tag_id_inv_t
*this);
83 * Remove all SWID Tag IDs from the Inventory
85 void (*clear_inventory
)(tcg_swid_attr_tag_id_inv_t
*this);
90 * Creates an tcg_swid_attr_tag_id_inv_t object
92 * @param request_id Copy of the Request ID
93 * @param eid_epoch Event ID Epoch
94 * @param eid Last Event ID
96 pa_tnc_attr_t
* tcg_swid_attr_tag_id_inv_create(uint32_t request_id
,
101 * Creates an tcg_swid_attr_tag_id_inv_t object from received data
103 * @param length Total length of attribute value
104 * @param value Unparsed attribute value (might be a segment)
106 pa_tnc_attr_t
* tcg_swid_attr_tag_id_inv_create_from_data(size_t length
,
109 #endif /** TCG_SWID_ATTR_TAG_ID_INV_H_ @}*/