Skip to content

Commit

Permalink
updating package and generated code for 0.5.9 release
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj committed Mar 15, 2024
1 parent 9e8cfbf commit 96f1f9f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
46 changes: 23 additions & 23 deletions AutomergeUniffi/automerge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,10 @@ public protocol DocProtocol: AnyObject {

func applyEncodedChangesWithPatches(changes: [UInt8]) throws -> [Patch]

func changes() -> [ChangeHash]

func changeByHash(hash: ChangeHash) -> Change?

func changes() -> [ChangeHash]

func commitWith(msg: String?, time: Int64)

func cursor(obj: ObjId, position: UInt64) throws -> Cursor
Expand Down Expand Up @@ -525,7 +525,6 @@ public protocol DocProtocol: AnyObject {
func values(obj: ObjId) throws -> [Value]

func valuesAt(obj: ObjId, heads: [ChangeHash]) throws -> [Value]

}

public class Doc:
Expand Down Expand Up @@ -607,32 +606,45 @@ public class Doc:
)
}

public func changes() -> [ChangeHash] {
try! FfiConverterSequenceTypeChangeHash.lift(
public func changeByHash(hash: ChangeHash) -> Change? {
try! FfiConverterOptionTypeChange.lift(
try!
rustCall {
uniffi_uniffi_automerge_fn_method_doc_changes(
uniffi_uniffi_automerge_fn_method_doc_change_by_hash(
self.uniffiClonePointer(),

FfiConverterTypeChangeHash.lower(hash),
$0
)
}
)
}

public func changeByHash(hash: ChangeHash) -> Change? {
try! FfiConverterOptionTypeChange.lift(
public func changes() -> [ChangeHash] {
try! FfiConverterSequenceTypeChangeHash.lift(
try!
rustCall {
uniffi_uniffi_automerge_fn_method_doc_change_by_hash(
uniffi_uniffi_automerge_fn_method_doc_changes(
self.uniffiClonePointer(),

FfiConverterTypeChangeHash.lower(hash),
$0
)
}
)
}

public func commitWith(msg: String?, time: Int64) {
try!
rustCall {
uniffi_uniffi_automerge_fn_method_doc_commit_with(
self.uniffiClonePointer(),

FfiConverterOptionString.lower(msg),
FfiConverterInt64.lower(time),
$0
)
}
}

public func cursor(obj: ObjId, position: UInt64) throws -> Cursor {
try FfiConverterTypeCursor.lift(
rustCallWithError(FfiConverterTypeDocError.lift) {
Expand Down Expand Up @@ -1238,18 +1250,6 @@ public class Doc:
}
)
}
public func commitWith(msg: String?, time: Int64) {
try!
rustCall {
uniffi_uniffi_automerge_fn_method_doc_commit_with(
self.uniffiClonePointer(),

FfiConverterOptionString.lower(msg),
FfiConverterInt64.lower(time),
$0
)
}
}

public func save() -> [UInt8] {
try! FfiConverterSequenceUInt8.lift(
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ if ProcessInfo.processInfo.environment["LOCAL_BUILD"] != nil {
} else {
FFIbinaryTarget = .binaryTarget(
name: "automergeFFI",
url: "https://github.com/automerge/automerge-swift/releases/download/0.5.8/automergeFFI.xcframework.zip",
checksum: "4ba300561b23f403eaedcc4a473fc761d6dd8f7144b838e4f6a38e9d21a11077"
url: "https://github.com/automerge/automerge-swift/releases/download/0.5.9/automergeFFI.xcframework.zip",
checksum: "49aac4ec08887967fd65be48e0deaafcf96130a842cdfb32d3527b6de1f3382d"
)
}

Expand Down

0 comments on commit 96f1f9f

Please sign in to comment.