Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
CurlHelpers.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2005-2012 Pierre-Michel Ricordel
4 Copyright 2007-2012 Thomas Fischer
5 Copyright 2013-2023 Petr Ohlidal
6
7 For more information, see http://www.rigsofrods.org/
8
9 Rigs of Rods is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License version 3, as
11 published by the Free Software Foundation.
12
13 Rigs of Rods is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#pragma once
23
24#include "GameContext.h"
25
26#ifdef USE_CURL
27# include <curl/curl.h>
28# include <curl/easy.h>
29
30#include <string>
31
32namespace RoR {
33
35{
36 std::string ctc_displayname;
37 std::string ctc_url;
38 // Send no messages by default
42 // Status
43 double ctc_old_perc = 0; // not threadsafe but whatever
44};
45
46bool GetUrlAsString(const std::string& url, CURLcode& curl_result, long& response_code, std::string& response_payload);
47
49
50} // namespace RoR
51
52#endif // USE_CURL
Game state manager and message-queue provider.
MsgType
Global gameplay message loop, see struct Message in GameContext.h.
Definition Application.h:76
@ MSG_INVALID
Definition Application.h:84
bool GetUrlAsStringMQ(CurlTaskContext task)
bool GetUrlAsString(const std::string &url, CURLcode &curl_result, long &response_code, std::string &response_payload)
std::string ctc_displayname
Definition CurlHelpers.h:36
std::string ctc_url
Definition CurlHelpers.h:37
MsgType ctc_msg_failure
Sent on failure; Payload: RoR::ScriptEventArgs (see 'gameplay/ScriptEvents.h') with args for RoR::SE_...
Definition CurlHelpers.h:41