* Refactored MYPortMapper to use a new abstract base class MYDNSService; that way I can re-use it later for implementing Bonjour.
* Fixed issue #1: a memory leak in BLIPProperties, reported by codechemist.
5 // Created by Jens Alfke on 4/23/09.
6 // Copyright 2009 Jens Alfke. All rights reserved.
9 #import <Foundation/Foundation.h>
10 #import <CoreFoundation/CFSocket.h>
13 /** Abstract superclass for services based on DNSServiceRefs, such as MYPortMapper. */
14 @interface MYDNSService : NSObject
17 struct _DNSServiceRef_t *_serviceRef;
19 CFRunLoopSourceRef _socketSource;
23 /** Starts the service.
24 Returns immediately; you can find out when the service actually starts (or fails to)
25 by observing the isOpen and error properties.
26 It's very unlikely that this call itself will fail (return NO). If it does, it
27 probably means that the mDNSResponder process isn't working. */
33 @property (readonly) struct _DNSServiceRef_t* serviceRef;
35 /** The error status, a DNSServiceErrorType enum; nonzero if something went wrong.
36 This property is KV observable. */
37 @property SInt32 error;
41 /** Subclass must implement this abstract method to create a new DNSServiceRef.
42 This method is called by -open.
43 If an error occurs, the method should set self.error and return NULL.*/
44 - (struct _DNSServiceRef_t*) createServiceRef;