]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libimcv/tcg/pts/tcg_pts_attr_req_file_meta.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libimcv / tcg / pts / tcg_pts_attr_req_file_meta.h
1 /*
2 * Copyright (C) 2011 Sansar Choinyambuu
3 * Copyright (C) 2014 Andreas Steffen
4 *
5 * Copyright (C) secunet Security Networks AG
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
16 */
17
18 /**
19 * @defgroup tcg_pts_attr_req_file_meta tcg_pts_attr_req_file_meta
20 * @{ @ingroup tcg_attr
21 */
22
23 #ifndef TCG_PTS_ATTR_REQ_FILE_META_H_
24 #define TCG_PTS_ATTR_REQ_FILE_META_H_
25
26 typedef struct tcg_pts_attr_req_file_meta_t tcg_pts_attr_req_file_meta_t;
27
28 #include "tcg/tcg_attr.h"
29 #include "pa_tnc/pa_tnc_attr.h"
30
31 /**
32 * Class implementing the TCG PTS Request File Metadata attribute
33 *
34 */
35 struct tcg_pts_attr_req_file_meta_t {
36
37 /**
38 * Public PA-TNC attribute interface
39 */
40 pa_tnc_attr_t pa_tnc_attribute;
41
42 /**
43 * Get directory flag for PTS Request File Metadata
44 *
45 * @return Directory Contents flag
46 */
47 bool (*get_directory_flag)(tcg_pts_attr_req_file_meta_t *this);
48
49 /**
50 * Get Delimiter
51 *
52 * @return UTF-8 encoding of a Delimiter Character
53 */
54 uint8_t (*get_delimiter)(tcg_pts_attr_req_file_meta_t *this);
55
56 /**
57 * Get Fully Qualified File Pathname
58 *
59 * @return Pathname
60 */
61 char* (*get_pathname)(tcg_pts_attr_req_file_meta_t *this);
62
63 };
64
65 /**
66 * Creates an tcg_pts_attr_req_file_meta_t object
67 *
68 * @param directory_flag Directory Contents Flag
69 * @param delimiter Delimiter Character
70 * @param pathname File Pathname
71 */
72 pa_tnc_attr_t* tcg_pts_attr_req_file_meta_create(bool directory_flag,
73 uint8_t delimiter,
74 char *pathname);
75
76 /**
77 * Creates an tcg_pts_attr_req_file_meta_t object from received data
78 *
79 * @param length Total length of attribute value
80 * @param value Unparsed attribute value (might be a segment)
81 */
82 pa_tnc_attr_t* tcg_pts_attr_req_file_meta_create_from_data(size_t length,
83 chunk_t value);
84
85 #endif /** TCG_PTS_ATTR_REQ_FILE_META_H_ @}*/