optimized handling of UNIX file metadata
[strongswan.git] / src / libpts / pts / pts_file_meta.h
index 36a4b62..3f18133 100644 (file)
 typedef struct pts_file_meta_t pts_file_meta_t;
 typedef struct pts_file_metadata_t pts_file_metadata_t;
 
-/* Without filename field included */
-#define PTS_FILE_METADATA_SIZE         52
-
 /**
  * Structure holding file metadata
  */
 struct pts_file_metadata_t {
-       u_int16_t                       meta_length;
-       pts_file_type_t         type;
-       u_int64_t                       filesize;
-       time_t                          create_time;
-       time_t                          last_modify_time;
-       time_t                          last_access_time;
-       u_int64_t                       owner_id;
-       u_int64_t                       group_id;
-       char                            *filename;
+       pts_file_type_t type;
+       u_int64_t       filesize;
+       u_int64_t       created;
+       u_int64_t       modified;
+       u_int64_t       accessed;
+       u_int64_t       owner;
+       u_int64_t       group;
+       char           *filename;
 };
 
 /**
@@ -60,14 +56,12 @@ struct pts_file_meta_t {
        int (*get_file_count)(pts_file_meta_t *this);
 
        /**
-        * Add PTS File Metadata
+        * Add PTS File Metadata
         *
         * @param filename              Name of measured file or directory
         * @param metadata              File metadata
         */
-       void (*add)(pts_file_meta_t *this, char *filename, pts_file_type_t type,
-                       u_int64_t filesize, time_t create_time, time_t last_modfy_time, time_t last_access_time,
-                       u_int64_t owner_id, u_int64_t group_id);
+       void (*add)(pts_file_meta_t *this, pts_file_metadata_t *metadata);
 
        /**
          * Create a PTS File Metadata enumerator