From b8e7359d93f7f68f410391b39dde37eb1067a92a Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 25 Jul 2014 17:26:26 +0200 Subject: Wrap ExifData in a EogExifData boxed type This is for better interaction with bindings Based on eog commit b88d3713fe45a4bab1bd24ac8ff60551c5c31d49 From Claudio Saavedra --- src/eom-exif-util.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'src/eom-exif-util.c') diff --git a/src/eom-exif-util.c b/src/eom-exif-util.c index fedefcd..7fa0e99 100644 --- a/src/eom-exif-util.c +++ b/src/eom-exif-util.c @@ -185,7 +185,7 @@ eom_exif_util_format_date (const gchar *date) } /** - * eom_exif_util_get_value: + * eom_exif_data_get_value: * @exif_data: pointer to an ExifData struct * @tag_id: the requested tag's id. See exif-tag.h * from the libexif package for possible values (e.g. %EXIF_TAG_EXPOSURE_MODE). @@ -199,7 +199,7 @@ eom_exif_util_format_date (const gchar *date) * Returns: a pointer to @buffer. */ const gchar * -eom_exif_util_get_value (ExifData *exif_data, gint tag_id, gchar *buffer, guint buf_size) +eom_exif_data_get_value (EomExifData *exif_data, gint tag_id, gchar *buffer, guint buf_size) { ExifEntry *exif_entry; const gchar *exif_value; @@ -212,3 +212,29 @@ eom_exif_util_get_value (ExifData *exif_data, gint tag_id, gchar *buffer, guint return exif_value; } + +EomExifData * +eom_exif_data_copy (EomExifData *data) +{ + exif_data_ref (data); + + return data; +} + +void +eom_exif_data_free (EomExifData *data) +{ + exif_data_unref (data); +} + +GType +eom_exif_data_get_type (void) +{ + static GType our_type = 0; + + if (our_type == 0) + our_type = g_boxed_type_register_static ("EomExifData", + (GBoxedCopyFunc) eom_exif_data_copy, + (GBoxedFreeFunc) eom_exif_data_free); + return our_type; +} -- cgit v1.2.1