|
KiCad PCB EDA Suite
|
#include <chrono>#include <functional>#include <future>#include <memory>#include <mutex>#include <optional>#include <string>#include <thread>#include <vector>#include <wx/string.h>#include <database/database_backend.h>#include "db_worker_thread.h"Go to the source code of this file.
Classes | |
| struct | DB_WORKER_FAILURE |
| What a backend reports, and what it does with its connection, when a worker call did not complete. More... | |
| class | DB_READ_DELIVERY |
| Hands rows from a worker job to a caller's sink and gives the caller the column labels. More... | |
| class | DB_PROBE_LATCH< T > |
| Runs a slow probe once on a thread of its own and keeps its answer for good. More... | |
Functions | |
| std::string | utf8 (const wxString &aText) |
| DB_WORKER_FAILURE | DescribeWorkerOutcome (DB_WORKER_THREAD::OUTCOME aOutcome, const std::string &aPath) |
| Maps the outcome of a call that returned no result to a failure and a connection decision. | |
| std::string | ScrubSecret (std::string aText, const std::string &aSecret) |
| Replaces a secret in a message, as ***. | |
| std::string | RedactDetail (const std::string &aDetail, const std::string &aSecret) |
| The provider text to show for a call made with aSecret, which is nothing at all when the secret is short. | |
| DB_WORKER_FAILURE DescribeWorkerOutcome | ( | DB_WORKER_THREAD::OUTCOME | aOutcome, |
| const std::string & | aPath ) |
Maps the outcome of a call that returned no result to a failure and a connection decision.
Definition at line 30 of file db_backend_support.cpp.
References _, DB_WORKER_FAILURE::DROP, DB_WORKER_FAILURE::FORGET, DB_WORKER_FAILURE::KEEP, path, DB_WORKER_THREAD::REFUSED, TIMEOUT, DB_WORKER_THREAD::TOO_LATE, DB_WORKER_THREAD::UNAVAILABLE, UNKNOWN, and utf8().
Referenced by ACE_BACKEND::closeSpentSessions(), ACE_BACKEND::runOnWorker(), and SQLITE_BACKEND::runOnWorker().
| std::string RedactDetail | ( | const std::string & | aDetail, |
| const std::string & | aSecret ) |
The provider text to show for a call made with aSecret, which is nothing at all when the secret is short.
Definition at line 148 of file db_backend_support.cpp.
References ScrubSecret().
Referenced by describeFailure().
| std::string ScrubSecret | ( | std::string | aText, |
| const std::string & | aSecret ) |
Replaces a secret in a message, as ***.
The doubled-quote form that an initialization string holds for a secret containing a quote goes too.
A secret of four or more characters goes wherever it occurs. A shorter one goes only where it stands apart from letters, digits and non-ASCII bytes, since replacing a one-character secret inside words would leave the message unreadable. That leaves a short secret hiding inside a longer word, so provider text that may echo a short secret must go through RedactDetail instead.
Definition at line 95 of file db_backend_support.cpp.
References end.
Referenced by ACE_BACKEND::fail(), and RedactDetail().
|
inline |
Definition at line 40 of file db_backend_support.h.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), collectImportedUuids(), ACE_BACKEND::Connect(), SQLITE_BACKEND::Connect(), DATABASE_BACKEND::Create(), describeFailure(), describeFailure(), DescribeWorkerOutcome(), SCH_CONNECTIVITY::Dump(), SCH_CONNECTIVITY::Dump(), EscapedUTF8(), ACE_BACKEND::failStopped(), FromFsPath(), KI_TEST::LoadSvg(), PANEL_REMOTE_SYMBOL::onKicadMessage(), DIALOG_DOWNGRADE_REPORT::OnSaveReport(), PANEL_SETUP_RULES::OnShowMatching(), parseQuotedString(), parseUnquotedString(), ACE_BACKEND::ProviderMissingMessage(), ACE_BACKEND::ProviderPendingMessage(), ReadDelimitedText(), ACE_BACKEND::readVerified(), ACE_BACKEND::requireConnection(), SQLITE_BACKEND::requireConnection(), PDF_OUTLINE_FONT_SUBSET::sanitizeFontName(), DRC_RULE_SAVER::SaveFile(), PNS_LOG_FILE::SaveLog(), DRC_RULE_EDITOR_UTILS::SaveRules(), DB_READ_DELIVERY::SinkFailureMessage(), utf8_utils::UTF8_CONVERTER::to_utf32(), PANEL_SETUP_RULES::TransferDataFromWindow(), and UrlEncode().