NSNetServiceBrowser

NSNetServiceBrowser Mac OS X 10.2

NSNetServiceBrowser is the complement to NSNetService and it serves two purposes: searching for network domains, and searching for network services advertised on a given domain. When searching for domains we can either look for all domains, or only those that we have registration authority in. These searches are performed by invoking the methods searchForAllDomains and searchForRegistrationDomains, respectively. For more information about Rendezvous and the Net Services APIs in Foundation, see Chapter 6.

figs/cocn_1366.gif

@interface NSNetServiceBrowser : NSObject
 // Initializers
   - (id)init;
 // Accessor Methods
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
 // Instance Methods
   - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;
   - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;
   - (void)searchForAllDomains;
   - (void)searchForRegistrationDomains;
   - (void)searchForServicesOfType:(NSString *)type inDomain:(NSString *)domainString;
   - (void)stop;
// Methods Implemented by the Delegate
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindDomain:(NSString *)domainString
        moreComing:(BOOL)moreComing;
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService
        moreComing:(BOOL)moreComing;
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didNotSearch:(NSDictionary *)errorDict;
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didRemoveDomain:(NSString *)domainString
        moreComing:(BOOL)moreComing;
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didRemoveService:(NSNetService *)aNetService
        moreComing:(BOOL)moreComing;
   - (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)aNetServiceBrowser;
   - (void)netServiceBrowserWillSearch:(NSNetServiceBrowser *)aNetServiceBrowser;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes