OpenTTD Source 20241224-master-gf74b0cf984
|
Opt-in survey part of the network protocol. More...
#include "../stdafx.h"
#include "network_survey.h"
#include "settings_table.h"
#include "network.h"
#include "network_func.h"
#include "../debug.h"
#include "../survey.h"
#include "../3rdparty/fmt/chrono.h"
#include "../3rdparty/fmt/std.h"
#include "../safeguards.h"
Go to the source code of this file.
Functions | |
NLOHMANN_JSON_SERIALIZE_ENUM (NetworkSurveyHandler::Reason, { {NetworkSurveyHandler::Reason::PREVIEW, "preview"}, {NetworkSurveyHandler::Reason::LEAVE, "leave"}, {NetworkSurveyHandler::Reason::EXIT, "exit"}, {NetworkSurveyHandler::Reason::CRASH, "crash"}, }) std | |
Create the payload for the survey. | |
Variables | |
NetworkSurveyHandler | _survey = {} |
Opt-in survey part of the network protocol.
Definition in file network_survey.cpp.
NLOHMANN_JSON_SERIALIZE_ENUM | ( | NetworkSurveyHandler::Reason | , |
{ {NetworkSurveyHandler::Reason::PREVIEW, "preview"}, {NetworkSurveyHandler::Reason::LEAVE, "leave"}, {NetworkSurveyHandler::Reason::EXIT, "exit"}, {NetworkSurveyHandler::Reason::CRASH, "crash"}, } | |||
) |
Create the payload for the survey.
reason | The reason for sending the survey. |
for_preview | Whether the payload is meant for preview. This indents the result, and filters out the id/key. |
Definition at line 24 of file network_survey.cpp.
References NetworkSurveyHandler::CRASH, NetworkSurveyHandler::EXIT, NetworkSurveyHandler::LEAVE, and NetworkSurveyHandler::PREVIEW.
NetworkSurveyHandler _survey = {} |
Definition at line 22 of file network_survey.cpp.