~elementary-os/ubuntu-package-imports/evince-vivid

1 by RabbitBot
Initial import, version 3.14.2-0ubuntu2
1
/*
2
 *  Copyright (C) 2002 Jorn Baayen
3
 *
4
 *  This program is free software; you can redistribute it and/or modify
5
 *  it under the terms of the GNU General Public License as published by
6
 *  the Free Software Foundation; either version 2, or (at your option)
7
 *  any later version.
8
 *
9
 *  This program is distributed in the hope that it will be useful,
10
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 *  GNU General Public License for more details.
13
 *
14
 *  You should have received a copy of the GNU General Public License
15
 *  along with this program; if not, write to the Free Software
16
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
 *
18
 */
19
20
#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
21
#error "Only <evince-document.h> can be included directly."
22
#endif
23
24
#ifndef EV_FILE_HELPERS_H
25
#define EV_FILE_HELPERS_H
26
27
#include <glib.h>
28
#include <gio/gio.h>
29
30
G_BEGIN_DECLS
31
32
typedef enum {
33
	EV_COMPRESSION_NONE,
34
	EV_COMPRESSION_BZIP2,
35
	EV_COMPRESSION_GZIP,
36
        EV_COMPRESSION_LZMA
37
} EvCompressionType;
38
39
void        _ev_file_helpers_init     (void);
40
41
void        _ev_file_helpers_shutdown (void);
42
43
int          ev_mkstemp               (const char        *tmpl,
44
                                       char             **file_name,
45
                                       GError           **error);
46
GFile       *ev_mkstemp_file          (const char        *tmpl,
47
                                       GError           **error);
48
gchar       *ev_mkdtemp               (const char        *tmpl,
49
                                       GError           **error);
50
void         ev_tmp_filename_unlink   (const gchar       *filename);
51
void         ev_tmp_file_unlink       (GFile             *file);
52
void         ev_tmp_uri_unlink        (const gchar       *uri);
53
gboolean     ev_file_is_temp          (GFile             *file);
54
gboolean     ev_xfer_uri_simple       (const char        *from,
55
				       const char        *to,
56
				       GError           **error);
57
gboolean     ev_file_copy_metadata    (const char        *from,
58
                                       const char        *to,
59
                                       GError           **error);
60
61
gchar       *ev_file_get_mime_type    (const gchar       *uri,
62
				       gboolean           fast,
63
				       GError           **error);
64
65
gchar       *ev_file_uncompress       (const gchar       *uri,
66
				       EvCompressionType  type,
67
				       GError           **error);
68
gchar       *ev_file_compress         (const gchar       *uri,
69
				       EvCompressionType  type,
70
				       GError           **error);
71
72
73
G_END_DECLS
74
75
#endif /* EV_FILE_HELPERS_H */