(&self, recording_id: &str)
| 549 | } |
| 550 | |
| 551 | pub fn stop_screen_recording(&self, recording_id: &str) -> Result<Vec<u8>, AppError> { |
| 552 | let recording_id = |
| 553 | CString::new(recording_id).map_err(|e| AppError::bad_request(e.to_string()))?; |
| 554 | unsafe { |
| 555 | let mut error = ptr::null_mut(); |
| 556 | let bytes = ffi::xcw_native_stop_screen_recording(recording_id.as_ptr(), &mut error); |
| 557 | if bytes.data.is_null() { |
| 558 | return Err( |
| 559 | take_error(error).unwrap_or_else(|| AppError::native("Unknown native error.")) |
| 560 | ); |
| 561 | } |
| 562 | let data = std::slice::from_raw_parts(bytes.data, bytes.length).to_vec(); |
| 563 | ffi::xcw_native_free_bytes(bytes); |
| 564 | Ok(data) |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | pub fn recent_logs( |
| 569 | &self, |
no test coverage detected