From 293d1736911fd5e77b8cec305168b35b2420c612 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 12 Aug 2016 15:21:16 +0200 Subject: core: Add gpgme_data_set_flag to add more meta data to data objects. * src/gpgme.h.in (gpgme_data_set_flag): New public function. * src/data.c (gpgme_data_set_flag): New. (_gpgme_data_get_size_hint): New. * src/data.h (strucy gpgme_data): Add field 'size_hint'. * src/gpgme.def, src/libgpgme.vers: Add new function. * src/conversion.c (_gpgme_string_to_off): New. Signed-off-by: Werner Koch --- src/util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 5a0f7906..a3425f09 100644 --- a/src/util.h +++ b/src/util.h @@ -134,6 +134,9 @@ int _gpgme_split_fields (char *string, char **array, int arraysize); * trailing garbage. */ gpgme_error_t _gpgme_strtoul_field (const char *string, unsigned long *result); +/* Convert STRING into an offset value similar to atoi(). */ +gpgme_off_t _gpgme_string_to_off (const char *string); + /* Parse the string TIMESTAMP into a time_t. The string may either be seconds since Epoch or in the ISO 8601 format like "20390815T143012". Returns 0 for an empty string or seconds since -- cgit v1.2.3