mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Finnaly working NSNetServices via avahi-client.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30956 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
15f33318ea
commit
71b2a1ff73
4 changed files with 49 additions and 43 deletions
|
@ -1,3 +1,12 @@
|
|||
2010-07-13 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Headers/Foundation/NSNetServices.h: Update to a version working with
|
||||
both mDNSResponder and Avahi.
|
||||
* Source/GSAvahiNetService.m: Fix leftover duplicate variables.
|
||||
* Source/GSNetServices.h: Revert to r30954, but add padding ivars to
|
||||
the Avahi classes.
|
||||
Make Avahi-NSNetServices work again.
|
||||
|
||||
2010-07-13 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Source/NSNetServices.m: Replace with the new version.
|
||||
|
|
|
@ -127,12 +127,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
|
||||
@interface NSNetService : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSNetService)
|
||||
@private
|
||||
void *_netService;
|
||||
id _delegate;
|
||||
void *_reserved;
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSData *) dataFromTXTRecordDictionary: (NSDictionary *) txtDictionary;
|
||||
|
@ -214,12 +209,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
|
||||
@interface NSNetServiceBrowser : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSNetServiceBrowser)
|
||||
@private
|
||||
void *_netServiceBrowser;
|
||||
id _delegate;
|
||||
void *_reserved;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (id) init;
|
||||
|
|
|
@ -642,7 +642,6 @@ GSAvahiEntryGroupStateChanged(AvahiEntryGroup *group,
|
|||
- (void) netService: (NSNetService*)service
|
||||
didUpdateAddresses: (NSArray*)addresses
|
||||
{
|
||||
id _delegate = [self delegate];
|
||||
if ([_delegate respondsToSelector: @selector(netService:didUpdateAddresses:)])
|
||||
{
|
||||
[_delegate netService: service
|
||||
|
@ -655,7 +654,6 @@ didUpdateRecordData: (id)data
|
|||
forRecordType: (NSString*)rrType
|
||||
{
|
||||
SEL theSelector = NULL;
|
||||
id _delegate = [self delegate];
|
||||
if ([rrType isEqualToString: @"A"] || [rrType isEqualToString: @"AAAA"])
|
||||
{
|
||||
[self netService: service didUpdateAddresses: [self addresses]];
|
||||
|
@ -690,7 +688,6 @@ didUpdateRecordData: (id)data
|
|||
didNotMonitor: (NSDictionary*)errorDict
|
||||
forRecordType: (NSString*)rrType
|
||||
{
|
||||
id _delegate = [self delegate];
|
||||
SEL theSelector = NSSelectorFromString([NSString stringWithFormat:
|
||||
@"netService:didNotMonitor%@RecordData:", rrType]);
|
||||
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
* NSNetService using the mDNSResponder API.
|
||||
*/
|
||||
@interface GSMDNSNetService : NSNetService
|
||||
{
|
||||
void *_netService;
|
||||
void *_reserved;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
@ -40,6 +44,10 @@
|
|||
* NSNetServiceBrowser using the mDNSResponder API.
|
||||
*/
|
||||
@interface GSMDNSNetServiceBrowser : NSNetServiceBrowser
|
||||
{
|
||||
void *_netServiceBrowser;
|
||||
void *_reserved;
|
||||
}
|
||||
@end
|
||||
|
||||
// Subclasses using Avahi:
|
||||
|
@ -101,6 +109,7 @@ NSString* GSNetServiceDotTerminatedNSStringFromString(const char* string);
|
|||
NSMapTable *_browsers;
|
||||
NSMapTable *_browserTimeouts;
|
||||
NSTimer *_timer;
|
||||
id _reserved;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,5 +139,6 @@ NSString* GSNetServiceDotTerminatedNSStringFromString(const char* string);
|
|||
GSAvahiBrowserType _type;
|
||||
BOOL _hasFirstEvent;
|
||||
NSMutableDictionary *_services;
|
||||
id _reserved;
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue