Skip to content

Commit

Permalink
Missing classes in Foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hyatt committed Jan 7, 2019
1 parent 2022f51 commit 16f87e0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ set(foundation_sources
src/NSXPCConnection.m
src/NSAppleEventManager.m
src/NSUserNotificationCenter.m
src/NSDateComponentsFormatter.m
src/NSMeasurementFormatter.m
)

# Includes ObjC headers -> must be compiled as ObjC
Expand Down
2 changes: 2 additions & 0 deletions include/Foundation/Foundation.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import <Foundation/NSData.h>
#import <Foundation/NSDate.h>
#import <Foundation/NSDateFormatter.h>
#import <Foundation/NSDateComponentsFormatter.h>
#import <Foundation/NSDecimal.h>
#import <Foundation/NSDecimalNumber.h>
#import <Foundation/NSDictionary.h>
Expand All @@ -34,6 +35,7 @@
#import <Foundation/NSLocale.h>
#import <Foundation/NSLock.h>
#import <Foundation/NSMapTable.h>
#import <Foundation/NSMeasurementFormatter.h>
#import <Foundation/NSMethodSignature.h>
#import <Foundation/NSNotification.h>
#import <Foundation/NSNotificationQueue.h>
Expand Down
4 changes: 4 additions & 0 deletions include/Foundation/NSXPCConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
@interface NSXPCConnection : NSObject

@end

@interface NSXPCListener : NSObject

@end
12 changes: 12 additions & 0 deletions src/NSXPCConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ - (void)forwardInvocation:(NSInvocation *)anInvocation {
}

@end

@implementation NSXPCListener

- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector {
return [NSMethodSignature signatureWithObjCTypes: "v@:"];
}

- (void)forwardInvocation:(NSInvocation *)anInvocation {
NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
}

@end

0 comments on commit 16f87e0

Please sign in to comment.