Add methods from Rhapsody.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3220 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1998-11-16 19:36:51 +00:00
parent 0387bd532c
commit b9d90bf382
10 changed files with 116 additions and 3 deletions

View file

@ -1,3 +1,18 @@
Mon Nov 16 14:29:35 1998 Adam Fedor <fedor@ultra.doc.com>
* src/NSBundle.m [+allBundles]: New method (unimplemented).
[+allFrameworks]: Likewise.
* src/NSCharacterSet.m [+punctuationCharacterSet]: Likewise.
* src/NSLock.m [-lockBeforeDate:]: Likewise.
[-lockWhenCondition:beforeDate:]: Likewise.
* src/NSConnection.m: Likewise.
* src/include/NSBundle.h: New methods;
* src/include/NSCharacterSet.h: Likewise.
* src/include/NSLock.h: Likewise.
* src/include/NSConnection.h: Likewise.
* src/include/fast.x: Fix /* in comment.
Thu Nov 12 17:30:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
src/NSFormatter.m: New class

View file

@ -45,6 +45,8 @@ extern NSString* NSLoadedClasses;
unsigned int _version;
}
+ (NSArray *) allBundles;
+ (NSArray *) allFrameworks;
+ (NSBundle *) mainBundle;
+ (NSBundle *) bundleForClass: (Class)aClass;
+ (NSBundle *) bundleWithPath: (NSString *)path;

View file

@ -39,6 +39,7 @@
+ (NSCharacterSet *)letterCharacterSet;
+ (NSCharacterSet *)lowercaseLetterCharacterSet;
+ (NSCharacterSet *)nonBaseCharacterSet;
+ (NSCharacterSet *)punctuationCharacterSet;
+ (NSCharacterSet *)uppercaseLetterCharacterSet;
+ (NSCharacterSet *)whitespaceAndNewlineCharacterSet;
+ (NSCharacterSet *)whitespaceCharacterSet;

View file

@ -37,6 +37,7 @@
@class NSDistantObject;
@class NSPort;
@class NSData;
/*
* Keys for the NSDictionary returned by [NSConnection -statistics]
@ -85,17 +86,23 @@ extern NSString *NSConnectionProxyCount; /* Objects received */
+ (NSArray*) allConnections;
+ (NSConnection*) connectionWithRegisteredName: (NSString*)n
host: (NSString*)h;
+ (id)currentConversation;
+ (NSConnection*) defaultConnection;
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)name
host: (NSString*)host;
- (void) addRequestMode: (NSString*)mode;
- (void) addRunLoop: (NSRunLoop *)runloop;
- (id) delegate;
- (void) enableMultipleThreads;
- (BOOL) multipleThreadsEnabled;
- (BOOL) independantConversationQueueing;
- (void) invalidate;
- (BOOL) isValid;
- (BOOL) registerName: (NSString*)name;
- (NSArray *) remoteObjects;
- (void) removeRequestMode: (NSString*)mode;
- (void) removeRunLoop: (NSRunLoop *)runloop;
- (NSTimeInterval) replyTimeout;
- (NSArray*) requestModes;
- (NSTimeInterval) requestTimeout;
@ -211,7 +218,12 @@ extern NSString *NSConnectionProxyCount; /* Objects received */
- (void) addProxy: (NSDistantObject*)aProxy;
- (id) includesProxyForTarget: (void*)target;
- (void) removeProxy: (NSDistantObject*)aProxy;
- (id <Collecting>) localObjects;
// It seems to be a non pure-OPENSTEP definition...
//- (id <Collecting>) localObjects;
//
// new def :
- (NSArray *)localObjects;
- (void) addLocalObject: anObj;
- (id) includesLocalObject: anObj;
- (void) removeLocalObject: anObj;
@ -276,6 +288,12 @@ extern NSString *ConnectionBecameInvalidNotification;
* sent bycopy, in which case the actual object is returned.
* To force bycopy, an object should return itsself.
*/
- (BOOL)authenticateComponents: (NSArray *)components
withData: (NSData *)authenticationData;
- (NSData *)authenticationDataForComponents: (NSArray *)components;
@end
#define CONNECTION_DEFAULT_TIMEOUT 15.0 /* in seconds */

View file

@ -55,6 +55,7 @@
}
- (BOOL)tryLock;
- (BOOL)lockBeforeDate:(NSDate *)limit;
// NSLocking protocol
- (void)lock;
@ -85,6 +86,10 @@
- (void)unlockWithCondition:(int)value;
- (BOOL)tryLock;
- (BOOL)tryLockWhenCondition:(int)value;
// Acquiring the lock with a date condition
- (BOOL)lockBeforeDate:(NSDate *)limit;
- (BOOL)lockWhenCondition:(int)condition
beforeDate:(NSDate *)limit;
// NSLocking protocol
- (void)lock;
@ -107,6 +112,7 @@
}
- (BOOL)tryLock;
- (BOOL)lockBeforeDate:(NSDate *)limit;
// NSLocking protocol
- (void)lock;

View file

@ -114,6 +114,7 @@ extern void _fastBuildCache();
* The '_fastMallocBuffer()' function is called to get a chunk of
* memory that will automatically be released when the current
* autorelease pool goes away.
*/
extern void *_fastMallocBuffer(unsigned size);
/*

View file

@ -246,6 +246,16 @@ _bundle_load_callback(Class theClass, Category *theCategory)
}
}
+ (NSArray *) allBundles
{
return [self notImplemented: _cmd];
}
+ (NSArray *) allFrameworks
{
return [self notImplemented: _cmd];
}
+ (NSBundle *)mainBundle
{
[load_lock lock];

View file

@ -229,6 +229,11 @@ static NSLock* cache_lock = nil;
return [self _bitmapForSet:@"nonbaseCharSet" number: 7];
}
+ (NSCharacterSet *)punctuationCharacterSet;
{
return [self notImplemented: _cmd];
}
+ (NSCharacterSet *)uppercaseLetterCharacterSet
{
return [self _bitmapForSet:@"uppercaseCharSet" number: 8];

View file

@ -362,6 +362,12 @@ static int messages_received_count;
return newConn;
}
+ (id)currentConversation
{
[self notImplemented: _cmd];
return self;
}
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
host: (NSString*)h
{
@ -444,6 +450,18 @@ static int messages_received_count;
return independant_queueing;
}
- (void) enableMultipleThreads
{
[self notImplemented: _cmd];
}
- (BOOL) multipleThreadsEnabled
{
[self notImplemented: _cmd];
return NO;
}
- (id) init
{
id newPort = [[default_receive_port_class newForReceiving] autorelease];
@ -560,6 +578,12 @@ static int messages_received_count;
[super release];
}
- (NSArray *) remoteObjects
{
[self notImplemented: _cmd];
return nil;
}
- (void) removeRequestMode: (NSString*)mode
{
if ([request_modes containsObject:mode]) {
@ -568,6 +592,11 @@ static int messages_received_count;
}
}
- (void) removeRunLoop: (NSRunLoop *)runloop
{
[self notImplemented: _cmd];
}
- (NSTimeInterval) replyTimeout
{
return reply_timeout;
@ -1922,7 +1951,7 @@ static int messages_received_count;
[self _release_targets:&aProxy count:1];
}
- (id <Collecting>) localObjects
- (NSArray *) localObjects
{
id c;
@ -1933,7 +1962,7 @@ static int messages_received_count;
return c;
}
- (id <Collecting>) proxies
- (NSArray *) proxies
{
id c;

View file

@ -102,6 +102,12 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
return YES;
}
- (BOOL)lockBeforeDate:(NSDate *)limit
{
[self notImplemented: _cmd];
return NO;
}
// NSLocking protocol
- (void) lock
{
@ -290,6 +296,20 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
}
}
// Acquiring the lock with a date condition
- (BOOL)lockBeforeDate:(NSDate *)limit
{
[self notImplemented: _cmd];
return NO;
}
- (BOOL)lockWhenCondition:(int)condition
beforeDate:(NSDate *)limit
{
[self notImplemented: _cmd];
return NO;
}
// NSLocking protocol
// These methods ignore the condition
- (void) lock
@ -376,6 +396,12 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
return YES;
}
- (BOOL)lockBeforeDate:(NSDate *)limit
{
[self notImplemented: _cmd];
return NO;
}
// NSLocking protocol
- (void) lock
{