repo: add Status member that gets updates dynamically

This commit is contained in:
Hylke Bons 2011-05-17 02:54:38 +01:00
parent be219a85dc
commit 1eac6ea67b

View file

@ -52,6 +52,7 @@ namespace SparkleLib {
private bool is_polling;
private bool has_unsynced_changes;
private bool server_online;
private SyncStatus status;
public readonly SparkleBackend Backend;
public readonly string Name;
@ -99,6 +100,12 @@ namespace SparkleLib {
}
}
public SyncStatus Status {
get {
return this.status;
}
}
public delegate void SyncStatusChangedEventHandler (SyncStatus status);
public event SyncStatusChangedEventHandler SyncStatusChanged;
@ -130,6 +137,10 @@ namespace SparkleLib {
this.has_changed = false;
this.change_lock = new Object ();
SyncStatusChanged += delegate (SyncStatus status) {
this.status = status;
};
if (IsEmpty)
this.revision = null;
else