Move NSStream addition declarations to separate file.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29853 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-03-05 12:41:40 +00:00
parent 1a4662001d
commit f59ba481f0
9 changed files with 228 additions and 83 deletions

View file

@ -54,6 +54,7 @@ Additions_OBJC_FILES =\
NSNumber+GNUstepBase.m \
NSObject+GNUstepBase.m \
NSProcessInfo+GNUstepBase.m \
NSStream+GNUstepBase.m \
NSString+GNUstepBase.m \
NSTask+GNUstepBase.m \
NSThread+GNUstepBase.m \

View file

@ -0,0 +1,95 @@
/* Implementation of extension methods to base additions
Copyright (C) 2010 Free Software Foundation, Inc.
Written by: Richard Frith-Macdonald <rfm@gnu.org>
This file is part of the GNUstep Base Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#import "common.h"
#import "GNUstepBase/NSStream+GNUstepBase.h"
/* Code used in GNUstepBase
*/
NSString * const GSStreamLocalAddressKey
= @"GSStreamLocalAddressKey";
NSString * const GSStreamLocalPortKey
= @"GSStreamLocalPortKey";
NSString * const GSStreamRemoteAddressKey
= @"GSStreamRemoteAddressKey";
NSString * const GSStreamRemotePortKey
= @"GSStreamRemotePortKey";
/* The remaining code is specific to the Apple Foundation
*/
#if !defined(GNUSTEP)
@implementation NSStream (GNUstepBase)
+ (void) getLocalStreamsToPath: (NSString *)path
inputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream
{
[self notImplemented: _cmd];
}
+ (void) pipeWithInputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream
{
[self notImplemented: _cmd];
}
@end
@implememntation GSServerStream
+ (id) allocWithZone: (NSZone*)z
{
return [self notImplemented: _cmd];
}
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port
{
return [self notImplemented: _cmd];
}
+ (id) serverStreamToAddr: (NSString*)addr
{
return [self notImplemented: _cmd];
}
- (void) acceptWithInputStream: (NSInputStream **)inputStream
outputStream: (NSOutputStream **)outputStream
{
return [self notImplemented: _cmd];
}
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
{
return [self notImplemented: _cmd];
}
- (id) initToAddr: (NSString*)addr
{
return [self notImplemented: _cmd];
}
@end
#endif

View file

@ -131,6 +131,7 @@ NSMutableString+GNUstepBase.h \
NSNumber+GNUstepBase.h \
NSObject+GNUstepBase.h \
NSProcessInfo+GNUstepBase.h \
NSStream+GNUstepBase.h \
NSString+GNUstepBase.h \
NSTask+GNUstepBase.h \
NSThread+GNUstepBase.h \

View file

@ -98,7 +98,7 @@ SOCKIVARS
- (void) _setSock: (SOCKET)sock;
/*
* Set the socket addres from string information.
* Set the socket address from string information.
*/
- (BOOL) _setSocketAddress: (NSString*)address
port: (NSInteger)port

View file

@ -56,9 +56,10 @@
`-- GSLocalServerStream (gnu/linux)
*/
#include <Foundation/NSStream.h>
#include <Foundation/NSRunLoop.h>
#include <Foundation/NSMapTable.h>
#import "Foundation/NSStream.h"
#import "Foundation/NSRunLoop.h"
#import "Foundation/NSMapTable.h"
#import "GNUstepBase/NSStream+GNUstepBase.h"
/**
* Convenience methods used to add streams to the run loop.

View file

@ -77,15 +77,6 @@ NSString * const NSStreamSOCKSProxyVersion5
NSString * const NSStreamSOCKSProxyVersionKey
= @"NSStreamSOCKSProxyVersionKey";
NSString * const GSStreamLocalAddressKey
= @"GSStreamLocalAddressKey";
NSString * const GSStreamLocalPortKey
= @"GSStreamLocalPortKey";
NSString * const GSStreamRemoteAddressKey
= @"GSStreamRemoteAddressKey";
NSString * const GSStreamRemotePortKey
= @"GSStreamRemotePortKey";
/*
* Determine the type of event to use when adding a stream to the run loop.