2 * Copyright (C) 2011 Sansar Choinyambuu
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 pts_file_meta pts_file_meta
21 #ifndef PTS_FILE_META_H_
22 #define PTS_FILE_META_H_
24 #include "pts_file_type.h"
29 typedef struct pts_file_meta_t pts_file_meta_t
;
30 typedef struct pts_file_metadata_t pts_file_metadata_t
;
32 /* Without filename field included */
33 #define PTS_FILE_METADATA_SIZE 52
36 * Structure holding file metadata
38 struct pts_file_metadata_t
{
39 u_int16_t meta_length
;
43 time_t last_modify_time
;
44 time_t last_access_time
;
51 * Class storing PTS File Metadata
53 struct pts_file_meta_t
{
56 * Get the number of files
58 * @return Number of files
60 int (*get_file_count
)(pts_file_meta_t
*this);
63 * Add a PTS File Metadata
65 * @param filename Name of measured file or directory
66 * @param metadata File metadata
68 void (*add
)(pts_file_meta_t
*this, pts_file_metadata_t
*metadata
);
71 * Create a PTS File Metadata enumerator
73 * @return Enumerator returning file metadata
75 enumerator_t
* (*create_enumerator
)(pts_file_meta_t
*this);
78 * Destroys a pts_file_meta_t object.
80 void (*destroy
)(pts_file_meta_t
*this);
85 * Creates a pts_file_meta_t object
87 pts_file_meta_t
* pts_file_meta_create();
89 #endif /** PTS_FILE_MEAS_H_ @}*/