oc_wasm_sys/
component.rs

1#[link(wasm_import_module = "component")]
2extern "C" {
3	#[link_name = "listStart"]
4	pub fn list_start(type_pointer: *const u8, length: usize) -> i32;
5
6	#[link_name = "listNext"]
7	pub fn list_next(buffer: *mut u8) -> i32;
8
9	#[link_name = "listType"]
10	pub fn list_type(buffer: *mut u8, length: usize) -> isize;
11
12	#[link_name = "type"]
13	pub fn component_type(address: *const u8, buffer: *mut u8, buffer_length: usize) -> isize;
14
15	pub fn slot(address: *const u8) -> i32;
16
17	#[link_name = "methodsStartComponent"]
18	pub fn methods_start_component(address: *const u8) -> i32;
19
20	#[link_name = "methodsStartValue"]
21	pub fn methods_start_value(descriptor: u32) -> i32;
22
23	#[link_name = "methodsNext"]
24	pub fn methods_next(buffer: *mut u8, length: usize, attributes: *mut u32) -> isize;
25
26	#[link_name = "documentationComponent"]
27	pub fn documentation_component(
28		address: *const u8,
29		method: *const u8,
30		method_length: usize,
31		buffer: *mut u8,
32		buffer_length: usize,
33	) -> isize;
34
35	#[link_name = "documentationValue"]
36	pub fn documentation_value(
37		descriptor: u32,
38		method: *const u8,
39		method_length: usize,
40		buffer: *mut u8,
41		buffer_length: usize,
42	) -> isize;
43
44	#[link_name = "invokeComponentMethod"]
45	pub fn invoke_component_method(
46		address: *const u8,
47		method: *const u8,
48		method_length: usize,
49		params: *const u8,
50	) -> i32;
51
52	#[link_name = "invokeValue"]
53	pub fn invoke_value(descriptor: u32, params: *const u8) -> i32;
54
55	#[link_name = "invokeValueIndexedRead"]
56	pub fn invoke_value_indexed_read(descriptor: u32, params: *const u8) -> i32;
57
58	#[link_name = "invokeValueIndexedWrite"]
59	pub fn invoke_value_indexed_write(descriptor: u32, params: *const u8) -> i32;
60
61	#[link_name = "invokeValueMethod"]
62	pub fn invoke_value_method(
63		descriptor: u32,
64		method: *const u8,
65		method_length: usize,
66		params: *const u8,
67	) -> i32;
68
69	#[link_name = "invokeEnd"]
70	pub fn invoke_end(buffer: *mut u8, length: usize) -> isize;
71
72	#[link_name = "invokeCancel"]
73	pub fn invoke_cancel();
74
75	#[link_name = "lastExceptionMessage"]
76	pub fn last_exception_message(buffer: *mut u8, buffer_length: usize) -> isize;
77
78	#[link_name = "lastExceptionIsType"]
79	pub fn last_exception_is_type(class: *const u8, class_length: usize) -> i32;
80}