Added an ITFoundationTester. Why doesn't it work inside PB? :\
authorAlexander Strange <astrange@ithinksw.com>
Sat, 15 Feb 2003 06:28:50 +0000 (06:28 +0000)
committerAlexander Strange <astrange@ithinksw.com>
Sat, 15 Feb 2003 06:28:50 +0000 (06:28 +0000)
ITFoundation.h
ITInetServerSocket.h
ITInetServerSocket.m
ShowcaseController.h [new file with mode: 0755]
ShowcaseController.m [new file with mode: 0755]
Showcase_main.m [new file with mode: 0755]

index f4575de..ee1aa52 100755 (executable)
@@ -16,4 +16,6 @@
 
 #import <ITFoundation/ITVirtualMemoryInfo.h>
 #import <ITFoundation/ITStringScanner.h>
 
 #import <ITFoundation/ITVirtualMemoryInfo.h>
 #import <ITFoundation/ITStringScanner.h>
-#import <ITFoundation/ITAppleEventCenter.h>
\ No newline at end of file
+#import <ITFoundation/ITAppleEventCenter.h>
+#import <ITFoundation/ITInetServerSocket.h>
+#import <ITFoundation/ITInetSocket.h>
\ No newline at end of file
index ef2d5e1..dd5eba6 100755 (executable)
 - (id)init;
 - (id)initWithDelegate:(id)d;
 
 - (id)init;
 - (id)initWithDelegate:(id)d;
 
+- (BOOL)start;
+- (void)stop;
+
 - (int)sockfd;
 - (NSSet*)clients;
 - (id)delegate;
 - (short)port;
 - (int)sockfd;
 - (NSSet*)clients;
 - (id)delegate;
 - (short)port;
+
 - (void)setServiceType:(NSString*)type useForPort:(BOOL)p;
 - (void)setServiceName:(NSString*)name; // generally the computer's AppleTalk name
 - (void)setPort:(short)p;
 - (void)setServiceType:(NSString*)type useForPort:(BOOL)p;
 - (void)setServiceName:(NSString*)name; // generally the computer's AppleTalk name
 - (void)setPort:(short)p;
index f4b9720..8f75326 100755 (executable)
@@ -78,7 +78,7 @@ static NSTimer *timer;
     [rndType release];
 }
 
     [rndType release];
 }
 
-- (BOOL)registerSocket
+- (BOOL)start
 {
     if (!rndName || !rndType || !port) return NO;
     [ITInetServerSocket registerSocket:self];
 {
     if (!rndName || !rndType || !port) return NO;
     [ITInetServerSocket registerSocket:self];
diff --git a/ShowcaseController.h b/ShowcaseController.h
new file mode 100755 (executable)
index 0000000..2e18b74
--- /dev/null
@@ -0,0 +1,16 @@
+//
+//  ShowcaseController.h
+//  ITFoundation
+//
+//  Created by Alexander Strange on Fri Feb 14 2003.
+//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <ITFoundation/ITFoundation.h>
+
+@interface ShowcaseController : NSObject <ITInetServerSocketOwner> {
+
+}
+
+@end
diff --git a/ShowcaseController.m b/ShowcaseController.m
new file mode 100755 (executable)
index 0000000..2efe0a4
--- /dev/null
@@ -0,0 +1,27 @@
+//
+//  ShowcaseController.m
+//  ITFoundation
+//
+//  Created by Alexander Strange on Fri Feb 14 2003.
+//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+//
+
+#import "ShowcaseController.h"
+
+
+@implementation ShowcaseController
+- (void)applicationDidFinishLaunching:(NSNotification *)note
+{
+    
+    ITInetServerSocket *sock = [[ITInetServerSocket alloc] initWithDelegate:self];
+    NSLog(@"rawr?");
+    [sock setPort:4776];
+    [sock setServiceName:@"Test Rendezvous Service"];
+    [sock setServiceType:@"ittest" useForPort:NO];
+    [sock start];
+}
+
+- (void)newClientJoined:(ITInetSocket*)client
+{
+}
+@end
diff --git a/Showcase_main.m b/Showcase_main.m
new file mode 100755 (executable)
index 0000000..f633532
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ *  Showcase_main.m
+ *  ITFoundation
+ *
+ *  Created by Alexander Strange on Fri Feb 14 2003.
+ *  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#import <AppKit/NSApplication.h>
+
+int main(int argc, const char *argv[])
+{
+    return NSApplicationMain(argc,argv);
+}
\ No newline at end of file