1
/* Interface of NSPortNameServer class for Distributed Objects
2
Copyright (C) 1998,1999 Free Software Foundation, Inc.
4
Written by: Richard Frith-Macdonald <richard@brainstorm.co.uk>
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 Library 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 Library General Public
20
License along with this library; if not, write to the Free
21
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
24
#ifndef __NSPortNameServer_h_GNUSTEP_BASE_INCLUDE
25
#define __NSPortNameServer_h_GNUSTEP_BASE_INCLUDE
27
#include <Foundation/NSObject.h>
29
@class NSPort, NSString, NSMutableArray;
31
@interface NSPortNameServer : NSObject
33
NSMapTable *_portMap; /* Registered ports information. */
34
NSMapTable *_nameMap; /* Registered names information. */
36
+ (id) systemDefaultPortNameServer;
37
- (NSPort*) portForName: (NSString*)name;
38
- (NSPort*) portForName: (NSString*)name
39
onHost: (NSString*)host;
40
- (BOOL) registerPort: (NSPort*)port
41
forName: (NSString*)name;
42
- (BOOL) removePortForName: (NSString*)name;
46
@interface NSPortNameServer (GNUstep)
47
- (NSArray*) namesForPort: (NSPort*)port; /* return all names for port */
48
- (BOOL) removePort: (NSPort*)port; /* remove all names for port */
49
- (BOOL) removePort: (NSPort*)port forName: (NSString*)name;