2005-05-10 12:48:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2002 Jorn Baayen
|
|
|
|
*
|
|
|
|
* 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, 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
|
2010-03-15 00:25:34 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-05-10 12:48:34 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-01-25 15:08:57 +00:00
|
|
|
#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
|
|
|
|
#error "Only <evince-document.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
Port to gio and drop gnome-vfs dependency. Fixes bug #510401. Based on
2008-01-25 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/comics/comics-document.c: (comics_document_load):
* libdocument/ev-attachment.[ch]: (ev_attachment_finalize),
(ev_attachment_set_property), (ev_attachment_init),
(ev_attachment_save), (ev_attachment_launch_app),
(ev_attachment_open):
* libdocument/ev-document-factory.c: (get_document_from_uri):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_file_get),
(ev_tmp_file_unlink), (ev_tmp_uri_unlink), (ev_xfer_uri_simple),:
* shell/ev-jobs.c:
* shell/ev-password.c: (ev_password_dialog_set_property),
(ev_password_dialog_save_password):
* shell/ev-sidebar-attachments.c:
(ev_sidebar_attachments_drag_data_get):
* shell/ev-window-title.c: (get_filename_from_uri):
* shell/ev-window.c: (ev_window_clear_temp_file),
(ev_window_load_job_cb), (window_open_file_copy_ready_cb),
(ev_window_open_uri), (window_save_file_copy_ready_cb),
(ev_window_save_remote), (ev_window_cmd_save_as), (launch_action),
(launch_external_uri), (image_save_dialog_response_cb),
(attachment_save_dialog_response_cb):
* shell/main.c: (load_files), (load_files_remote), (main):
* thumbnailer/evince-thumbnailer.c: (main):
Port to gio and drop gnome-vfs dependency. Fixes bug
#510401. Based on patch by Cosimo Cecchi.
svn path=/trunk/; revision=2858
2008-01-25 12:30:28 +00:00
|
|
|
#ifndef EV_FILE_HELPERS_H
|
|
|
|
#define EV_FILE_HELPERS_H
|
2005-05-10 12:48:34 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
Port to gio and drop gnome-vfs dependency. Fixes bug #510401. Based on
2008-01-25 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/comics/comics-document.c: (comics_document_load):
* libdocument/ev-attachment.[ch]: (ev_attachment_finalize),
(ev_attachment_set_property), (ev_attachment_init),
(ev_attachment_save), (ev_attachment_launch_app),
(ev_attachment_open):
* libdocument/ev-document-factory.c: (get_document_from_uri):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_file_get),
(ev_tmp_file_unlink), (ev_tmp_uri_unlink), (ev_xfer_uri_simple),:
* shell/ev-jobs.c:
* shell/ev-password.c: (ev_password_dialog_set_property),
(ev_password_dialog_save_password):
* shell/ev-sidebar-attachments.c:
(ev_sidebar_attachments_drag_data_get):
* shell/ev-window-title.c: (get_filename_from_uri):
* shell/ev-window.c: (ev_window_clear_temp_file),
(ev_window_load_job_cb), (window_open_file_copy_ready_cb),
(ev_window_open_uri), (window_save_file_copy_ready_cb),
(ev_window_save_remote), (ev_window_cmd_save_as), (launch_action),
(launch_external_uri), (image_save_dialog_response_cb),
(attachment_save_dialog_response_cb):
* shell/main.c: (load_files), (load_files_remote), (main):
* thumbnailer/evince-thumbnailer.c: (main):
Port to gio and drop gnome-vfs dependency. Fixes bug
#510401. Based on patch by Cosimo Cecchi.
svn path=/trunk/; revision=2858
2008-01-25 12:30:28 +00:00
|
|
|
#include <gio/gio.h>
|
2005-05-10 12:48:34 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
2007-02-03 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/ps/ps-document.c: (ps_document_init), (ps_document_dispose),
(ps_interpreter_start), (document_load), (save_document),
(save_page_list):
* libdocument/ev-file-helpers.[ch]: (ev_file_uncompress):
* libdocument/ev-document-factory.c:
(ev_document_factory_get_from_mime), (get_document_from_uri),
(free_uncompressed_uri), (ev_document_factory_get_document):
* shell/ev-window.c: (ev_window_cmd_file_open_copy_at_dest):
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
svn path=/trunk/; revision=2291
2007-02-03 19:02:28 +00:00
|
|
|
typedef enum {
|
|
|
|
EV_COMPRESSION_NONE,
|
|
|
|
EV_COMPRESSION_BZIP2,
|
2010-12-04 21:09:55 +00:00
|
|
|
EV_COMPRESSION_GZIP,
|
|
|
|
EV_COMPRESSION_LZMA
|
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
2007-02-03 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/ps/ps-document.c: (ps_document_init), (ps_document_dispose),
(ps_interpreter_start), (document_load), (save_document),
(save_page_list):
* libdocument/ev-file-helpers.[ch]: (ev_file_uncompress):
* libdocument/ev-document-factory.c:
(ev_document_factory_get_from_mime), (get_document_from_uri),
(free_uncompressed_uri), (ev_document_factory_get_document):
* shell/ev-window.c: (ev_window_cmd_file_open_copy_at_dest):
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
svn path=/trunk/; revision=2291
2007-02-03 19:02:28 +00:00
|
|
|
} EvCompressionType;
|
|
|
|
|
2009-01-30 18:40:17 +00:00
|
|
|
void _ev_file_helpers_init (void);
|
2005-05-10 12:48:34 +00:00
|
|
|
|
2009-01-30 18:40:17 +00:00
|
|
|
void _ev_file_helpers_shutdown (void);
|
2005-06-07 23:28:54 +00:00
|
|
|
|
2011-07-12 14:23:18 +00:00
|
|
|
int ev_mkstemp (const char *the_template,
|
2009-10-25 15:04:20 +00:00
|
|
|
char **file_name,
|
|
|
|
GError **error);
|
2011-07-12 14:23:18 +00:00
|
|
|
GFile *ev_mkstemp_file (const char *the_template,
|
2009-10-25 15:04:20 +00:00
|
|
|
GError **error);
|
2011-07-12 14:23:18 +00:00
|
|
|
gchar *ev_mkdtemp (const char *the_template,
|
2009-10-25 15:04:20 +00:00
|
|
|
GError **error);
|
Add functions to delete temporary files created by evince in a safe way.
2007-05-25 Carlos Garcia Campos <carlosgc@gnome.org>
* libdocument/ev-image.c: (ev_image_finalize):
* libdocument/ev-document-factory.c: (free_uncompressed_uri):
* libdocument/ev-attachment.c: (ev_attachment_finalize):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_filename_unlink),
(ev_tmp_uri_unlink):
Add functions to delete temporary files created by evince in a safe
way.
* shell/ev-window.c: (ev_window_clear_local_uri),
(open_xfer_update_progress_callback),
(save_xfer_update_progress_callback), (ev_window_save_remote),
(file_save_dialog_response_cb), (ev_window_cmd_save_as),
(image_save_dialog_response_cb), (ev_view_popup_cmd_save_image_as),
(attachment_save_dialog_response_cb),
(ev_attachment_popup_cmd_save_attachment_as):
Allow saving a copy of a document, image or attachment to a remote
location. Fixes bug #440754.
svn path=/trunk/; revision=2478
2007-05-25 16:43:19 +00:00
|
|
|
void ev_tmp_filename_unlink (const gchar *filename);
|
Port to gio and drop gnome-vfs dependency. Fixes bug #510401. Based on
2008-01-25 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/comics/comics-document.c: (comics_document_load):
* libdocument/ev-attachment.[ch]: (ev_attachment_finalize),
(ev_attachment_set_property), (ev_attachment_init),
(ev_attachment_save), (ev_attachment_launch_app),
(ev_attachment_open):
* libdocument/ev-document-factory.c: (get_document_from_uri):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_file_get),
(ev_tmp_file_unlink), (ev_tmp_uri_unlink), (ev_xfer_uri_simple),:
* shell/ev-jobs.c:
* shell/ev-password.c: (ev_password_dialog_set_property),
(ev_password_dialog_save_password):
* shell/ev-sidebar-attachments.c:
(ev_sidebar_attachments_drag_data_get):
* shell/ev-window-title.c: (get_filename_from_uri):
* shell/ev-window.c: (ev_window_clear_temp_file),
(ev_window_load_job_cb), (window_open_file_copy_ready_cb),
(ev_window_open_uri), (window_save_file_copy_ready_cb),
(ev_window_save_remote), (ev_window_cmd_save_as), (launch_action),
(launch_external_uri), (image_save_dialog_response_cb),
(attachment_save_dialog_response_cb):
* shell/main.c: (load_files), (load_files_remote), (main):
* thumbnailer/evince-thumbnailer.c: (main):
Port to gio and drop gnome-vfs dependency. Fixes bug
#510401. Based on patch by Cosimo Cecchi.
svn path=/trunk/; revision=2858
2008-01-25 12:30:28 +00:00
|
|
|
void ev_tmp_file_unlink (GFile *file);
|
Add functions to delete temporary files created by evince in a safe way.
2007-05-25 Carlos Garcia Campos <carlosgc@gnome.org>
* libdocument/ev-image.c: (ev_image_finalize):
* libdocument/ev-document-factory.c: (free_uncompressed_uri):
* libdocument/ev-attachment.c: (ev_attachment_finalize):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_filename_unlink),
(ev_tmp_uri_unlink):
Add functions to delete temporary files created by evince in a safe
way.
* shell/ev-window.c: (ev_window_clear_local_uri),
(open_xfer_update_progress_callback),
(save_xfer_update_progress_callback), (ev_window_save_remote),
(file_save_dialog_response_cb), (ev_window_cmd_save_as),
(image_save_dialog_response_cb), (ev_view_popup_cmd_save_image_as),
(attachment_save_dialog_response_cb),
(ev_attachment_popup_cmd_save_attachment_as):
Allow saving a copy of a document, image or attachment to a remote
location. Fixes bug #440754.
svn path=/trunk/; revision=2478
2007-05-25 16:43:19 +00:00
|
|
|
void ev_tmp_uri_unlink (const gchar *uri);
|
2010-05-04 11:44:31 +00:00
|
|
|
gboolean ev_file_is_temp (GFile *file);
|
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
2007-02-03 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/ps/ps-document.c: (ps_document_init), (ps_document_dispose),
(ps_interpreter_start), (document_load), (save_document),
(save_page_list):
* libdocument/ev-file-helpers.[ch]: (ev_file_uncompress):
* libdocument/ev-document-factory.c:
(ev_document_factory_get_from_mime), (get_document_from_uri),
(free_uncompressed_uri), (ev_document_factory_get_document):
* shell/ev-window.c: (ev_window_cmd_file_open_copy_at_dest):
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
svn path=/trunk/; revision=2291
2007-02-03 19:02:28 +00:00
|
|
|
gboolean ev_xfer_uri_simple (const char *from,
|
|
|
|
const char *to,
|
|
|
|
GError **error);
|
Add functions to delete temporary files created by evince in a safe way.
2007-05-25 Carlos Garcia Campos <carlosgc@gnome.org>
* libdocument/ev-image.c: (ev_image_finalize):
* libdocument/ev-document-factory.c: (free_uncompressed_uri):
* libdocument/ev-attachment.c: (ev_attachment_finalize):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_filename_unlink),
(ev_tmp_uri_unlink):
Add functions to delete temporary files created by evince in a safe
way.
* shell/ev-window.c: (ev_window_clear_local_uri),
(open_xfer_update_progress_callback),
(save_xfer_update_progress_callback), (ev_window_save_remote),
(file_save_dialog_response_cb), (ev_window_cmd_save_as),
(image_save_dialog_response_cb), (ev_view_popup_cmd_save_image_as),
(attachment_save_dialog_response_cb),
(ev_attachment_popup_cmd_save_attachment_as):
Allow saving a copy of a document, image or attachment to a remote
location. Fixes bug #440754.
svn path=/trunk/; revision=2478
2007-05-25 16:43:19 +00:00
|
|
|
|
2008-11-29 12:09:10 +00:00
|
|
|
gchar *ev_file_get_mime_type (const gchar *uri,
|
|
|
|
gboolean fast,
|
|
|
|
GError **error);
|
|
|
|
|
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
2007-02-03 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/ps/ps-document.c: (ps_document_init), (ps_document_dispose),
(ps_interpreter_start), (document_load), (save_document),
(save_page_list):
* libdocument/ev-file-helpers.[ch]: (ev_file_uncompress):
* libdocument/ev-document-factory.c:
(ev_document_factory_get_from_mime), (get_document_from_uri),
(free_uncompressed_uri), (ev_document_factory_get_document):
* shell/ev-window.c: (ev_window_cmd_file_open_copy_at_dest):
Support for PDF, PS and EPS compressed files. Fixes bug #307087.
svn path=/trunk/; revision=2291
2007-02-03 19:02:28 +00:00
|
|
|
gchar *ev_file_uncompress (const gchar *uri,
|
|
|
|
EvCompressionType type,
|
|
|
|
GError **error);
|
2007-02-27 14:56:44 +00:00
|
|
|
gchar *ev_file_compress (const gchar *uri,
|
|
|
|
EvCompressionType type,
|
|
|
|
GError **error);
|
2006-11-15 11:33:09 +00:00
|
|
|
|
2006-01-19 15:12:56 +00:00
|
|
|
|
2005-05-10 12:48:34 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
Port to gio and drop gnome-vfs dependency. Fixes bug #510401. Based on
2008-01-25 Carlos Garcia Campos <carlosgc@gnome.org>
* configure.ac:
* backend/comics/comics-document.c: (comics_document_load):
* libdocument/ev-attachment.[ch]: (ev_attachment_finalize),
(ev_attachment_set_property), (ev_attachment_init),
(ev_attachment_save), (ev_attachment_launch_app),
(ev_attachment_open):
* libdocument/ev-document-factory.c: (get_document_from_uri):
* libdocument/ev-file-helpers.[ch]: (ev_tmp_file_get),
(ev_tmp_file_unlink), (ev_tmp_uri_unlink), (ev_xfer_uri_simple),:
* shell/ev-jobs.c:
* shell/ev-password.c: (ev_password_dialog_set_property),
(ev_password_dialog_save_password):
* shell/ev-sidebar-attachments.c:
(ev_sidebar_attachments_drag_data_get):
* shell/ev-window-title.c: (get_filename_from_uri):
* shell/ev-window.c: (ev_window_clear_temp_file),
(ev_window_load_job_cb), (window_open_file_copy_ready_cb),
(ev_window_open_uri), (window_save_file_copy_ready_cb),
(ev_window_save_remote), (ev_window_cmd_save_as), (launch_action),
(launch_external_uri), (image_save_dialog_response_cb),
(attachment_save_dialog_response_cb):
* shell/main.c: (load_files), (load_files_remote), (main):
* thumbnailer/evince-thumbnailer.c: (main):
Port to gio and drop gnome-vfs dependency. Fixes bug
#510401. Based on patch by Cosimo Cecchi.
svn path=/trunk/; revision=2858
2008-01-25 12:30:28 +00:00
|
|
|
#endif /* EV_FILE_HELPERS_H */
|