Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/Makefile.am2
-rw-r--r--backend/ev-document.c23
-rw-r--r--backend/ev-document.h4
3 files changed, 29 insertions, 0 deletions
diff --git a/backend/Makefile.am b/backend/Makefile.am
index 97f9910..c2adf47 100644
--- a/backend/Makefile.am
+++ b/backend/Makefile.am
@@ -17,6 +17,8 @@ noinst_LTLIBRARIES = libevbackend.la
libevbackend_la_SOURCES= \
ev-async-renderer.c \
ev-async-renderer.h \
+ ev-attachment.c \
+ ev-attachment.h \
ev-backend-marshal.c \
ev-link.c \
ev-link.h \
diff --git a/backend/ev-document.c b/backend/ev-document.c
index a800866..10f1d00 100644
--- a/backend/ev-document.c
+++ b/backend/ev-document.c
@@ -200,7 +200,30 @@ ev_document_get_links (EvDocument *document,
return retval;
}
+gboolean
+ev_document_has_attachments (EvDocument *document)
+{
+ EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
+
+ if (iface->has_attachments == NULL)
+ return FALSE;
+
+ return iface->has_attachments (document);
+}
+
+GList *
+ev_document_get_attachments (EvDocument *document)
+{
+ EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
+ GList *retval;
+ LOG ("ev_document_get_attachments");
+ if (iface->get_attachments == NULL)
+ return NULL;
+ retval = iface->get_attachments (document);
+
+ return retval;
+}
GdkPixbuf *
ev_document_render_pixbuf (EvDocument *document,
diff --git a/backend/ev-document.h b/backend/ev-document.h
index 2cea42f..ce7714c 100644
--- a/backend/ev-document.h
+++ b/backend/ev-document.h
@@ -92,6 +92,8 @@ struct _EvDocumentIface
EvRectangle *rect);
GList * (* get_links) (EvDocument *document,
int page);
+ gboolean (* has_attachments) (EvDocument *document);
+ GList * (* get_attachments) (EvDocument *document);
GdkPixbuf * (* render_pixbuf) (EvDocument *document,
EvRenderContext *rc);
EvDocumentInfo * (* get_info) (EvDocument *document);
@@ -123,6 +125,8 @@ char *ev_document_get_text (EvDocument *document,
EvRectangle *rect);
GList *ev_document_get_links (EvDocument *document,
int page);
+gboolean ev_document_has_attachments (EvDocument *document);
+GList *ev_document_get_attachments (EvDocument *document);
GdkPixbuf *ev_document_render_pixbuf (EvDocument *document,
EvRenderContext *rc);