20#ifndef GIT_TRANSFER_BUSY_H
21#define GIT_TRANSFER_BUSY_H
67 void Begin(
const std::shared_ptr<KIGIT_COMMON>& aRepo,
const wxString& aStatus,
68 std::function<
void()> aCancel );
One transfer's hold on its repository, released when reset, begun again or destroyed.
void Begin(const std::shared_ptr< KIGIT_COMMON > &aRepo, const wxString &aStatus, std::function< void()> aCancel)
Release any earlier hold, then hold aRepo busy for one transfer.
HOLD & operator=(const HOLD &)=delete
std::weak_ptr< KIGIT_COMMON > m_repo
HOLD(const HOLD &)=delete
friend class GIT_TRANSFER_BUSY
The transfers running on one repository, so every window can show and cancel the others'.
wxString Status(const HOLD &aExcept) const
The status of the latest live transfer other than aExcept's, or empty when none is.
void CancelAll()
Call each live transfer's cancel once. They stay live until their owners end them.
bool CanCancel(const HOLD &aExcept) const
True while a live transfer other than aExcept's has a cancel that has not been called.
std::map< uint64_t, LIVE > m_live
Keyed by an id that only grows, so the last entry is the latest transfer.
bool IsBusy(const HOLD &aExcept) const
True while a transfer other than aExcept's is live.
Told whenever a transfer on the repository it subscribed to begins or ends.
virtual ~GIT_TRANSFER_WATCHER()=default
virtual void OnGitTransfersChanged()=0
The project's git session.
#define APIEXPORT
Macros which export functions from a DLL/DSO.
std::function< void()> cancel