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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
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,
|
|
|
|
EV_COMPRESSION_GZIP
|
|
|
|
} EvCompressionType;
|
|
|
|
|
2006-11-15 11:33:09 +00:00
|
|
|
const gchar *ev_tmp_dir (void);
|
2005-05-10 12:48:34 +00:00
|
|
|
|
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
|
|
|
|
Move ev_dot_dir() from libdocument to shell, since it shouldn't be public
* libdocument/ev-file-helpers.c: (ev_dir_ensure_exists),
(ev_tmp_dir), (ev_file_helpers_init), (ev_file_helpers_shutdown):
* libdocument/ev-file-helpers.h:
* shell/ev-application.c: (ev_application_shutdown),
(ev_application_init), (ev_application_screensaver_disable),
(ev_application_save_print_settings),
(ev_application_set_page_setup):
* shell/ev-application.h:
* shell/ev-metadata-manager.c: (load_values),
(ev_metadata_manager_save): Move ev_dot_dir() from libdocument to
shell, since it shouldn't be public API. Bug #569120.
* libdocument/ev-file-helpers.c: (ev_tmp_filename): Use
g_get_prgname() instead of hardcoding "evince" for the tmpdir name.
svn path=/trunk/; revision=3383
2009-01-26 18:29:31 +00:00
|
|
|
gboolean ev_dir_ensure_exists (const gchar *dir,
|
|
|
|
int mode);
|
|
|
|
|
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
|
|
|
GFile *ev_tmp_file_get (const gchar *prefix);
|
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_tmp_filename (const char *prefix);
|
2009-05-17 13:22:31 +00:00
|
|
|
gchar *ev_tmp_directory (const char *prefix);
|
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);
|
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 */
|