|
KiCad PCB EDA Suite
|
#include "db_backend_support.h"#include <cctype>#include <cstddef>#include <utility>#include <wx/intl.h>#include <wx/string.h>Go to the source code of this file.
Functions | |
| 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().