summaryrefslogtreecommitdiff
path: root/public/fpdf_attachment.h
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-07-25 18:11:27 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-27 13:52:39 +0000
commitf63e8133d7a767c6f162e700056ae8ba8512820d (patch)
treef0a8aab3dfb06b5c121d4f3350bf97aeceab4d7e /public/fpdf_attachment.h
parentf9d60598992f3d9ce2f4b5860a7835fa44d55c88 (diff)
downloadpdfium-f63e8133d7a767c6f162e700056ae8ba8512820d.tar.xz
Added FPDFDoc_DeleteAttachment()
Added an API for deleting an attachment and an embedder test for it. Bug=pdfium:174 Change-Id: I97a1367a197bceb96ecef55c36b1599beccd95a6 Reviewed-on: https://pdfium-review.googlesource.com/8932 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public/fpdf_attachment.h')
-rw-r--r--public/fpdf_attachment.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/public/fpdf_attachment.h b/public/fpdf_attachment.h
index e604d59264..a5a84658a2 100644
--- a/public/fpdf_attachment.h
+++ b/public/fpdf_attachment.h
@@ -45,6 +45,19 @@ DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_GetAttachment(FPDF_DOCUMENT document,
int index);
// Experimental API.
+// Delete the embedded attachment at |index| in |document|. Note that this does
+// not remove the attachment data from the PDF file; it simply removes the
+// file's entry in the embedded files name tree so that it does not appear in
+// the attachment list. This behavior may change in the future.
+//
+// document - handle to a document.
+// index - the index of the embedded file to be deleted.
+//
+// Returns true if successful.
+DLLEXPORT FPDF_BOOL STDCALL FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document,
+ int index);
+
+// Experimental API.
// Get the name of the |attachment| file. |buffer| is only modified if |buflen|
// is longer than the length of the file name. On errors, |buffer| is unmodified
// and the returned length is 0.