Extract a per-user background host so indexing can later run outside the window.
Keep the GUI as the index writer for now; mutex, named pipe, and opt-in logon autostart prepare Explorer.Host.exe without two SQLite writers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
36
src/Explorer.Contracts/IWorkbenchHost.cs
Normal file
36
src/Explorer.Contracts/IWorkbenchHost.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Explorer.Domain;
|
||||
|
||||
namespace Explorer.Contracts;
|
||||
|
||||
public interface IWorkbenchHost
|
||||
{
|
||||
IIndexingHost Indexing { get; }
|
||||
ITransferHost Transfers { get; }
|
||||
}
|
||||
|
||||
public interface IIndexingHost
|
||||
{
|
||||
event EventHandler<ScanProgress>? ProgressChanged;
|
||||
void EnqueueFullScan(long sourceId);
|
||||
void EnqueueFolderScan(long sourceId, string pathRel);
|
||||
void EnqueueReconcile(long sourceId, string pathRel);
|
||||
void Cancel(long sourceId);
|
||||
}
|
||||
|
||||
public interface ITransferHost
|
||||
{
|
||||
event EventHandler? Changed;
|
||||
event EventHandler<TransferJob>? JobFinished;
|
||||
bool IsPaused { get; }
|
||||
IReadOnlyList<TransferJob> Snapshot();
|
||||
void PauseAll();
|
||||
void ResumeAll();
|
||||
void Pause(long jobId);
|
||||
void Resume(long jobId);
|
||||
void Retry(long jobId);
|
||||
void Cancel(long jobId);
|
||||
void Dismiss(long jobId);
|
||||
void ClearFinished();
|
||||
bool MoveUp(long jobId);
|
||||
bool MoveDown(long jobId);
|
||||
}
|
||||
Reference in New Issue
Block a user