mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-04-02 01:23:11 +00:00
Merge a283d91e895b1a2f4029d4e20ef8211321d8791a into 8cddd9ddcfb446deeff96fd5a68d6e4b14927d9f
This commit is contained in:
commit
828edff02b
@ -15,29 +15,29 @@ type ContextHandle* = pointer
|
|||||||
|
|
||||||
type
|
type
|
||||||
## Slice for passing byte arrays to safer_ffi functions
|
## Slice for passing byte arrays to safer_ffi functions
|
||||||
SliceUint8* = object
|
SliceUint8* {.bycopy.} = object
|
||||||
`ptr`*: ptr uint8
|
`ptr`*: ptr uint8
|
||||||
len*: csize_t
|
len*: csize_t
|
||||||
|
|
||||||
## Vector type returned by safer_ffi functions (must be freed)
|
## Vector type returned by safer_ffi functions (must be freed)
|
||||||
VecUint8* = object
|
VecUint8* {.bycopy.} = object
|
||||||
`ptr`*: ptr uint8
|
`ptr`*: ptr uint8
|
||||||
len*: csize_t
|
len*: csize_t
|
||||||
cap*: csize_t
|
cap*: csize_t
|
||||||
|
|
||||||
## repr_c::String type from safer_ffi
|
## repr_c::String type from safer_ffi
|
||||||
ReprCString* = object
|
ReprCString* {.bycopy.} = object
|
||||||
`ptr`*: ptr char
|
`ptr`*: ptr char
|
||||||
len*: csize_t
|
len*: csize_t
|
||||||
cap*: csize_t
|
cap*: csize_t
|
||||||
|
|
||||||
## Payload structure for FFI (matches Rust Payload struct)
|
## Payload structure for FFI (matches Rust Payload struct)
|
||||||
Payload* = object
|
Payload* {.bycopy.} = object
|
||||||
address*: ReprCString
|
address*: ReprCString
|
||||||
data*: VecUint8
|
data*: VecUint8
|
||||||
|
|
||||||
## Vector of Payloads returned by safer_ffi functions
|
## Vector of Payloads returned by safer_ffi functions
|
||||||
VecPayload* = object
|
VecPayload* {.bycopy.} = object
|
||||||
`ptr`*: ptr Payload
|
`ptr`*: ptr Payload
|
||||||
len*: csize_t
|
len*: csize_t
|
||||||
cap*: csize_t
|
cap*: csize_t
|
||||||
@ -50,19 +50,19 @@ type
|
|||||||
|
|
||||||
## Result structure for create_intro_bundle
|
## Result structure for create_intro_bundle
|
||||||
## error_code is 0 on success, negative on error (see ErrorCode)
|
## error_code is 0 on success, negative on error (see ErrorCode)
|
||||||
CreateIntroResult* = object
|
CreateIntroResult* {.bycopy.} = object
|
||||||
error_code*: int32
|
error_code*: int32
|
||||||
intro_bytes*: VecUint8
|
intro_bytes*: VecUint8
|
||||||
|
|
||||||
## Result structure for send_content
|
## Result structure for send_content
|
||||||
## error_code is 0 on success, negative on error (see ErrorCode)
|
## error_code is 0 on success, negative on error (see ErrorCode)
|
||||||
SendContentResult* = object
|
SendContentResult* {.bycopy.} = object
|
||||||
error_code*: int32
|
error_code*: int32
|
||||||
payloads*: VecPayload
|
payloads*: VecPayload
|
||||||
|
|
||||||
## Result structure for handle_payload
|
## Result structure for handle_payload
|
||||||
## error_code is 0 on success, negative on error (see ErrorCode)
|
## error_code is 0 on success, negative on error (see ErrorCode)
|
||||||
HandlePayloadResult* = object
|
HandlePayloadResult* {.bycopy.} = object
|
||||||
error_code*: int32
|
error_code*: int32
|
||||||
convo_id*: ReprCString
|
convo_id*: ReprCString
|
||||||
content*: VecUint8
|
content*: VecUint8
|
||||||
@ -70,7 +70,7 @@ type
|
|||||||
|
|
||||||
## Result from create_new_private_convo
|
## Result from create_new_private_convo
|
||||||
## error_code is 0 on success, negative on error (see ErrorCode)
|
## error_code is 0 on success, negative on error (see ErrorCode)
|
||||||
NewConvoResult* = object
|
NewConvoResult* {.bycopy.} = object
|
||||||
error_code*: int32
|
error_code*: int32
|
||||||
convo_id*: ReprCString
|
convo_id*: ReprCString
|
||||||
payloads*: VecPayload
|
payloads*: VecPayload
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user