From 70438138096a47b2505ac55634cd94947ce378b6 Mon Sep 17 00:00:00 2001 From: Perberos Date: Wed, 9 Nov 2011 22:53:33 -0300 Subject: initial --- src/file-data.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/file-data.h (limited to 'src/file-data.h') diff --git a/src/file-data.h b/src/file-data.h new file mode 100644 index 0000000..cd0147a --- /dev/null +++ b/src/file-data.h @@ -0,0 +1,70 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * File-Roller + * + * Copyright (C) 2001 The Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + */ + +#ifndef FILE_DATA_H +#define FILE_DATA_H + +#include +#include +#include + +typedef struct { + char *original_path; /* path read from command line. */ + char *full_path; /* "/" + original_path. */ + char *link; + goffset size; + time_t modified; + + char *name; /* The file name. */ + char *path; /* The directory. */ + gboolean encrypted; /* Whether the file is encrypted. */ + gboolean dir; /* Whether this is a directory listed in the archive */ + goffset dir_size; + const char *content_type; + + /* Additional data. */ + + gboolean list_dir; /* Whether this entry is used to show + * a directory. */ + char *list_name; /* The string visualized in the list + * view. */ + + /* Private data */ + + gboolean free_original_path; +} FileData; + +#define FR_TYPE_FILE_DATA (file_data_get_type ()) + +GType file_data_get_type (void); +FileData * file_data_new (void); +FileData * file_data_copy (FileData *src); +void file_data_free (FileData *fdata); +void file_data_update_content_type (FileData *fdata); +gboolean file_data_is_dir (FileData *fdata); + +int file_data_compare_by_path (gconstpointer a, + gconstpointer b); +int find_path_in_file_data_array (GPtrArray *array, + const char *path); + +#endif /* FILE_DATA_H */ -- cgit v1.2.1