swift
Loading...
Searching...
No Matches
contextnetworkempty.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_CORE_CONTEXT_CONTEXTNETWORK_EMPTY_H
7#define SWIFT_CORE_CONTEXT_CONTEXTNETWORK_EMPTY_H
8
11#include "misc/logmessage.h"
12
13// clazy:excludeall=const-signal-or-slot
14
15namespace swift::core::context
16{
19 {
21
22 public:
25
26 public slots:
28 swift::misc::aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const override
29 {
30 Q_UNUSED(recalculateDistance)
31 logEmptyContextWarning(Q_FUNC_INFO);
32 return {};
33 }
34
37 {
38 Q_UNUSED(number)
39 logEmptyContextWarning(Q_FUNC_INFO);
40 return {};
41 }
42
45 {
46 logEmptyContextWarning(Q_FUNC_INFO);
47 return {};
48 }
49
53 {
54 Q_UNUSED(callsign)
55 logEmptyContextWarning(Q_FUNC_INFO);
56 return {};
57 }
58
62 {
63 Q_UNUSED(frequency)
64 logEmptyContextWarning(Q_FUNC_INFO);
65 return {};
66 }
67
70 {
71 logEmptyContextWarning(Q_FUNC_INFO);
72 return {};
73 }
74
76 int getAircraftInRangeCount() const override
77 {
78 logEmptyContextWarning(Q_FUNC_INFO);
79 return 0;
80 }
81
83 bool isAircraftInRange(const swift::misc::aviation::CCallsign &callsign) const override
84 {
85 Q_UNUSED(callsign)
86 logEmptyContextWarning(Q_FUNC_INFO);
87 return false;
88 }
89
93 {
94 Q_UNUSED(callsign)
95 logEmptyContextWarning(Q_FUNC_INFO);
96 return {};
97 }
98
100 bool isOnlineStation(const swift::misc::aviation::CCallsign &callsign) const override
101 {
102 Q_UNUSED(callsign)
103 logEmptyContextWarning(Q_FUNC_INFO);
104 return false;
105 }
106
109 const QString &extraLiveryString, bool sendLivery,
110 const QString &extraModelString, bool sendModelString,
111 const swift::misc::aviation::CCallsign &partnerCallsign,
113 {
114 Q_UNUSED(mode)
115 Q_UNUSED(server)
116 Q_UNUSED(extraModelString)
117 Q_UNUSED(extraLiveryString)
118 Q_UNUSED(sendLivery)
119 Q_UNUSED(sendModelString)
120 Q_UNUSED(partnerCallsign)
121 logEmptyContextWarning(Q_FUNC_INFO);
123 }
124
127 {
128 logEmptyContextWarning(Q_FUNC_INFO);
129 return {};
130 }
131
134 {
135 logEmptyContextWarning(Q_FUNC_INFO);
136 return {};
137 }
138
145
147 bool isConnected() const override
148 {
149 logEmptyContextWarning(Q_FUNC_INFO);
150 return false;
151 }
152
155 {
156 logEmptyContextWarning(Q_FUNC_INFO);
157 return {};
158 }
159
166
169 {
170 Q_UNUSED(textMessages)
171 logEmptyContextWarning(Q_FUNC_INFO);
172 }
173
175 void sendFlightPlan(const swift::misc::aviation::CFlightPlan &flightPlan) override
176 {
177 Q_UNUSED(flightPlan)
178 logEmptyContextWarning(Q_FUNC_INFO);
179 }
180
184 {
185 Q_UNUSED(callsign)
186 logEmptyContextWarning(Q_FUNC_INFO);
187 return {};
188 }
189
192 getMetarForAirport(const swift::misc::aviation::CAirportIcaoCode &airportIcaoCode) const override
193 {
194 Q_UNUSED(airportIcaoCode)
195 logEmptyContextWarning(Q_FUNC_INFO);
196 return {};
197 }
198
201 {
202 logEmptyContextWarning(Q_FUNC_INFO);
203 return {};
204 }
205
209 {
210 Q_UNUSED(callsigns)
211 logEmptyContextWarning(Q_FUNC_INFO);
212 return {};
213 }
214
217 {
218 Q_UNUSED(callsign)
219 logEmptyContextWarning(Q_FUNC_INFO);
220 return {};
221 }
222
225 {
226 logEmptyContextWarning(Q_FUNC_INFO);
227 return {};
228 }
229
233 {
234 Q_UNUSED(callsigns)
235 logEmptyContextWarning(Q_FUNC_INFO);
236 return {};
237 }
238
241 {
242 Q_UNUSED(client)
243 logEmptyContextWarning(Q_FUNC_INFO);
244 return false;
245 }
246
248 void requestAircraftDataUpdates() override { logEmptyContextWarning(Q_FUNC_INFO); }
249
251 void requestAtisUpdates() override { logEmptyContextWarning(Q_FUNC_INFO); }
252
254 void testCreateDummyOnlineAtcStations(int number) override
255 {
256 Q_UNUSED(number)
257 logEmptyContextWarning(Q_FUNC_INFO);
258 }
259
262 const swift::misc::aviation::CAircraftParts &parts, bool incremental) override
263 {
264 Q_UNUSED(callsign)
265 Q_UNUSED(parts)
266 Q_UNUSED(incremental)
267 logEmptyContextWarning(Q_FUNC_INFO);
268 }
269
272 {
273 Q_UNUSED(textMessages)
274 logEmptyContextWarning(Q_FUNC_INFO);
275 }
276
279 {
280 Q_UNUSED(callsign)
281 logEmptyContextWarning(Q_FUNC_INFO);
282 }
283
288 {
289 Q_UNUSED(callsign)
290 Q_UNUSED(offset)
291 logEmptyContextWarning(Q_FUNC_INFO);
292 return false;
293 }
294
298 {
299 Q_UNUSED(callsign)
300 Q_UNUSED(msg)
301 logEmptyContextWarning(Q_FUNC_INFO);
302 }
303
305 bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator) override
306 {
307 Q_UNUSED(commandLine)
308 Q_UNUSED(originator)
309 logEmptyContextWarning(Q_FUNC_INFO);
310 return false;
311 }
312
315 {
316 logEmptyContextWarning(Q_FUNC_INFO);
317 return {};
318 }
319
321 bool updateAircraftEnabled(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering) override
322 {
323 Q_UNUSED(callsign)
324 Q_UNUSED(enabledForRendering)
325 logEmptyContextWarning(Q_FUNC_INFO);
326 return false;
327 }
328
331 bool supportGndFlag) override
332 {
333 Q_UNUSED(callsign)
334 Q_UNUSED(supportGndFlag)
335 logEmptyContextWarning(Q_FUNC_INFO);
336 return false;
337 }
338
342 const swift::misc::CIdentifier &originator) override
343 {
344 Q_UNUSED(callsign)
345 Q_UNUSED(model)
346 Q_UNUSED(originator)
347 logEmptyContextWarning(Q_FUNC_INFO);
348 return false;
349 }
350
354 const swift::misc::CIdentifier &originator) override
355 {
356 Q_UNUSED(callsign)
357 Q_UNUSED(model)
358 Q_UNUSED(originator)
359 logEmptyContextWarning(Q_FUNC_INFO);
360 return false;
361 }
362
365 bool enableFastPositionSending) override
366 {
367 logEmptyContextWarning(Q_FUNC_INFO);
368 Q_UNUSED(callsign)
369 Q_UNUSED(enableFastPositionSending)
370 return false;
371 }
372
374 bool setAircraftEnabledFlag(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering) override
375 {
376 logEmptyContextWarning(Q_FUNC_INFO);
377 Q_UNUSED(callsign)
378 Q_UNUSED(enabledForRendering)
379 return false;
380 }
381
383 int reInitializeAllAircraft() override { return 0; }
384
387 {
388 Q_UNUSED(callsigns)
389 logEmptyContextWarning(Q_FUNC_INFO);
390 }
391
394 {
395 logEmptyContextWarning(Q_FUNC_INFO);
396 return {};
397 }
398
402 {
403 logEmptyContextWarning(Q_FUNC_INFO);
404 Q_UNUSED(callsign)
405 return {};
406 }
407
409 swift::misc::simulation::ReverseLookupLogging isReverseLookupMessagesEnabled() const override
410 {
411 logEmptyContextWarning(Q_FUNC_INFO);
412 return swift::misc::simulation::RevLogDisabled;
413 }
414
416 void enableReverseLookupMessages(swift::misc::simulation::ReverseLookupLogging enable) override
417 {
418 logEmptyContextWarning(Q_FUNC_INFO);
419 Q_UNUSED(enable)
420 }
421
425 {
426 logEmptyContextWarning(Q_FUNC_INFO);
427 Q_UNUSED(callsign)
428 return {};
429 }
430
434 {
435 logEmptyContextWarning(Q_FUNC_INFO);
436 Q_UNUSED(callsign)
437 return {};
438 }
439
441 bool isAircraftPartsHistoryEnabled() const override
442 {
443 logEmptyContextWarning(Q_FUNC_INFO);
444 return false;
445 }
446
449 {
450 logEmptyContextWarning(Q_FUNC_INFO);
451 Q_UNUSED(callsign)
452 return false;
453 }
454
456 void enableAircraftPartsHistory(bool enabled) override
457 {
458 logEmptyContextWarning(Q_FUNC_INFO);
459 Q_UNUSED(enabled)
460 }
461
463 QString getNetworkStatistics(bool reset, const QString &separator) override
464 {
465 logEmptyContextWarning(Q_FUNC_INFO);
466 Q_UNUSED(reset)
467 Q_UNUSED(separator)
468 return {};
469 }
470
472 bool setNetworkStatisticsEnable(bool enabled) override
473 {
474 logEmptyContextWarning(Q_FUNC_INFO);
475 Q_UNUSED(enabled;)
476 return false;
477 }
478
479 public:
482 RawFsdMessageReceivedSlot rawFsdMessageReceivedSlot) override
483 {
484 logEmptyContextWarning(Q_FUNC_INFO);
485 Q_UNUSED(receiver)
486 Q_UNUSED(rawFsdMessageReceivedSlot)
487 return {};
488 }
489 };
490} // namespace swift::core::context
491#endif // SWIFT_CORE_CONTEXT_CONTEXTNETWORK_EMPTY_H
Configuration object for the contexts.
The class providing facades (the contexts) for all DBus relevant operations.
Definition corefacade.h:57
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Parse a given command line.
swift::misc::network::CUserList getUsersForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Users for given callsigns, e.g. for voice room resolution.
QMetaObject::Connection connectRawFsdMessageSignal(QObject *receiver, RawFsdMessageReceivedSlot rawFsdMessageReceivedSlot)
Connect to receive raw fsd messages.
bool updateAircraftNetworkModel(const swift::misc::aviation::CCallsign &callsign, const swift::misc::simulation::CAircraftModel &model, const swift::misc::CIdentifier &originator)
Change network model (for remote aircraft).
void testCreateDummyOnlineAtcStations(int number)
Create dummy ATC stations for performance tests etc.
bool setAircraftEnabledFlag(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)
Set the enabled flag without any further logic like sending signals.
swift::misc::weather::CMetar getMetarForAirport(const swift::misc::aviation::CAirportIcaoCode &airportIcaoCode) const
Get METAR, if not available request it (code such as EDDF, KLAX).
swift::misc::aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const
The ATC list with online ATC controllers.
bool updateAircraftEnabled(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)
Enable/disable rendering.
swift::misc::network::CUser getUserForCallsign(const swift::misc::aviation::CCallsign &callsign) const
User for given callsign, e.g. for text messages.
void requestAtisUpdates()
Request ATIS updates (for all stations).
bool isAircraftPartsHistoryEnabled() const
Is storing the aircraft parts history enabled?
swift::misc::CStatusMessageList getAircraftPartsHistory(const swift::misc::aviation::CCallsign &callsign) const
Get aircraft parts history.
swift::misc::network::CUserList getUsers() const
Get all users.
void testReceivedAtisMessage(const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CInformationMessage &msg)
Inject an ATIS.
int getAircraftInRangeCount() const
Aircraft count.
swift::misc::network::CClientList getClientsForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Clients for given callsign, e.g. to test/fetch direct aircraft model.
int reInitializeAllAircraft()
Re-initialize all aircraft.
void enableReverseLookupMessages(swift::misc::simulation::ReverseLookupLogging enable)
Enable reverse lookup logging.
void sendFlightPlan(const swift::misc::aviation::CFlightPlan &flightPlan)
Send flight plan.
swift::misc::CStatusMessage connectToNetwork(const swift::misc::network::CServer &server, const QString &extraLiveryString, bool sendLivery, const QString &extraModelString, bool sendModelString, const swift::misc::aviation::CCallsign &partnerCallsign, swift::misc::network::CLoginMode mode)
Connect to Network.
swift::misc::network::CClientList getClients() const
Information about other clients.
bool isRemoteAircraftSupportingParts(const swift::misc::aviation::CCallsign &callsign) const
Parts supported?
swift::misc::simulation::CSimulatedAircraftList getAircraftInRange() const
Aircraft list.
swift::misc::aviation::CAtcStationList getClosestAtcStationsOnline(int number) const
The ATC list with online ATC controllers.
CContextNetworkEmpty(CCoreFacade *runtime)
Constructor.
void setFastPositionEnabledCallsigns(swift::misc::aviation::CCallsignSet &callsigns)
Callsigns enabled for fast position updates.
swift::misc::simulation::CSimulatedAircraft getAircraftInRangeForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Aircraft for given callsign.
QString getNetworkStatistics(bool reset, const QString &separator)
Statistics info.
QStringList getNetworkPresetValues() const
Network preset values.
swift::misc::network::CServerList getVatsimFsdServers() const
Known FSD servers, available when data file was first read.
bool isAircraftInRange(const swift::misc::aviation::CCallsign &callsign) const
Aircraft in range.
bool updateAircraftModel(const swift::misc::aviation::CCallsign &callsign, const swift::misc::simulation::CAircraftModel &model, const swift::misc::CIdentifier &originator)
Change model (for remote aircraft).
bool updateAircraftSupportingGndFLag(const swift::misc::aviation::CCallsign &callsign, bool supportGndFlag)
Enable/disable support of gnd. flag.
void enableAircraftPartsHistory(bool enabled)
Enable storing of aircraft parts.
swift::misc::aviation::CCallsignSet getFastPositionEnabledCallsigns() const
Callsigns enabled for fast position updates.
void sendTextMessages(const swift::misc::network::CTextMessageList &textMessages)
Text messages (radio and private chat messages).
bool updateFastPositionEnabled(const swift::misc::aviation::CCallsign &callsign, bool enableFastPositionSending)
Change fast position updates.
swift::misc::aviation::CAtcStationList getOnlineStationsForFrequency(const swift::misc::physical_quantities::CFrequency &frequency) const
Online stations for frequency.
swift::misc::aviation::CFlightPlan loadFlightPlanFromNetwork(const swift::misc::aviation::CCallsign &callsign) const
Load flight plan (from network).
void testAddAircraftParts(const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CAircraftParts &parts, bool incremental)
Inject aircraft parts for testing.
swift::misc::aviation::CCallsignSet getAircraftInRangeCallsigns() const
Aircraft callsigns.
void testReceivedTextMessages(const swift::misc::network::CTextMessageList &textMessages)
Inject a text message as received.
swift::misc::network::CLoginMode getLoginMode() const
Login mode.
void testRequestAircraftConfig(const swift::misc::aviation::CCallsign &callsign)
Request parts for callsign (from another client).
swift::misc::aviation::CCallsign getPartnerCallsign() const
Partner callsign if any.
bool setOtherClient(const swift::misc::network::CClient &client)
Set client for given callsign.
bool isOnlineStation(const swift::misc::aviation::CCallsign &callsign) const
Online station for callsign?
swift::misc::CStatusMessageList getReverseLookupMessages(const swift::misc::aviation::CCallsign &callsign) const
Get reverse lookup messages.
swift::misc::aviation::CAtcStation getOnlineStationForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Online station for callsign.
bool testAddAltitudeOffset(const swift::misc::aviation::CCallsign &callsign, const swift::misc::physical_quantities::CLength &offset=swift::misc::physical_quantities::CLength::null())
Add altitude offset for testing.
bool setNetworkStatisticsEnable(bool enabled)
Statistics enable/disable.
swift::misc::simulation::ReverseLookupLogging isReverseLookupMessagesEnabled() const
Enabled reverse lookup logging?
swift::misc::CStatusMessage disconnectFromNetwork()
Disconnect from network.
void requestAircraftDataUpdates()
Request data updates (pilot's frequencies, ATIS, ..).
swift::misc::network::CServer getConnectedServer() const
Server which is connected, if not connected empty default object.
swift::misc::aviation::CAircraftPartsList getRemoteAircraftParts(const swift::misc::aviation::CCallsign &callsign) const
Get remote aircraft parts.
void logEmptyContextWarning(const QString &functionName) const
Empty context called.
Definition context.h:145
static const misc::CStatusMessage & statusMessageEmptyContext()
Standard message when status message is returned in empty context.
Definition context.cpp:88
std::function< void(const swift::misc::network::CRawFsdMessage &)> RawFsdMessageReceivedSlot
Raw FSD message receiver functor.
IContextNetwork(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime)
Constructor.
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition identifier.h:29
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of aircraft's parts.
Value object encapsulating a list of aircraft parts.
Value object encapsulating information of airport ICAO data.
Value object encapsulating information about an ATC station.
Definition atcstation.h:38
Value object for a list of ATC stations.
Value object encapsulating information of a callsign.
Definition callsign.h:30
Value object for a set of callsigns.
Definition callsignset.h:26
Value object for a flight plan.
Definition flightplan.h:148
Value object encapsulating information message (ATIS, METAR, TAF).
Another client software.
Definition client.h:27
Value object encapsulating a list of voice rooms.
Definition clientlist.h:27
Value object encapsulating information about login mode.
Definition loginmode.h:18
Value object encapsulating information of a FSD server.
Definition server.h:28
Value object encapsulating a list of servers.
Definition serverlist.h:23
Value object encapsulating a list of text messages.
Value object encapsulating information of a user.
Definition user.h:28
Value object encapsulating a list of voice rooms.
Definition userlist.h:26
Physical unit length (length).
Definition length.h:18
Aircraft model (used by another pilot, my models on disk).
Comprehensive information of an aircraft.
Value object encapsulating a list of aircraft.
Value object encapsulating information about METAR FIXME: runway visibilities FIXME: runway wind shea...
Definition metar.h:38
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
#define SWIFT_CORE_EXPORT
Export a class or function from the library.