1
/* Declarations of GNUstep extensions to NSNetService.
2
Copyright (C) 2010 Free Software Foundation, Inc.
4
Written by: Niels Grewe <niels.grewe@halbordnung.de>
7
This file is part of the GNUstep Base Library.
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Lesser General Public
11
License as published by the Free Software Foundation; either
12
version 2 of the License, or (at your option) any later version.
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Library General Public License for more details.
19
You should have received a copy of the GNU Lesser General Public
20
License along with this library; if not, write to the Free
21
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25
#import <Foundation/NSNetServices.h>
26
#import <GNUstepBase/GSConfig.h>
29
* Only enable extensions if the Avahi API is used. The mDNS based NSNetService
30
* doesn't support them yet.
33
@interface NSNetService (GNUstepBase)
35
* Starts monitoring the service represented by the receiver for changes in a
36
* resource record of <code>recordType</code>. The delegate must either
37
* implement a -netService:didUpateFOORecordData: method, where "FOO" is the
38
* record type monitored, or the generic
39
* -netService:didUpdateRecordData:forRecordType: method.
41
- (void) startMonitoringForRecordType: (NSString*)recordType;
44
* Stops monitoring for the specified record type.
46
- (void) stopMonitoringForRecordType: (NSString*)recordType;
49
* Adds the service record for a service set up for publishing. The return value
50
* of this method indicates whether the record was successfully added. The
51
* record will only be published when -publish is called and it is thus
52
* considered an error to call this method on a published service.
54
- (BOOL) addServiceRecord;
57
* Sets <code>data</code> as the value of a resource record of the specified
58
* <code>type</code>. The return value of this method indicates whether the
59
* record was successfully added. The record will only be published when
60
* -publish is called and it is thus considered an error to call this method on
61
* a published service. (But it is possible to add a new record to a published
62
* NSNetService by creating a new NSNetService instance with the same name,
63
* type, domain and port parameters and publish only the new record in that
66
- (BOOL) addRecordData: (NSData*)data
67
forRecordType: (NSString*)type;
70
* Returns the record data for the specified record type. If there is only one
71
* such record, the return value will be an NSData object, otherwise it will be
74
- (id) recordDataForRecordType: (NSString*)type;
77
* Returns the full name (including, name, type, and domain) of the service.
79
- (NSString*) fullServiceName;
81
#endif // GS_USE_AVAHI