summaryrefslogtreecommitdiff
path: root/public/fpdf_doc.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-17 14:51:48 -0700
committerLei Zhang <thestig@chromium.org>2015-09-17 14:51:48 -0700
commite0947b37c012144cefb523a33e548d3fadc211d8 (patch)
treebf7c9a9266863c1f3d79ee2a0c1fab27d7ea5206 /public/fpdf_doc.h
parentb693fc5525f7fdff68245e357ca628acd9d8918c (diff)
downloadpdfium-e0947b37c012144cefb523a33e548d3fadc211d8.tar.xz
Merge to XFA: Implement FPDFAction_GetFilePath().
The API is the same as the Foxit version, except the encoding is specified as UTF-8 instead of local encoding. Also remove CPDF_LWinParam since it's unused. BUG=chromium:517713 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1335373002 . (cherry picked from commit 0b3c8f742613da294f812e2f6e908f4026499f96) (cherry picked from commit a9d4bc541179ec0436adc4b2e18b7fdecc5952dc) (cherry picked from commit 4ffd89ed556e32a6527d0e88952fe20ec1e2f362) Review URL: https://codereview.chromium.org/1345953002 .
Diffstat (limited to 'public/fpdf_doc.h')
-rw-r--r--public/fpdf_doc.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h
index ca16d26627..49793e6b19 100644
--- a/public/fpdf_doc.h
+++ b/public/fpdf_doc.h
@@ -110,10 +110,9 @@ DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK bookmark);
#define PDFACTION_UNSUPPORTED 0 // Unsupported action type.
#define PDFACTION_GOTO 1 // Go to a destination within current document.
#define PDFACTION_REMOTEGOTO 2 // Go to a destination within another document.
-#define PDFACTION_URI \
- 3 // Universal Resource Identifier, including web pages and
- // other Internet based resources.
-#define PDFACTION_LAUNCH 4 // Launch an application or open a file.
+#define PDFACTION_URI 3 // Universal Resource Identifier, including web
+ // pages and other Internet based resources.
+#define PDFACTION_LAUNCH 4 // Launch an application or open a file.
// Function: FPDFAction_GetType
// Get type of an action.
@@ -142,6 +141,25 @@ DLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION action);
DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document,
FPDF_ACTION action);
+// Function: FPDFAction_GetFilePath
+// Get file path of a remote goto action.
+// Parameters:
+// action - Handle to the action. Must be a REMOTEGOTO or
+// LAUNCH action.
+// buffer - A buffer for output the path string. Can be NULL.
+// buflen - The length of the buffer, number of bytes. Can be 0.
+// Return value:
+// Number of bytes the file path consumes, including trailing zero.
+//
+// Comments:
+// The file path is UTF-8 encoded. The return value is the number of
+// bytes required for the buffer, even when there is no buffer
+// specified, or the buffer size is less then required. In this case,
+// the buffer will not be modified.
+//
+DLLEXPORT unsigned long STDCALL
+FPDFAction_GetFilePath(FPDF_ACTION action, void* buffer, unsigned long buflen);
+
// Function: FPDFAction_GetURIPath
// Get URI path of a URI action.
// Parameters:
@@ -154,11 +172,9 @@ DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document,
// Comments:
// The URI path is always encoded in 7-bit ASCII.
//
-// The return value always indicated number of bytes required for the
-// buffer, even when there is
-// no buffer specified, or the buffer size is less then required. In
-// this case, the buffer will not
-// be modified.
+// The return value is the number of bytes required for the buffer,
+// even when there is no buffer specified, or the buffer size is less
+// then required. In this case, the buffer will not be modified.
//
DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document,
FPDF_ACTION action,