Add DVT screenshot bindings

This commit is contained in:
Jackson Coxson
2025-10-21 08:47:07 -06:00
parent 779db7ecec
commit a7daac3a46
17 changed files with 326 additions and 17 deletions

View File

@@ -0,0 +1,32 @@
// Jackson Coxson
#include <idevice++/dvt/location_simulation.hpp>
namespace IdeviceFFI {
Result<LocationSimulation, FfiError> LocationSimulation::create(RemoteServer& server) {
LocationSimulationHandle* out = nullptr;
FfiError e(::location_simulation_new(server.raw(), &out));
if (e) {
return Err(e);
}
return Ok(LocationSimulation::adopt(out));
}
Result<void, FfiError> LocationSimulation::clear() {
FfiError e(::location_simulation_clear(handle_.get()));
if (e) {
return Err(e);
}
return Ok();
}
Result<void, FfiError> LocationSimulation::set(double latitude, double longitude) {
FfiError e(::location_simulation_set(handle_.get(), latitude, longitude));
if (e) {
return Err(e);
}
return Ok();
}
} // namespace IdeviceFFI