diff src/name/blackcap/exifwasher/exiv2/ExifData.kt @ 0:db63d01a23c6

JNI calls and test case (finally!) seem to work.
author David Barts <n5jrn@me.com>
date Tue, 31 Mar 2020 13:24:48 -0700
parents
children 959fa9014deb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/name/blackcap/exifwasher/exiv2/ExifData.kt	Tue Mar 31 13:24:48 2020 -0700
@@ -0,0 +1,30 @@
+/*
+ * Some image EXIF metadata.
+ */
+package name.blackcap.exifwasher.exiv2
+
+import kotlin.collections.Iterable
+import kotlin.collections.Iterator
+
+public class ExifData(ptr: Long) {
+    init {
+        Initialize.libraries()
+    }
+
+    private external fun _erase(key: String): Unit
+    private external fun _value(key: String): Value
+    private external fun _keys(): Array<String>
+
+    private val pointer = ptr
+
+    val keys: Array<String>
+    get() {
+        return _keys()
+    }
+
+    fun erase(key: String): Unit = _erase(key)
+
+    public data class Value(val type: String, val value: String)
+
+    operator fun get(key: String): Value = _value(key)
+}