mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-01 23:35:59 +00:00
If a mDNS response for a host happened during the period where we had removed the host from discovery, it would be re-added by mDNS without the pairing cert. Now we no longer completely remove the host and instead just remember that it's paused.
32 lines
864 B
Objective-C
32 lines
864 B
Objective-C
//
|
|
// DiscoveryManager.h
|
|
// Moonlight
|
|
//
|
|
// Created by Diego Waxemberg on 1/1/15.
|
|
// Copyright (c) 2015 Moonlight Stream. All rights reserved.
|
|
//
|
|
|
|
#import "MDNSManager.h"
|
|
#import "TemporaryHost.h"
|
|
|
|
@protocol DiscoveryCallback <NSObject>
|
|
|
|
- (void) updateAllHosts:(NSArray*)hosts;
|
|
|
|
@end
|
|
|
|
@interface DiscoveryManager : NSObject <MDNSCallback>
|
|
|
|
- (id) initWithHosts:(NSArray*)hosts andCallback:(id<DiscoveryCallback>) callback;
|
|
- (void) startDiscovery;
|
|
- (void) stopDiscovery;
|
|
- (void) stopDiscoveryBlocking;
|
|
- (void) resetDiscoveryState;
|
|
- (BOOL) addHostToDiscovery:(TemporaryHost*)host;
|
|
- (void) removeHostFromDiscovery:(TemporaryHost*)host;
|
|
- (void) pauseDiscoveryForHost:(TemporaryHost *)host;
|
|
- (void) resumeDiscoveryForHost:(TemporaryHost *)host;
|
|
- (void) discoverHost:(NSString*)hostAddress withCallback:(void (^)(TemporaryHost*, NSString*))callback;
|
|
|
|
@end
|