diff --git a/SparkleLib/SparkleListenerBase.cs b/SparkleLib/SparkleListenerBase.cs index 4107c25c..7bacb3c3 100644 --- a/SparkleLib/SparkleListenerBase.cs +++ b/SparkleLib/SparkleListenerBase.cs @@ -98,36 +98,21 @@ namespace SparkleLib { public abstract bool IsConnected { get; } - // Announcements that weren't sent off - // because we were disconnected + protected List channels = new List (); protected List queue_up = new List (); protected List queue_down = new List (); - protected string server; - protected List channels = new List (); protected bool is_connecting; + protected string server; public SparkleListenerBase (string server, string folder_identifier, NotificationServerType type) { } - public string Server { - get { - return this.server; - } - } - - - public bool IsConnecting { - get { - return this.is_connecting; - } - } - - public void AnnounceBase (SparkleAnnouncement announcement) { if (IsConnected) { SparkleHelpers.DebugInfo ("Listener", "Announcing to " + announcement.FolderIdentifier + " on " + this.server); Announce (announcement); + } else { SparkleHelpers.DebugInfo ("Listener", "Not connected to " + this.server + ". Queuing message"); this.queue_up.Add (announcement); @@ -183,5 +168,19 @@ namespace SparkleLib { if (RemoteChange != null) RemoteChange (announcement); } + + + public string Server { + get { + return this.server; + } + } + + + public bool IsConnecting { + get { + return this.is_connecting; + } + } } }