Annotation of embedaddon/strongswan/src/libimcv/pts/pts_file_meta.h, revision 1.1.1.1
1.1 misho 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 pts_file_meta pts_file_meta
18: * @{ @ingroup pts
19: */
20:
21: #ifndef PTS_FILE_META_H_
22: #define PTS_FILE_META_H_
23:
24: #include "pts_file_type.h"
25:
26: #include <time.h>
27: #include <library.h>
28:
29: typedef struct pts_file_meta_t pts_file_meta_t;
30: typedef struct pts_file_metadata_t pts_file_metadata_t;
31:
32: /**
33: * Structure holding file metadata
34: */
35: struct pts_file_metadata_t {
36: pts_file_type_t type;
37: uint64_t filesize;
38: uint64_t created;
39: uint64_t modified;
40: uint64_t accessed;
41: uint64_t owner;
42: uint64_t group;
43: char *filename;
44: };
45:
46: /**
47: * Class storing PTS File Metadata
48: */
49: struct pts_file_meta_t {
50:
51: /**
52: * Get the number of files
53: *
54: * @return Number of files
55: */
56: int (*get_file_count)(pts_file_meta_t *this);
57:
58: /**
59: * Add PTS File Metadata
60: *
61: * @param filename Name of measured file or directory
62: * @param metadata File metadata
63: */
64: void (*add)(pts_file_meta_t *this, pts_file_metadata_t *metadata);
65:
66: /**
67: * Create a PTS File Metadata enumerator
68: *
69: * @return Enumerator returning file metadata
70: */
71: enumerator_t* (*create_enumerator)(pts_file_meta_t *this);
72:
73: /**
74: * Destroys a pts_file_meta_t object.
75: */
76: void (*destroy)(pts_file_meta_t *this);
77:
78: };
79:
80: /**
81: * Creates a pts_file_meta_t object
82: */
83: pts_file_meta_t* pts_file_meta_create();
84:
85: #endif /** PTS_FILE_MEAS_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>