20#ifndef GIT_CREDENTIALS_PROMPT_H
21#define GIT_CREDENTIALS_PROMPT_H
59 const wxString& aExplanation = wxEmptyString );
100 PROJECT* aProject,
const TRANSFER_FAILURE& aFailure,
bool aRetriedAfterTrust,
125 const wxString& aUserName );
The base frame for deriving all KiCad main window classes.
The project's git session.
Container for project specific data.
constexpr int MAX_CREDENTIAL_PROMPTS
Keyring reads and credential prompts that may follow a request's failures before one is reported inst...
void ClearSyncWarnings(wxWindow *aWindow)
Clear the background fetch's warnings from the frame holding aWindow.
GitUserConfig ResolveGitIdentity(const GIT_IDENTITY &aIdentity, const COMMON_SETTINGS::GIT &aPreferences, const wxString &aUserName)
Fill missing values from custom preferences, then use the OS user name if needed.
@ ABANDONED
The parent closed while the prompt was up, so the caller must not touch it.
constexpr const wxChar * SYNC_WARNING_SOURCE
The status bar source under which background fetch failures are listed.
GIT_IDENTITY ReadGitIdentity(KIGIT_COMMON &aCommon)
Read on a worker while holding the session's action lock.
bool EnsureGitIdentity(wxWindow *aParent, EDA_BASE_FRAME *aFrame, const std::shared_ptr< KIGIT_COMMON > &aCommon, const GIT_IDENTITY &aIdentity)
Open the same editor when the worker snapshot has no usable Git identity.
TRANSFER_RETRY AnswerTransferFailure(wxWindow *aParent, const std::weak_ptr< bool > &aAlive, KIGIT_COMMON *aCommon, PROJECT *aProject, const TRANSFER_FAILURE &aFailure, bool aRetriedAfterTrust, int &aPrompts)
Answer a failed transfer the way every window does.
PROMPT_ANSWER PromptForCredentials(wxWindow *aParent, KIGIT_COMMON *aCommon, PROJECT *aProject=nullptr, const wxString &aExplanation=wxEmptyString)
Ask the user for the credentials of the session's remote and apply them to the session.
PROMPT_ANSWER PromptToTrustHost(wxWindow *aParent, const HOST_KEY_FAILURE &aFailure, bool aRetriedAfterTrust)
Ask whether to trust a server seen for the first time, and remember its key when the user agrees.
TRANSFER_RETRY
What a window does after AnswerTransferFailure.
@ RETRY_TRUSTED
Run it again, now that the server's key is trusted.
@ GONE
The window closed during a prompt, so the caller must not touch it.
@ CANCELLED
Stop and say so, the user cancelled the transfer or a prompt.
@ RETRY
Run the transfer again.
@ REPORT
Show the failure.
@ HOST_DECLINED
Stop without a message, the user chose not to trust the server.
bool EditGitIdentity(wxWindow *aParent, EDA_BASE_FRAME *aFrame, const std::shared_ptr< KIGIT_COMMON > &aCommon, const GIT_IDENTITY &aIdentity)
Edit the repository's author and refresh Git views after saving.
Repository values and whether Git can use them to record a commit.
Why a transfer to a remote failed.
bool cancelled
The user cancelled the transfer.
std::optional< HOST_KEY_FAILURE > hostKey
The server's key is unknown or has changed.
bool authFailure
The remote refused every credential offered.
wxString error
Shown above the credential fields.