MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / press_button

Method press_button

packages/server/src/native/bridge.rs:693–708  ·  view source on GitHub ↗
(&self, udid: &str, button: &str, duration_ms: u32)

Source from the content-addressed store, hash-verified

691 }
692
693 pub fn press_button(&self, udid: &str, button: &str, duration_ms: u32) -> Result<(), AppError> {
694 let udid = CString::new(udid).map_err(|e| AppError::bad_request(e.to_string()))?;
695 let button = CString::new(button).map_err(|e| AppError::bad_request(e.to_string()))?;
696 unsafe {
697 let mut error = ptr::null_mut();
698 bool_result(
699 ffi::xcw_native_press_button(
700 udid.as_ptr(),
701 button.as_ptr(),
702 duration_ms,
703 &mut error,
704 ),
705 error,
706 )
707 }
708 }
709
710 pub fn send_button(
711 &self,

Callers 6

run_batch_stepFunction · 0.45
perform_back_payloadFunction · 0.45
run_batch_stepFunction · 0.45
run_control_messageFunction · 0.45

Calls 3

bool_resultFunction · 0.85
xcw_native_press_buttonFunction · 0.85

Tested by

no test coverage detected