|
|
@ -23,7 +23,7 @@ airmap::qt::Flights::Flights(const std::shared_ptr<Dispatcher>& dispatcher, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::search(const Search::Parameters& parameters, const Search::Callback& cb) { |
|
|
|
void airmap::qt::Flights::search(const Search::Parameters& parameters, const Search::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().search(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().search(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -31,7 +31,7 @@ void airmap::qt::Flights::search(const Search::Parameters& parameters, const Sea |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::for_id(const ForId::Parameters& parameters, const ForId::Callback& cb) { |
|
|
|
void airmap::qt::Flights::for_id(const ForId::Parameters& parameters, const ForId::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().for_id(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().for_id(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -40,7 +40,7 @@ void airmap::qt::Flights::for_id(const ForId::Parameters& parameters, const ForI |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::create_flight_by_point(const CreateFlight::Parameters& parameters, |
|
|
|
void airmap::qt::Flights::create_flight_by_point(const CreateFlight::Parameters& parameters, |
|
|
|
const CreateFlight::Callback& cb) { |
|
|
|
const CreateFlight::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().create_flight_by_point(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().create_flight_by_point(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -49,7 +49,7 @@ void airmap::qt::Flights::create_flight_by_point(const CreateFlight::Parameters& |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::create_flight_by_path(const CreateFlight::Parameters& parameters, |
|
|
|
void airmap::qt::Flights::create_flight_by_path(const CreateFlight::Parameters& parameters, |
|
|
|
const CreateFlight::Callback& cb) { |
|
|
|
const CreateFlight::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().create_flight_by_path(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().create_flight_by_path(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -58,7 +58,7 @@ void airmap::qt::Flights::create_flight_by_path(const CreateFlight::Parameters& |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::create_flight_by_polygon(const CreateFlight::Parameters& parameters, |
|
|
|
void airmap::qt::Flights::create_flight_by_polygon(const CreateFlight::Parameters& parameters, |
|
|
|
const CreateFlight::Callback& cb) { |
|
|
|
const CreateFlight::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().create_flight_by_polygon(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().create_flight_by_polygon(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -66,7 +66,7 @@ void airmap::qt::Flights::create_flight_by_polygon(const CreateFlight::Parameter |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::end_flight(const EndFlight::Parameters& parameters, const EndFlight::Callback& cb) { |
|
|
|
void airmap::qt::Flights::end_flight(const EndFlight::Parameters& parameters, const EndFlight::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().end_flight(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().end_flight(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -74,7 +74,7 @@ void airmap::qt::Flights::end_flight(const EndFlight::Parameters& parameters, co |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::delete_flight(const DeleteFlight::Parameters& parameters, const DeleteFlight::Callback& cb) { |
|
|
|
void airmap::qt::Flights::delete_flight(const DeleteFlight::Parameters& parameters, const DeleteFlight::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().delete_flight(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().delete_flight(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -83,7 +83,7 @@ void airmap::qt::Flights::delete_flight(const DeleteFlight::Parameters& paramete |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::start_flight_communications(const StartFlightCommunications::Parameters& parameters, |
|
|
|
void airmap::qt::Flights::start_flight_communications(const StartFlightCommunications::Parameters& parameters, |
|
|
|
const StartFlightCommunications::Callback& cb) { |
|
|
|
const StartFlightCommunications::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().start_flight_communications(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().start_flight_communications(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -92,7 +92,7 @@ void airmap::qt::Flights::start_flight_communications(const StartFlightCommunica |
|
|
|
|
|
|
|
|
|
|
|
void airmap::qt::Flights::end_flight_communications(const EndFlightCommunications::Parameters& parameters, |
|
|
|
void airmap::qt::Flights::end_flight_communications(const EndFlightCommunications::Parameters& parameters, |
|
|
|
const EndFlightCommunications::Callback& cb) { |
|
|
|
const EndFlightCommunications::Callback& cb) { |
|
|
|
dispatcher_->dispatch_to_native([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
dispatcher_->dispatch_to_airmap([this, sp = shared_from_this(), parameters, cb]() { |
|
|
|
sp->client_->flights().end_flight_communications(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->client_->flights().end_flight_communications(parameters, [this, sp, cb](const auto& result) { |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
sp->dispatcher_->dispatch_to_qt([sp, result, cb]() { cb(result); }); |
|
|
|
}); |
|
|
|
}); |
|
|
|