Przeglądaj źródła

implement wrapper method for dc_accounts_get_all()

cyberta 4 lat temu
rodzic
commit
78c6a12329
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      DcCore/DcCore/DC/Wrapper.swift

+ 4 - 0
DcCore/DcCore/DC/Wrapper.swift

@@ -30,6 +30,10 @@ public class DcAccounts {
         return Int(dc_accounts_migrate_account(accountsPointer, dbLocation))
     }
 
+    public func getAll() -> [Int] {
+        let cAccounts = dc_accounts_get_all(accountsPointer)
+        return DcUtils.copyAndFreeArray(inputArray: cAccounts)
+    }
 }
 
 public class DcContext {