public override DestinationBase Clone() { SubscribedForwardDestination clone = new SubscribedForwardDestination(this.Description, this.Enabled, this.IPAddress, this.Port, this.Password, this.Platform, this.TTL, this.Available); return(clone); }
public override DestinationBase Clone() { SubscribedForwardDestination clone = new SubscribedForwardDestination(this.Description, this.Enabled, this.IPAddress, this.Port, this.Password, this.Platform, this.TTL, this.Available); return clone; }
void sfc_Unsubscribed(SubscribedForwardDestination sfc) { RemoveForwardDestination(sfc); OnForwardDestinationsUpdated(); }
Growl.Daemon.SubscriptionResponse gntpListener_SubscribeReceived(Growl.Daemon.Subscriber subscriber, Growl.Connector.RequestInfo requestInfo) { bool alertUser = true; int ttl = Properties.Settings.Default.SubscriptionTTL; SubscribedForwardDestination subscribedComputer = null; if (this.forwards.ContainsKey(subscriber.ID)) { ForwardDestination fc = this.forwards[subscriber.ID]; subscribedComputer = fc as SubscribedForwardDestination; if (subscribedComputer != null) { alertUser = false; } } if (subscribedComputer == null) { subscribedComputer = new SubscribedForwardDestination(subscriber, ttl); subscribedComputer.Unsubscribed += new SubscribedForwardDestination.SubscribingComputerUnscubscribedEventHandler(sfc_Unsubscribed); AddForwardDestination(subscribedComputer); } subscribedComputer.Renew(); if (alertUser) { string title = Properties.Resources.SystemNotification_ClientSubscribed_Title; string text = String.Format(Properties.Resources.SystemNotification_ClientSubscribed_Text, subscriber.Name); SendSystemNotification(title, text); } Growl.Daemon.SubscriptionResponse response = new Growl.Daemon.SubscriptionResponse(ttl); // SUBSCRIBE requests are *not* forwarded (it could cause an endless loop, and it doesnt make sense anyway) return response; }