summaryrefslogtreecommitdiff
path: root/src/fr-init.h
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-20 15:57:29 +0100
committerinfirit <[email protected]>2014-11-22 21:32:47 +0100
commit0c3107bbc42745c2e45530a8d43ea7fccd881e6f (patch)
treee581355d77464632e50e2de673a62a795810b90b /src/fr-init.h
parent02cd7f18c806194eabd1dee69d28b5e2f2b51344 (diff)
downloadengrampa-0c3107bbc42745c2e45530a8d43ea7fccd881e6f.tar.bz2
engrampa-0c3107bbc42745c2e45530a8d43ea7fccd881e6f.tar.xz
Added a D-BUS service to create and extract archives.
Initial commits from FR: f998fd8e33a08d686a1071db87d21f4a83963d99 4078d1a9e5ddae3357302791432fc61d82ff37e4 58c55b06f30014326f27bdf94c406ceee0897731 Improvements and fixes from FR: D-Bus service: added GetSupportedTypes method ace4f31c586641fcf7ad1de165cd7f27b5a371c1 1399b9a84b0d4f4a5015066b0d7cec7e048d59dc From: Paolo Bacchilega <[email protected]>
Diffstat (limited to 'src/fr-init.h')
-rw-r--r--src/fr-init.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/fr-init.h b/src/fr-init.h
new file mode 100644
index 0000000..b89e9c8
--- /dev/null
+++ b/src/fr-init.h
@@ -0,0 +1,74 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ * Engrampa
+ *
+ * Copyright (C) 2010 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FR_INIT_H
+#define FR_INIT_H
+
+#include "preferences.h"
+#include "fr-process.h"
+#include "fr-window.h"
+
+typedef struct {
+ FrWindow *window;
+ FrProcess *process;
+ char *filename;
+ char *e_filename;
+ char *temp_dir;
+} ViewerData;
+
+typedef struct {
+ FrWindow *window;
+ FrProcess *process;
+ char *command;
+ GAppInfo *app;
+ GList *file_list;
+ char *temp_dir;
+} CommandData;
+
+extern GList *WindowList;
+extern GList *CommandList;
+extern gint ForceDirectoryCreation;
+extern GHashTable *ProgramsCache;
+extern GPtrArray *Registered_Commands;
+extern FrMimeTypeDescription mime_type_desc[];
+extern FrExtensionType file_ext_type[];
+extern int single_file_save_type[]; /* File types that can be saved when
+ * a single file is selected.
+ * Includes single file compressors
+ * such as gzip, compress, etc. */
+extern int save_type[]; /* File types that can be saved. */
+extern int open_type[]; /* File types that can be opened. */
+extern int create_type[]; /* File types that can be created. */
+
+GType get_command_type_from_mime_type (const char *mime_type,
+ FrCommandCaps requested_capabilities);
+GType get_preferred_command_for_mime_type (const char *mime_type,
+ FrCommandCaps requested_capabilities);
+void update_registered_commands_capabilities (void);
+const char * get_mime_type_from_extension (const char *ext);
+const char * get_archive_filename_extension (const char *uri);
+int get_mime_type_index (const char *mime_type);
+void sort_mime_types_by_extension (int *a);
+void sort_mime_types_by_description (int *a);
+void initialize_data (void);
+void release_data (void);
+
+#endif /* FR_INIT_H */