KiCad PCB EDA Suite
Loading...
Searching...
No Matches
remote_provider_metadata.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef REMOTE_PROVIDER_METADATA_H
21#define REMOTE_PROVIDER_METADATA_H
22
23#include <optional>
24#include <vector>
25
26#include <kicommon.h>
27#include <json_common.h>
28#include <wx/filename.h>
29#include <wx/string.h>
30
36
37
45
46
48{
49 wxString provider_name;
51 wxString api_base_url;
52 wxString panel_url;
55 bool web_ui_v1 = false;
56 bool parts_v1 = false;
57 bool direct_downloads_v1 = false;
58 bool inline_payloads_v1 = false;
59 long long max_download_bytes = 0;
60 std::vector<wxString> supported_asset_types;
63 wxString terms_url;
64 wxString privacy_url;
66
67 static wxFileName DefaultSchemaPath();
68
69 static std::optional<REMOTE_PROVIDER_METADATA> FromJson( const nlohmann::json& aJson,
70 wxString& aError );
71
72 static std::optional<REMOTE_PROVIDER_METADATA> FromJson( const nlohmann::json& aJson,
73 const wxFileName& aSchemaFile,
74 wxString& aError );
75};
76
77#endif // REMOTE_PROVIDER_METADATA_H
@ NONE
Definition eda_shape.h:69
#define KICOMMON_API
Definition kicommon.h:28
REMOTE_PROVIDER_AUTH_TYPE
static std::optional< REMOTE_PROVIDER_METADATA > FromJson(const nlohmann::json &aJson, wxString &aError)
std::vector< wxString > supported_asset_types
REMOTE_PROVIDER_AUTH_METADATA auth