Add a few OSX 10.6 methods for NSPropertyList.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31692 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-11-29 22:54:28 +00:00
parent a9face8dc8
commit 850c2fb314
3 changed files with 232 additions and 113 deletions

View file

@ -37,7 +37,7 @@ extern "C" {
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
@class NSData, NSString;
@class NSData, NSString, NSInputStream, NSOutputStream;
enum {
NSPropertyListImmutable = 0,
@ -64,6 +64,12 @@ enum {
NSPropertyListGNUstepFormat = 1000,
NSPropertyListGNUstepBinaryFormat,
};
#if OS_API_VERSION(100600,GS_API_LATEST)
typedef NSUInteger NSPropertyListWriteOptions;
typedef NSUInteger NSPropertyListReadOptions;
#endif
/**
* Specifies the serialisation format for a serialised property list.
* <list>
@ -254,6 +260,26 @@ typedef NSUInteger NSPropertyListFormat;
format: (NSPropertyListFormat*)aFormat
errorDescription: (NSString**)anErrorString;
#if OS_API_VERSION(100600,GS_API_LATEST)
+ (NSData *) dataWithPropertyList: (id)aPropertyList
format: (NSPropertyListFormat)aFormat
options: (NSPropertyListWriteOptions)anOption
error: (NSError**)error;
+ (id) propertyListWithData: (NSData*)data
options: (NSPropertyListReadOptions)anOption
format: (NSPropertyListFormat*)aFormat
error: (NSError**)error;
+ (id) propertyListWithStream: (NSInputStream*)stream
options: (NSPropertyListReadOptions)anOption
format: (NSPropertyListFormat*)aFormat
error: (NSError**)error;
+ (NSInteger) writePropertyList: (id)plist
toStream: (NSOutputStream*)stream
format: (NSPropertyListFormat)aFormat
options: (NSPropertyListWriteOptions)anOption
error: (NSError**)error;
#endif
@end
#endif /* GS_API_MACOSX */