use super::*;
use crate::args_stack::{I32Convertible, RetDecode, StackedArgs};
use crate::tls::TlsServerConfig;
use std::borrow::Cow;
#[pink_sidevm_macro::ocall]
pub trait OcallFuncs {
#[ocall(id = 101)]
fn close(resource_id: i32) -> Result<()>;
#[ocall(id = 102, encode_output)]
fn poll(waker_id: i32, resource_id: i32) -> Result<Vec<u8>>;
#[ocall(id = 103)]
fn poll_read(waker_id: i32, resource_id: i32, data: &mut [u8]) -> Result<u32>;
#[ocall(id = 104)]
fn poll_write(waker_id: i32, resource_id: i32, data: &[u8]) -> Result<u32>;
#[ocall(id = 105)]
fn poll_shutdown(waker_id: i32, resource_id: i32) -> Result<()>;
#[ocall(id = 106)]
fn poll_res(waker_id: i32, resource_id: i32) -> Result<i32>;
#[ocall(id = 109)]
fn mark_task_ready(task_id: i32) -> Result<()>;
#[ocall(id = 110)]
fn next_ready_task() -> Result<i32>;
#[ocall(id = 111)]
fn enable_ocall_trace(enable: bool) -> Result<()>;
#[ocall(id = 112, encode_output)]
fn awake_wakers() -> Result<Vec<i32>>;
#[ocall(id = 113)]
fn getrandom(buf: &mut [u8]) -> Result<()>;
#[ocall(id = 201)]
fn create_timer(timeout: i32) -> Result<i32>;
#[ocall(id = 202)]
fn oneshot_send(resource_id: i32, data: &[u8]) -> Result<()>;
#[ocall(id = 210, encode_input)]
fn tcp_listen(addr: Cow<str>, tls_config: Option<TlsServerConfig>) -> Result<i32>;
#[ocall(id = 211, encode_output)]
fn tcp_accept(waker_id: i32, resource_id: i32) -> Result<(i32, String)>;
#[ocall(id = 212)]
fn tcp_accept_no_addr(waker_id: i32, resource_id: i32) -> Result<i32>;
#[ocall(id = 213)]
fn tcp_connect(addr: &str) -> Result<i32>;
#[ocall(id = 220)]
fn log(level: log::Level, message: &str) -> Result<()>;
#[ocall(id = 230, encode_output)]
fn local_cache_get(key: &[u8]) -> Result<Option<Vec<u8>>>;
#[ocall(id = 231)]
fn local_cache_set(key: &[u8], value: &[u8]) -> Result<()>;
#[ocall(id = 232)]
fn local_cache_set_expiration(key: &[u8], expire_after_secs: u64) -> Result<()>;
#[ocall(id = 233, encode_output)]
fn local_cache_remove(key: &[u8]) -> Result<Option<Vec<u8>>>;
}