mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
This adopts the FFI API to use the new Context::new() and Contest::drop() Rust-style APIs while preserving the semantics of the existing FFI API. It introduces a wrapper around the context which keeps an optional reference to the actual context, changing dc_open() and dc_close() to create/destroy the actual reference. This changes the events emitted on closing slightly: they only get emitted when dc_close() was called while the context was open. While dc_close() remains idempotent in that it can still be called safely multiple times, the close events will only occur if the context is actually closed.