Jane Liu | 53aafa9 | 2017-07-12 19:55:02 -0400 | [diff] [blame^] | 1 | // Copyright 2017 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef PUBLIC_FPDF_ATTACHMENT_H_ |
| 6 | #define PUBLIC_FPDF_ATTACHMENT_H_ |
| 7 | |
| 8 | // NOLINTNEXTLINE(build/include) |
| 9 | #include "fpdfview.h" |
| 10 | |
| 11 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif // __cplusplus |
| 14 | |
| 15 | // Experimental API. |
| 16 | // Get the number of embedded files in |document|. |
| 17 | // |
| 18 | // document - handle to a document. |
| 19 | // |
| 20 | // Returns the number of embedded files in |document|. |
| 21 | DLLEXPORT int STDCALL FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document); |
| 22 | |
| 23 | // Experimental API. |
| 24 | // Get the name of the embedded file at |index| in |document|. |buffer| is |
| 25 | // only modified if |buflen| is longer than the length of the file name. On |
| 26 | // errors, |buffer| is unmodified and the returned length is 0. |
| 27 | // |
| 28 | // document - handle to a document. |
| 29 | // index - the index of the requested embedded file. |
| 30 | // buffer - buffer for holding the file name, encoded in UTF16-LE. |
| 31 | // buflen - length of the buffer. |
| 32 | // |
| 33 | // Returns the length of the file name. |
| 34 | DLLEXPORT unsigned long STDCALL |
| 35 | FPDFDoc_GetAttachmentName(FPDF_DOCUMENT document, |
| 36 | int index, |
| 37 | void* buffer, |
| 38 | unsigned long buflen); |
| 39 | |
| 40 | #ifdef __cplusplus |
| 41 | } // extern "C" |
| 42 | #endif // __cplusplus |
| 43 | |
| 44 | #endif // PUBLIC_FPDF_ATTACHMENT_H_ |