use crate::{
Context, Controller, ControllerDataType, FlightPlan, FlightPlanList, GroundToAirChannel, Point,
RadarScreen, RadarTarget, Rect, TagData, TagItem,
};
pub trait Plugin: Sized + 'static {
const NAME: &'static str;
const VERSION: &'static str;
const AUTHOR: &'static str;
const COPYRIGHT: &'static str = "";
fn new(ctx: &mut Context) -> Self;
fn on_timer(&mut self, ctx: &mut Context, counter: i32) {
let _ = (ctx, counter);
}
fn on_controller_position_update(&mut self, ctx: &mut Context, controller: Controller<'_>) {
let _ = (ctx, controller);
}
fn on_controller_disconnect(&mut self, ctx: &mut Context, controller: Controller<'_>) {
let _ = (ctx, controller);
}
fn on_radar_target_position_update(
&mut self,
ctx: &mut Context,
radar_target: RadarTarget<'_>,
) {
let _ = (ctx, radar_target);
}
fn on_flight_plan_disconnect(&mut self, ctx: &mut Context, flight_plan: FlightPlan<'_>) {
let _ = (ctx, flight_plan);
}
fn on_flight_plan_data_update(&mut self, ctx: &mut Context, flight_plan: FlightPlan<'_>) {
let _ = (ctx, flight_plan);
}
fn on_plane_information_update(
&mut self,
ctx: &mut Context,
callsign: &str,
livery: &str,
plane_type: &str,
) {
let _ = (ctx, callsign, livery, plane_type);
}
fn on_controller_assigned_data_update(
&mut self,
ctx: &mut Context,
flight_plan: FlightPlan<'_>,
data_type: ControllerDataType,
) {
let _ = (ctx, flight_plan, data_type);
}
fn on_flight_strip_pushed(
&mut self,
ctx: &mut Context,
flight_plan: FlightPlan<'_>,
sender: &str,
target: &str,
) {
let _ = (ctx, flight_plan, sender, target);
}
fn on_compile_command(&mut self, ctx: &mut Context, command_line: &str) -> bool {
let _ = (ctx, command_line);
false
}
fn on_frequency_chat(
&mut self,
ctx: &mut Context,
sender: &str,
frequency: f64,
message: &str,
) {
let _ = (ctx, sender, frequency, message);
}
fn on_private_chat(&mut self, ctx: &mut Context, sender: &str, receiver: &str, message: &str) {
let _ = (ctx, sender, receiver, message);
}
fn on_refresh_fp_list(&mut self, ctx: &mut Context, list: FlightPlanList<'_>) {
let _ = (ctx, list);
}
fn on_new_metar(&mut self, ctx: &mut Context, station: &str, full_metar: &str) {
let _ = (ctx, station, full_metar);
}
fn on_function_call(
&mut self,
ctx: &mut Context,
function_id: i32,
item_string: &str,
point: Point,
area: Rect,
) {
let _ = (ctx, function_id, item_string, point, area);
}
fn on_get_tag_item(
&mut self,
ctx: &mut Context,
flight_plan: FlightPlan<'_>,
radar_target: RadarTarget<'_>,
item_code: i32,
tag_data: TagData,
item: &mut TagItem,
) {
let _ = (ctx, flight_plan, radar_target, item_code, tag_data, item);
}
fn on_radar_screen_created(
&mut self,
ctx: &mut Context,
display_name: &str,
need_radar_content: bool,
geo_referenced: bool,
can_be_saved: bool,
can_be_created: bool,
) -> Option<Box<dyn RadarScreen>> {
let _ = (
ctx,
display_name,
need_radar_content,
geo_referenced,
can_be_saved,
can_be_created,
);
None
}
fn on_runway_activity_changed(&mut self, ctx: &mut Context) {
let _ = ctx;
}
fn on_voice_transmit_started(&mut self, ctx: &mut Context, on_primary: bool) {
let _ = (ctx, on_primary);
}
fn on_voice_transmit_ended(&mut self, ctx: &mut Context, on_primary: bool) {
let _ = (ctx, on_primary);
}
fn on_voice_receive_started(&mut self, ctx: &mut Context, channel: GroundToAirChannel<'_>) {
let _ = (ctx, channel);
}
fn on_voice_receive_ended(&mut self, ctx: &mut Context, channel: GroundToAirChannel<'_>) {
let _ = (ctx, channel);
}
}