From 2ed5f49a795d91faddc723bbbb561e485094e23a Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 5 Feb 2022 20:08:58 +0000 Subject: C-API expose QPDFObjectHandle::getValueAs... accessors --- include/qpdf/qpdf-c.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'include') diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h index 982f0c90..c4e88de8 100644 --- a/include/qpdf/qpdf-c.h +++ b/include/qpdf/qpdf-c.h @@ -707,26 +707,50 @@ extern "C" { QPDF_DLL QPDF_BOOL qpdf_oh_get_bool_value(qpdf_data qpdf, qpdf_oh oh); + QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_bool( + qpdf_data qpdf, qpdf_oh oh, QPDF_BOOL* value); QPDF_DLL long long qpdf_oh_get_int_value(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_longlong( + qpdf_data qpdf, qpdf_oh oh, long long* value); + QPDF_DLL int qpdf_oh_get_int_value_as_int(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_int( + qpdf_data qpdf, qpdf_oh oh, int* value); + QPDF_DLL unsigned long long qpdf_oh_get_uint_value(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_ulonglong( + qpdf_data qpdf, qpdf_oh oh, unsigned long long* value); + QPDF_DLL unsigned int qpdf_oh_get_uint_value_as_uint(qpdf_data qpdf, qpdf_oh oh); + QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_uint( + qpdf_data qpdf, qpdf_oh oh, unsigned int* value); QPDF_DLL char const* qpdf_oh_get_real_value(qpdf_data qpdf, qpdf_oh oh); + QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_real( + qpdf_data qpdf, qpdf_oh oh, char const** value, size_t* length); QPDF_DLL QPDF_BOOL qpdf_oh_is_number(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL double qpdf_oh_get_numeric_value(qpdf_data qpdf, qpdf_oh oh); + QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_number( + qpdf_data qpdf, qpdf_oh oh, double* value); QPDF_DLL char const* qpdf_oh_get_name(qpdf_data qpdf, qpdf_oh oh); + QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_name( + qpdf_data qpdf, qpdf_oh oh, char const** value, size_t* length); /* Return the length of the last string returned. This enables you * to retrieve the entire string for cases in which a char* @@ -747,8 +771,14 @@ extern "C" { QPDF_DLL char const* qpdf_oh_get_string_value(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_string( + qpdf_data qpdf, qpdf_oh oh, char const** value, size_t* length); + QPDF_DLL char const* qpdf_oh_get_utf8_value(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL + QPDF_BOOL qpdf_oh_get_value_as_utf8( + qpdf_data qpdf, qpdf_oh oh, char const** value, size_t* length); + QPDF_DLL char const* qpdf_oh_get_binary_string_value( qpdf_data qpdf, qpdf_oh oh, size_t* length); QPDF_DLL -- cgit v1.2.3-54-g00ecf