Implemented PTS attributes Request File Metadata, Unix-Style File Metadata
[strongswan.git] / src / libpts / tcg / tcg_pts_attr_req_file_meta.h
1 /*
2 * Copyright (C) 2011 Sansar Choinyambuu
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 tcg_pts_attr_req_file_meta tcg_pts_attr_req_file_meta
18 * @{ @ingroup tcg_pts_attr_req_file_meta
19 */
20
21 #ifndef TCG_PTS_ATTR_REQ_FILE_META_H_
22 #define TCG_PTS_ATTR_REQ_FILE_META_H_
23
24 typedef struct tcg_pts_attr_req_file_meta_t tcg_pts_attr_req_file_meta_t;
25
26 #include "tcg_attr.h"
27 #include "pa_tnc/pa_tnc_attr.h"
28
29 /**
30 * Class implementing the TCG PTS Request File Metadata attribute
31 *
32 */
33 struct tcg_pts_attr_req_file_meta_t {
34
35 /**
36 * Public PA-TNC attribute interface
37 */
38 pa_tnc_attr_t pa_tnc_attribute;
39
40 /**
41 * Get directory flag for PTS Request File Metadata
42 *
43 * @return Directory Contents flag
44 */
45 bool (*get_directory_flag)(tcg_pts_attr_req_file_meta_t *this);
46
47 /**
48 * Get Delimiter
49 *
50 * @return UTF-8 encoding of a Delimiter Character
51 */
52 u_int8_t (*get_delimiter)(tcg_pts_attr_req_file_meta_t *this);
53
54 /**
55 * Get Fully Qualified File Pathname
56 *
57 * @return Pathname
58 */
59 char* (*get_pathname)(tcg_pts_attr_req_file_meta_t *this);
60
61 };
62
63 /**
64 * Creates an tcg_pts_attr_req_file_meta_t object
65 *
66 * @param directory_flag Directory Contents Flag
67 * @param delimiter Delimiter Character
68 * @param pathname File Pathname
69 */
70 pa_tnc_attr_t* tcg_pts_attr_req_file_meta_create(bool directory_flag,
71 u_int8_t delimiter,
72 char *pathname);
73
74 /**
75 * Creates an tcg_pts_attr_req_file_meta_t object from received data
76 *
77 * @param value unparsed attribute value
78 */
79 pa_tnc_attr_t* tcg_pts_attr_req_file_meta_create_from_data(chunk_t value);
80
81 #endif /** TCG_PTS_ATTR_REQ_FILE_META_H_ @}*/