summaryrefslogtreecommitdiff
path: root/glib/poppler-attachment.cc
diff options
context:
space:
mode:
authorJason Crain <jason@inspiresomeone.us>2020-02-12 19:16:20 -0700
committerAlbert Astals Cid <aacid@kde.org>2020-08-21 12:18:56 +0200
commit92b3edf32a9f7a3617681135290e9d2ba0205ffb (patch)
tree308ed35733e91aa498ade88400e27f2621b173fc /glib/poppler-attachment.cc
parentb13cd962b59e65846e3a9b18eee8a8b999b0291a (diff)
glib: Add accessor functions for PopplerAttachment
Issue #715
Diffstat (limited to 'glib/poppler-attachment.cc')
-rw-r--r--glib/poppler-attachment.cc52
1 files changed, 52 insertions, 0 deletions
diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc
index 9aade86f..3195483b 100644
--- a/glib/poppler-attachment.cc
+++ b/glib/poppler-attachment.cc
@@ -140,6 +140,19 @@ PopplerAttachment *_poppler_attachment_new(FileSpec *emb_file)
}
/**
+ * poppler_attachment_get_checksum:
+ * @attachment: a #PopplerAttachment
+ *
+ * Returns: The attachment's checksum.
+ *
+ * Since: 20.09.0
+ */
+const GString *poppler_attachment_get_checksum(PopplerAttachment *attachment)
+{
+ return attachment->checksum;
+}
+
+/**
* poppler_attachment_get_ctime:
* @attachment: a #PopplerAttachment
*
@@ -154,6 +167,19 @@ GDateTime *poppler_attachment_get_ctime(PopplerAttachment *attachment)
}
/**
+ * poppler_attachment_get_description:
+ * @attachment: a #PopplerAttachment
+ *
+ * Returns: The attachment's descriptive text.
+ *
+ * Since: 20.09.0
+ */
+const gchar *poppler_attachment_get_description(PopplerAttachment *attachment)
+{
+ return attachment->description;
+}
+
+/**
* poppler_attachment_get_mtime:
* @attachment: a #PopplerAttachment
*
@@ -168,6 +194,32 @@ GDateTime *poppler_attachment_get_mtime(PopplerAttachment *attachment)
return GET_PRIVATE(attachment)->mtime;
}
+/**
+ * poppler_attachment_get_name:
+ * @attachment: a #PopplerAttachment
+ *
+ * Returns: The attachment's name.
+ *
+ * Since: 20.09.0
+ */
+const gchar *poppler_attachment_get_name(PopplerAttachment *attachment)
+{
+ return attachment->name;
+}
+
+/**
+ * poppler_attachment_get_size:
+ * @attachment: a #PopplerAttachment
+ *
+ * Returns: The attachment's size.
+ *
+ * Since: 20.09.0
+ */
+gsize poppler_attachment_get_size(PopplerAttachment *attachment)
+{
+ return attachment->size;
+}
+
static gboolean save_helper(const gchar *buf, gsize count, gpointer data, GError **error)
{
FILE *f = (FILE *)data;