Merge pull request #10 from gunyarakun/fix-invalid-return
[cocotron.git] / Foundation / NSPlatform.m
blobd07c07ee1d809213687462ebd43c235e010fc309
1 /* Copyright (c) 2006-2007 Christopher J. W. Lloyd
3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
9 #import <Foundation/NSPlatform.h>
10 #import <Foundation/NSThread.h>
11 #import <Foundation/NSString.h>
12 #import <Foundation/NSRaise.h>
13 #import <Foundation/NSDebug.h>
14 #import <Foundation/NSArray.h>
15 #import <Foundation/NSPipe.h>
16 #import <Foundation/NSMutableDictionary.h>
17 #import <Foundation/NSNotificationCenter.h>
18 #import <Foundation/NSFileHandle.h>
19 #import <Foundation/NSRunLoop.h>
20 #import <Foundation/NSData.h>
21 #import <Foundation/NSRaiseException.h>
23 extern NSString *NSPlatformClassName;
25 @implementation NSPlatform
27 +currentPlatform {
28    return NSThreadSharedInstance(NSPlatformClassName);
31 -(NSInputSource *)parentDeathInputSource {
32    return nil;
35 -(Class)taskClass {
36    NSInvalidAbstractInvocation();
37    return Nil;
40 -(Class)socketClass {
41    NSInvalidAbstractInvocation();
42    return Nil;
45 -(Class)socketPortClass {
46     NSInvalidAbstractInvocation();
47     return Nil;
50 -(Class)pipeClass {
51    NSInvalidAbstractInvocation();
52    return Nil;
55 -(Class)lockClass {
56    NSInvalidAbstractInvocation();
57    return Nil;
60 -(Class)recursiveLockClass
62     NSInvalidAbstractInvocation();
63    return Nil;
66 -(Class)conditionLockClass {
67    NSInvalidAbstractInvocation();
68    return Nil;
71 -(Class)conditionClass;
73     NSInvalidAbstractInvocation();
74     return Nil;
77 -(Class)persistantDomainClass {
78    NSInvalidAbstractInvocation();
79    return Nil;
82 -(Class)timeZoneClass {
83    NSInvalidAbstractInvocation();
84    return Nil;
87 -(NSString *)userName {
88    NSInvalidAbstractInvocation();
89    return nil;
92 -(NSString *)fullUserName {
93    NSInvalidAbstractInvocation();
94    return nil;
97 -(NSString *)homeDirectory {
98    NSInvalidAbstractInvocation();
99    return nil;
102 -(NSString *)libraryDirectory {
103         NSInvalidAbstractInvocation();
104         return nil;
107 -(NSString *)temporaryDirectory {
108    NSInvalidAbstractInvocation();
109    return nil;
112 -(NSArray *)arguments {
113    NSInvalidAbstractInvocation();
114    return nil;
117 -(NSDictionary *)environment {
118    NSInvalidAbstractInvocation();
119    return nil;
122 -(NSString *)hostName {
123    NSInvalidAbstractInvocation();
124    return nil;
127 -(NSString *)DNSHostName {
128    NSInvalidAbstractInvocation();
129    return nil;
132 -(NSArray *)addressesForDNSHostName:(NSString *)name {
133    NSInvalidAbstractInvocation();
134    return nil;
137 -(NSString *)hostNameByAddress:(NSString *)address{
138     NSInvalidAbstractInvocation();
139     return nil;
142 -(void *)mapContentsOfFile:(NSString *)path length:(NSUInteger *)length {
143    NSInvalidAbstractInvocation();
144    return NULL;
147 -(void)unmapAddress:(void *)ptr length:(NSUInteger)length {
148    NSInvalidAbstractInvocation();
151 -(BOOL)writeContentsOfFile:(NSString *)path bytes:(const void *)bytes length:(NSUInteger)length options:(NSUInteger)options error:(NSError **)errorp {
152    NSInvalidAbstractInvocation();
153    return NO;
156 -(void)checkEnvironmentKey:(NSString *)key value:(NSString *)value {
157    if([key isEqualToString:@"NSZombieEnabled"]){   
158     if((NSZombieEnabled=[value isEqual:@"YES"]))
159      NSCLog("NSZombieEnabled=YES");
160    }
162 @end