comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:db63d01a23c6
1 /*
2 * Some image EXIF metadata.
3 */
4 package name.blackcap.exifwasher.exiv2
5
6 import kotlin.collections.Iterable
7 import kotlin.collections.Iterator
8
9 public class ExifData(ptr: Long) {
10 init {
11 Initialize.libraries()
12 }
13
14 private external fun _erase(key: String): Unit
15 private external fun _value(key: String): Value
16 private external fun _keys(): Array<String>
17
18 private val pointer = ptr
19
20 val keys: Array<String>
21 get() {
22 return _keys()
23 }
24
25 fun erase(key: String): Unit = _erase(key)
26
27 public data class Value(val type: String, val value: String)
28
29 operator fun get(key: String): Value = _value(key)
30 }