interception_mock/
interception_c.rs

1use std::ffi::{c_ushort, c_void};
2
3// InterceptionContext INTERCEPTION_API interception_create_context(void);
4#[no_mangle]
5pub extern "C" fn interception_create_context() -> *mut c_void {
6    unimplemented!("interception_create_context")
7}
8
9// void INTERCEPTION_API interception_destroy_context(InterceptionContext context);
10#[no_mangle]
11pub extern "C" fn interception_destroy_context(_ctx_ptr: *mut c_void) {
12    unimplemented!("interception_destroy_context")
13}
14
15// void INTERCEPTION_API interception_set_filter(InterceptionContext context, InterceptionPredicate predicate, InterceptionFilter filter);
16#[no_mangle]
17pub extern "C" fn interception_set_filter(
18    _ctx_ptr: *mut c_void,
19    _predicate_ptr: *const extern "C" fn(i32) -> i32,
20    _filter: c_ushort,
21) {
22    unimplemented!("interception_set_filter")
23}
24
25#[cfg(test)]
26mod tests {
27    use super::*;
28
29    #[test]
30    #[should_panic(expected = "not implemented: interception_create_context")]
31    fn e2e() {
32        let _ = interception_create_context();
33    }
34}