1.1.3
by Sebastien Bacher
Import upstream version 0.5.1 |
1 |
/* poppler-attachment.h: glib interface to poppler
|
2 |
* Copyright (C) 2004, Red Hat, Inc.
|
|
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
|
|
1.1.10
by Ondřej Surý
Import upstream version 0.6.2 |
16 |
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
1.1.3
by Sebastien Bacher
Import upstream version 0.5.1 |
17 |
*/
|
18 |
||
19 |
#ifndef __POPPLER_ATTACHMENT_H__
|
|
20 |
#define __POPPLER_ATTACHMENT_H__
|
|
21 |
||
1.1.8
by Martin Pitt
Import upstream version 0.5.91 |
22 |
#include <glib.h> |
1.1.3
by Sebastien Bacher
Import upstream version 0.5.1 |
23 |
#include <glib-object.h> |
24 |
||
25 |
#include "poppler.h" |
|
26 |
||
27 |
G_BEGIN_DECLS
|
|
28 |
||
29 |
||
30 |
#define POPPLER_TYPE_ATTACHMENT (poppler_attachment_get_type ())
|
|
31 |
#define POPPLER_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachment))
|
|
32 |
#define POPPLER_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ATTACHMENT))
|
|
33 |
||
34 |
||
1.5.3
by Jonathan Riddell
Import upstream version 0.16.0 |
35 |
/**
|
36 |
* PopplerAttachmentSaveFunc:
|
|
1.7.3
by Sebastien Bacher
Import upstream version 0.18.4 |
37 |
* @buf: (array length=count) (element-type guint8): buffer containing
|
38 |
* bytes to be written.
|
|
1.5.3
by Jonathan Riddell
Import upstream version 0.16.0 |
39 |
* @count: number of bytes in @buf.
|
1.7.3
by Sebastien Bacher
Import upstream version 0.18.4 |
40 |
* @data: (closure): user data passed to poppler_attachment_save_to_callback()
|
41 |
* @error: GError to set on error, or %NULL
|
|
1.5.3
by Jonathan Riddell
Import upstream version 0.16.0 |
42 |
*
|
43 |
* Specifies the type of the function passed to
|
|
44 |
* poppler_attachment_save_to_callback(). It is called once for each block of
|
|
45 |
* bytes that is "written" by poppler_attachment_save_to_callback(). If
|
|
46 |
* successful it should return %TRUE. If an error occurs it should set
|
|
47 |
* @error and return %FALSE, in which case poppler_attachment_save_to_callback()
|
|
48 |
* will fail with the same error.
|
|
49 |
*
|
|
1.7.10
by Dmitry Shachnev
Import upstream version 0.22.4 |
50 |
* Returns: %TRUE if successful, %FALSE (with @error set) if failed.
|
1.5.3
by Jonathan Riddell
Import upstream version 0.16.0 |
51 |
*/
|
1.1.3
by Sebastien Bacher
Import upstream version 0.5.1 |
52 |
typedef gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf, |
53 |
gsize count, |
|
54 |
gpointer data, |
|
55 |
GError **error); |
|
56 |
||
1.1.8
by Martin Pitt
Import upstream version 0.5.91 |
57 |
struct _PopplerAttachment |
1.1.3
by Sebastien Bacher
Import upstream version 0.5.1 |
58 |
{
|
59 |
GObject parent; |
|
60 |
||
1.1.8
by Martin Pitt
Import upstream version 0.5.91 |
61 |
gchar *name; |
62 |
gchar *description; |
|
63 |
gsize size; |
|
64 |
GTime mtime; |
|
65 |
GTime ctime; |
|
66 |
GString *checksum; |
|
67 |
};
|
|
1.1.3
by Sebastien Bacher
Import upstream version 0.5.1 |
68 |
|
69 |
typedef struct _PopplerAttachmentClass |
|
70 |
{
|
|
71 |
GObjectClass parent_class; |
|
72 |
} PopplerAttachmentClass; |
|
73 |
||
74 |
||
75 |
GType poppler_attachment_get_type (void) G_GNUC_CONST; |
|
76 |
gboolean poppler_attachment_save (PopplerAttachment *attachment, |
|
77 |
const char *filename, |
|
78 |
GError **error); |
|
79 |
gboolean poppler_attachment_save_to_callback (PopplerAttachment *attachment, |
|
80 |
PopplerAttachmentSaveFunc save_func, |
|
81 |
gpointer user_data, |
|
82 |
GError **error); |
|
83 |
||
84 |
||
85 |
G_END_DECLS
|
|
86 |
||
87 |
#endif /* __POPPLER_ATTACHMENT_H__ */ |