LiveKit C++ Client SDK v1.1.0
Real-time audio/video/data SDK for C++
Loading...
Searching...
No Matches
livekit::FfiHandle Class Reference

RAII wrapper for an FFI handle (uintptr_t) coming from Rust. More...

#include <ffi_handle.h>

Public Member Functions

 FfiHandle (uintptr_t h=0) noexcept
 
 FfiHandle (const FfiHandle &)=delete
 
FfiHandleoperator= (const FfiHandle &)=delete
 
 FfiHandle (FfiHandle &&other) noexcept
 
FfiHandleoperator= (FfiHandle &&other) noexcept
 
void reset (uintptr_t new_handle=0) noexcept
 Replace the current handle with a new one, dropping the old if needed.
 
uintptr_t release () noexcept
 Release ownership of the handle without dropping it.
 
bool valid () const noexcept
 Whether the handle is valid (non-zero)
 
uintptr_t get () const noexcept
 Get the raw handle value.
 
 operator bool () const noexcept
 Allow if (handle) syntax.
 

Detailed Description

RAII wrapper for an FFI handle (uintptr_t) coming from Rust.

Ensures that the handle is automatically released via livekit_ffi_drop_handle() when the object goes out of scope.


The documentation for this class was generated from the following file: