|
KiCad PCB EDA Suite
|
#include <wx/log.h>#include <fmt/core.h>#include <wx/translation.h>#include <ctime>#include <boost/algorithm/string.hpp>#include <json_common.h>#include <wx/base64.h>#include <kicad_curl/kicad_curl_easy.h>#include <curl/curl.h>#include <http_lib/http_lib_connection.h>#include <lib_id.h>Go to the source code of this file.
Functions | |
| bool | boolFromString (const std::any &aVal, bool aDefaultValue) |
| void | setPartIdNameAndMetadata (const nlohmann::json &aPart_json, HTTP_LIB_PART &aPart) |
| static bool | jsonBoolField (const nlohmann::json &aValue, bool aDefault) |
| bool | setPartExtendedData (const nlohmann::json &aPartJson, HTTP_LIB_PART &aPart) |
Parse the exclusion flags and field content from a part's JSON record into aPart. | |
Variables | |
| const char *const | traceHTTPLib = "KICAD_HTTP_LIB" |
| bool boolFromString | ( | const std::any & | aVal, |
| bool | aDefaultValue ) |
Definition at line 154 of file http_lib_connection.cpp.
Referenced by jsonBoolField().
|
static |
Definition at line 224 of file http_lib_connection.cpp.
References boolFromString().
Referenced by setPartExtendedData().
| bool setPartExtendedData | ( | const nlohmann::json & | aPartJson, |
| HTTP_LIB_PART & | aPart ) |
Parse the exclusion flags and field content from a part's JSON record into aPart.
The category listing and per-part detail endpoints share this shape but the listing may omit the fields; parsing is tolerant of missing keys and of flags encoded as either JSON strings or native booleans.
Definition at line 236 of file http_lib_connection.cpp.
References HTTP_LIB_PART::exclude_from_board, HTTP_LIB_PART::exclude_from_bom, HTTP_LIB_PART::exclude_from_sim, HTTP_LIB_PART::fields, jsonBoolField(), and HTTP_LIB_PART::symbolIdStr.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), HTTP_LIB_CONNECTION::SelectAll(), and HTTP_LIB_CONNECTION::SelectOne().
| void setPartIdNameAndMetadata | ( | const nlohmann::json & | aPart_json, |
| HTTP_LIB_PART & | aPart ) |
Definition at line 185 of file http_lib_connection.cpp.
References UTF8::c_str(), HTTP_LIB_PART::desc, LIB_ID::FixIllegalChars(), HTTP_LIB_PART::fp_filters, HTTP_LIB_PART::id, HTTP_LIB_PART::keywords, and HTTP_LIB_PART::name.
Referenced by HTTP_LIB_CONNECTION::SelectAll(), and HTTP_LIB_CONNECTION::SelectOne().
| const char* const traceHTTPLib = "KICAD_HTTP_LIB" |
Definition at line 36 of file http_lib_connection.cpp.
Referenced by SCH_IO_HTTP_LIB::ensureSettings(), SCH_IO_HTTP_LIB::LoadSymbol(), SCH_IO_HTTP_LIB::loadSymbolFromPart(), HTTP_LIB_CONNECTION::SelectAll(), HTTP_LIB_CONNECTION::SelectOne(), HTTP_LIB_CONNECTION::syncCategories(), and HTTP_LIB_CONNECTION::validateHttpLibraryEndpoints().