git » sdk » commit 8cb0d8f

Expose more stuff to C/Swift

author Stephen Paul Weber
2025-04-14 18:19:48 UTC
committer Stephen Paul Weber
2025-04-14 18:19:48 UTC
parent a12daf834befbdd71abda1c780d56a4091e1f64c

Expose more stuff to C/Swift

snikket/persistence/KeyValueStore.hx +3 -0
snikket/persistence/MediaStore.hx +3 -0
snikket/persistence/MediaStoreFS.hx +1 -0
snikket/persistence/Sqlite.hx +0 -1

diff --git a/snikket/persistence/KeyValueStore.hx b/snikket/persistence/KeyValueStore.hx
index 3ee5ad2..7b1a7e5 100644
--- a/snikket/persistence/KeyValueStore.hx
+++ b/snikket/persistence/KeyValueStore.hx
@@ -1,5 +1,8 @@
 package snikket.persistence;
 
+#if cpp
+@:build(HaxeSwiftBridge.expose())
+#end
 interface KeyValueStore {
 	public function get(k: String, callback: (Null<String>)->Void): Void;
 	public function set(k: String, v: Null<String>, callback: ()->Void): Void;
diff --git a/snikket/persistence/MediaStore.hx b/snikket/persistence/MediaStore.hx
index e6faf3c..c0d89bb 100644
--- a/snikket/persistence/MediaStore.hx
+++ b/snikket/persistence/MediaStore.hx
@@ -2,6 +2,9 @@ package snikket.persistence;
 
 import haxe.io.BytesData;
 
+#if cpp
+@:build(HaxeSwiftBridge.expose())
+#end
 interface MediaStore {
 	public function hasMedia(hashAlgorithm:String, hash:BytesData, callback: (has:Bool)->Void):Void;
 	public function removeMedia(hashAlgorithm:String, hash:BytesData):Void;
diff --git a/snikket/persistence/MediaStoreFS.hx b/snikket/persistence/MediaStoreFS.hx
index 25fcc30..0ed17f5 100644
--- a/snikket/persistence/MediaStoreFS.hx
+++ b/snikket/persistence/MediaStoreFS.hx
@@ -11,6 +11,7 @@ import thenshim.Promise;
 
 #if cpp
 @:build(HaxeCBridge.expose())
+@:build(HaxeSwiftBridge.expose())
 #end
 class MediaStoreFS implements MediaStore {
 	private final blobpath: String;
diff --git a/snikket/persistence/Sqlite.hx b/snikket/persistence/Sqlite.hx
index dcd55bd..89a261f 100644
--- a/snikket/persistence/Sqlite.hx
+++ b/snikket/persistence/Sqlite.hx
@@ -605,7 +605,6 @@ class Sqlite implements Persistence implements KeyValueStore {
 		});
 	}
 
-	@HaxeCBridge.noemit
 	public function removeAccount(accountId:String, completely:Bool) {
 		db.exec("DELETE FROM accounts WHERE account_id=?", [accountId]);