1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 3 /* 4 * File-Roller 5 * 6 * Copyright (C) 2001 The Free Software Foundation, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef TYPEDEFS_H 23 #define TYPEDEFS_H 24 25 #include <glib.h> 26 #include <glib-object.h> 27 28 #define MEGABYTE (1024 * 1024) 29 30 #define ADD_FOLDER_OPTIONS_DIR "file-roller/options" 31 32 typedef enum { 33 FR_CLIPBOARD_OP_CUT, 34 FR_CLIPBOARD_OP_COPY 35 } FrClipboardOp; 36 37 typedef enum { /*< skip >*/ 38 FR_WINDOW_SORT_BY_NAME = 0, 39 FR_WINDOW_SORT_BY_SIZE = 1, 40 FR_WINDOW_SORT_BY_TYPE = 2, 41 FR_WINDOW_SORT_BY_TIME = 3, 42 FR_WINDOW_SORT_BY_PATH = 4 43 } FrWindowSortMethod; 44 45 typedef enum { 46 FR_WINDOW_LIST_MODE_FLAT, 47 FR_WINDOW_LIST_MODE_AS_DIR 48 } FrWindowListMode; 49 50 typedef enum { 51 FR_COMPRESSION_VERY_FAST, 52 FR_COMPRESSION_FAST, 53 FR_COMPRESSION_NORMAL, 54 FR_COMPRESSION_MAXIMUM 55 } FrCompression; 56 57 typedef enum { 58 FR_OVERWRITE_YES, 59 FR_OVERWRITE_NO, 60 FR_OVERWRITE_ASK 61 } FrOverwrite; 62 63 typedef enum { /*< skip >*/ 64 FR_ARCHIVE_CAN_DO_NOTHING = 0, 65 FR_ARCHIVE_CAN_READ = 1 << 0, 66 FR_ARCHIVE_CAN_WRITE = 1 << 1, 67 FR_ARCHIVE_CAN_STORE_MANY_FILES = 1 << 2, 68 FR_ARCHIVE_CAN_ENCRYPT = 1 << 3, 69 FR_ARCHIVE_CAN_ENCRYPT_HEADER = 1 << 4, 70 FR_ARCHIVE_CAN_CREATE_VOLUMES = 1 << 5 71 } FrArchiveCap; 72 73 #define FR_ARCHIVE_CAN_READ_WRITE (FR_ARCHIVE_CAN_READ | FR_ARCHIVE_CAN_WRITE) 74 75 typedef guint8 FrArchiveCaps; 76 77 typedef struct { 78 const char *mime_type; 79 FrArchiveCaps current_capabilities; 80 FrArchiveCaps potential_capabilities; 81 } FrMimeTypeCap; 82 83 typedef struct { 84 const char *mime_type; 85 const char *packages; 86 } FrMimeTypePackages; 87 88 typedef struct { 89 int ref; 90 GType type; 91 GPtrArray *caps; /* array of FrMimeTypeCap */ 92 GPtrArray *packages; /* array of FrMimeTypePackages */ 93 } FrRegisteredArchive; 94 95 typedef struct { 96 const char *mime_type; 97 char *default_ext; 98 FrArchiveCaps capabilities; 99 } FrMimeTypeDescription; 100 101 typedef struct { 102 char *ext; 103 const char *mime_type; 104 } FrExtensionType; 105 106 #endif /* TYPEDEFS_H */ 107