KiCad PCB EDA Suite
Loading...
Searching...
No Matches
http_lib_settings.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 (C) 2023 Andre F. K. Iwers <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
24#include <ctime>
25
26
32
33
43
44
46{
47 std::string id;
48 std::string name;
49 std::string symbolIdStr;
50
51 bool exclude_from_bom = false;
52 bool exclude_from_board = false;
53 bool exclude_from_sim = false;
54
55 std::time_t lastCached = 0;
56
57 std::string desc;
58 std::string keywords;
59 std::vector<std::string> fp_filters;
60
61 std::vector<std::pair<std::string, std::tuple<std::string, bool>>> fields;
62};
63
64
66{
67 std::string id;
68 std::string name;
69 std::string description;
70
71 std::time_t lastCached = 0;
72
73 std::vector<HTTP_LIB_PART> cachedParts;
74};
75
76
78{
79public:
80 HTTP_LIB_SETTINGS( const std::string& aFilename );
81 ~HTTP_LIB_SETTINGS() override = default;
82
90
91 std::string getSupportedAPIVersion() { return m_api_version; }
92
93protected:
94 wxString getFileExt() const override;
95
96public:
98
99private:
100 std::string m_sourceType;
101 std::string m_api_version = "v1";
102};
103
std::string getSupportedAPIVersion()
wxString getFileExt() const override
~HTTP_LIB_SETTINGS() override=default
HTTP_LIB_SOURCE m_Source
HTTP_LIB_SETTINGS(const std::string &aFilename)
HTTP_LIB_SOURCE_TYPE get_HTTP_LIB_SOURCE_TYPE()
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
HTTP_LIB_SOURCE_TYPE
std::string id
id of category
std::vector< HTTP_LIB_PART > cachedParts
std::string name
name of category
std::string description
description of category
std::string symbolIdStr
std::string keywords
std::vector< std::string > fp_filters
std::time_t lastCached
std::vector< std::pair< std::string, std::tuple< std::string, bool > > > fields
HTTP_LIB_SOURCE_TYPE type
std::string api_version