void service_Resolved(object o, ServiceResolvedEventArgs args) { IResolvableService service = args.Service; service.Resolved -= new ServiceResolvedEventHandler(service_Resolved); DestinationPlatformType fcPlatform = KnownDestinationPlatformType.Other; if (service.TxtRecord != null) { foreach (TxtRecordItem record in service.TxtRecord) { if (record.Key == "platform") { string platform = record.ValueString; fcPlatform = KnownDestinationPlatformType.FromString(platform); break; } } } BonjourEventArgs e = new BonjourEventArgs(fcPlatform); this.OnServiceFound(service, e); }
void sc_OKResponse(Growl.Daemon.SubscriptionResponse response) { this.isSubscribing = false; string additionalInfo = (this.Enabled ? String.Format("TTL: {0}", response.TTL) : null); this.Platform = KnownDestinationPlatformType.FromString(response.PlatformName); ChangeStatus(true, additionalInfo); // if the subscription succeeds, the SubscriptionConnecter will take care of keeping the subscription alive }
public object GetRealObject(StreamingContext context) { return(KnownDestinationPlatformType.FromString(platform)); }
public SubscribedForwardDestination(Growl.Daemon.Subscriber subscriber, int ttl) : this(subscriber.Name, true, subscriber.IPAddress, subscriber.Port, subscriber.Key.Password, KnownDestinationPlatformType.FromString(subscriber.PlatformName), ttl) { base.Key = subscriber.ID; this.hashAlgorithm = subscriber.Key.HashAlgorithm; this.encryptionAlgorithm = subscriber.Key.EncryptionAlgorithm; }