├── .gitignore ├── CocoaOSC ├── en.lproj │ └── InfoPlist.strings ├── CocoaOSC-Prefix.pch ├── CocoaOSC.h ├── NS+OSCAdditions.h ├── OSCConnectionDelegate.h ├── CocoaOSC-Info.plist ├── OSCDispatcher.h ├── OSCPacket.h ├── NS+OSCAdditions.m ├── OSCConnection.h ├── OSCDispatcher.m ├── OSCConnection.m └── OSCPacket.m ├── Demo-mac ├── English.lproj │ ├── InfoPlist.strings │ └── Credits.rtf ├── Configs │ └── CAMremote.oscconfig ├── CocoaOSC_Mac_Demo_Prefix.pch ├── main.m ├── MyDocumentModel.h ├── MyMethod.h ├── PacketViewController.h ├── MyDocumentModel.m ├── CocoaOSC_Mac_Demo-Info.plist ├── MyDocument.h ├── MyMethod.m ├── PacketViewController.m └── MyDocument.m ├── .gitmodules ├── lib └── RegexKitLite │ ├── examples │ ├── NSString-HexConversion.h │ ├── for_in.m │ ├── NSString-HexConversion.m │ ├── link_example.m │ ├── compiledRegexCache.d │ ├── main.m │ └── utf16ConversionCache.d │ ├── License.rtf │ ├── License.html │ └── RegexKitLite.h ├── CocoaOSC.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── Demo-ios ├── main.m ├── AppDelegate.h ├── CocoaOSCDemo-Info.plist ├── AppDelegate.m └── MainWindow.xib └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .svn 3 | *.xcuserdatad 4 | *.mode1v3 5 | *.pbxuser -------------------------------------------------------------------------------- /CocoaOSC/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demo-mac/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demo-mac/Configs/CAMremote.oscconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danieldickison/CocoaOSC/HEAD/Demo-mac/Configs/CAMremote.oscconfig -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/CocoaAsyncSocket"] 2 | path = lib/CocoaAsyncSocket 3 | url = https://github.com/robbiehanson/CocoaAsyncSocket.git 4 | -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/NSString-HexConversion.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSString (HexConversion) 4 | -(NSInteger)hexValue; 5 | @end -------------------------------------------------------------------------------- /CocoaOSC/CocoaOSC-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CocoaOSC' target in the 'CocoaOSC' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demo-mac/CocoaOSC_Mac_Demo_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CocoaOSC Mac Demo' target in the 'CocoaOSC Mac Demo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /CocoaOSC.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo-mac/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/7/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **) argv); 14 | } 15 | -------------------------------------------------------------------------------- /CocoaOSC/CocoaOSC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CocoaOSC.h 3 | * CocoaOSC 4 | * 5 | * Created by Daniel Dickison on 3/13/10. 6 | * Copyright 2010 Daniel_Dickison. All rights reserved. 7 | * 8 | */ 9 | 10 | #import 11 | #import 12 | #import 13 | #import -------------------------------------------------------------------------------- /Demo-ios/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * main.c 3 | * CocoaOSC 4 | * 5 | * Created by Daniel Dickison on 1/26/10. 6 | * Copyright 2010 Daniel_Dickison. All rights reserved. 7 | * 8 | */ 9 | 10 | 11 | #import 12 | 13 | int main(int argc, char *argv[]) { 14 | 15 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 16 | int retVal = UIApplicationMain(argc, argv, nil, nil); 17 | [pool release]; 18 | return retVal; 19 | } 20 | -------------------------------------------------------------------------------- /Demo-mac/English.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demo-mac/MyDocumentModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyDocumentModel.h 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/13/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MyDocumentModel : NSObject 13 | 14 | @property (copy) NSString *localHost; 15 | @property UInt16 localPort; 16 | @property (copy) NSString *remoteHost; 17 | @property UInt16 remotePort; 18 | @property NSInteger protocol; 19 | 20 | @property (readonly) NSMutableArray *methods; 21 | @property (readonly) NSMutableArray *sentPackets; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Demo-mac/MyMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyMethod.h 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/13/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class OSCDispatcher; 12 | @class OSCPacket; 13 | 14 | 15 | @interface MyMethod : NSObject 16 | 17 | @property OSCDispatcher *dispatcher; 18 | @property (retain) OSCPacket *lastReceivedPacket; 19 | @property (copy) NSDate *lastReceivedDate; 20 | @property (copy) NSString *address; 21 | + (BOOL)validateAddress:(id *)ioAddress error:(NSError **)outError; 22 | - (void)receivedPacket:(OSCPacket *)packet; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/for_in.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "RegexKitLite.h" 3 | 4 | int main(int argc, char *argv[]) { 5 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 6 | 7 | NSString *searchString = @"one\ntwo\n\nfour\n"; 8 | NSString *regexString = @"(?m)^.*$"; 9 | NSUInteger line = 0UL; 10 | 11 | NSLog(@"searchString: '%@'", searchString); 12 | NSLog(@"regexString : '%@'", regexString); 13 | 14 | for(NSString *matchedString in [searchString componentsMatchedByRegex:regexString]) { 15 | NSLog(@"%lu: %lu '%@'", (u_long)++line, (u_long)[matchedString length], matchedString); 16 | } 17 | 18 | [pool release]; 19 | return(0); 20 | } 21 | -------------------------------------------------------------------------------- /Demo-ios/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 1/26/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "OSCConnectionDelegate.h" 11 | 12 | @class OSCConnection; 13 | 14 | @interface AppDelegate : NSObject 15 | { 16 | UIWindow *window; 17 | 18 | OSCConnection *connection; 19 | int sendType; 20 | } 21 | 22 | @property (nonatomic, retain) IBOutlet UIWindow *window; 23 | 24 | - (IBAction)typeBarAction:(UISegmentedControl *)sender; 25 | - (IBAction)typeBar2Action:(UISegmentedControl *)sender; 26 | - (IBAction)sendPacket; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /CocoaOSC/NS+OSCAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+OSCAdditions.h 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 1/26/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSDate (OSCAdditions) 13 | 14 | + (NSDate *)ntpReferenceDate; 15 | - (uint64_t)ntpTimestamp; 16 | + (NSDate *)dateWithNTPTimestamp:(uint64_t)timestamp; 17 | 18 | @end 19 | 20 | 21 | @interface NSString (OSCAdditions) 22 | 23 | // This returns ASCII-encoded bytes, padded with nulls to a multiple of 4 bytes. 24 | // Returns nil if receiver cannot be ASCII-encoded. 25 | - (NSData *)oscStringData; 26 | 27 | @end 28 | 29 | 30 | @interface NSArray (OSCAdditions) 31 | 32 | - (id)car; 33 | - (NSArray *)cdr; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/NSString-HexConversion.m: -------------------------------------------------------------------------------- 1 | #import "NSString-HexConversion.h" 2 | #import 3 | #include 4 | 5 | @implementation NSString (HexConversion) 6 | 7 | -(NSInteger)hexValue 8 | { 9 | CFStringRef cfSelf = (CFStringRef)self; 10 | UInt8 buffer[64]; 11 | const char *cptr; 12 | 13 | if((cptr = CFStringGetCStringPtr(cfSelf, kCFStringEncodingMacRoman)) == NULL) { 14 | CFRange range = CFRangeMake(0L, CFStringGetLength(cfSelf)); 15 | CFIndex usedBytes = 0L; 16 | CFStringGetBytes(cfSelf, range, kCFStringEncodingUTF8, '?', false, buffer, 60L, &usedBytes); 17 | buffer[usedBytes] = 0; 18 | cptr = (const char *)buffer; 19 | } 20 | 21 | return((NSInteger)strtol(cptr, NULL, 16)); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/link_example.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "RegexKitLite.h" 4 | 5 | int main(int argc, char *argv[]) { 6 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 7 | 8 | // Copyright COPYRIGHT_SIGN APPROXIMATELY_EQUAL_TO 2008 9 | // Copyright \u00a9 \u2245 2008 10 | 11 | char *utf8CString = "Copyright \xC2\xA9 \xE2\x89\x85 2008"; 12 | NSString *regexString = @"Copyright (.*) (\\d+)"; 13 | 14 | NSString *subjectString = [NSString stringWithUTF8String:utf8CString]; 15 | NSString *matchedString = [subjectString stringByMatching:regexString capture:1L]; 16 | 17 | NSLog(@"subject: \"%@\"", subjectString); 18 | NSLog(@"matched: \"%@\"", matchedString); 19 | 20 | [pool release]; 21 | return(0); 22 | } 23 | -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/compiledRegexCache.d: -------------------------------------------------------------------------------- 1 | #!/usr/sbin/dtrace -s 2 | 3 | RegexKitLite*:::compiledRegexCache { 4 | this->eventID = (unsigned long)arg0; 5 | this->regexUTF8 = copyinstr(arg1); 6 | this->options = (unsigned int)arg2; 7 | this->captures = (int)arg3; 8 | this->hitMiss = (int)arg4; 9 | this->icuStatusCode = (int)arg5; 10 | this->icuErrorMessage = (arg6 == 0) ? "" : copyinstr(arg6); 11 | this->hitRate = (double *)copyin(arg7, sizeof(double)); 12 | 13 | printf("%5d: %-60.60s Opt: %#8.8x Cap: %2d Hit: %2d Rate: %6.2f%% code: %5d msg: %s\n", 14 | this->eventID, 15 | this->regexUTF8, 16 | this->options, 17 | this->captures, 18 | this->hitMiss, 19 | *this->hitRate, 20 | this->icuStatusCode, 21 | this->icuErrorMessage); 22 | } 23 | -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "RegexKitLite.h" 3 | #import "RKLMatchEnumerator.h" 4 | 5 | int main(int argc, char *argv[]) { 6 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 7 | 8 | NSString *searchString = @"one\ntwo\n\nfour\n"; 9 | NSEnumerator *matchEnumerator = NULL; 10 | NSString *regexString = @"(?m)^.*$"; 11 | 12 | NSLog(@"searchString: '%@'", searchString); 13 | NSLog(@"regexString : '%@'", regexString); 14 | 15 | matchEnumerator = [searchString matchEnumeratorWithRegex:regexString]; 16 | 17 | NSUInteger line = 0UL; 18 | NSString *matchedString = NULL; 19 | 20 | while((matchedString = [matchEnumerator nextObject]) != NULL) { 21 | NSLog(@"%lu: %lu '%@'", (u_long)++line, (u_long)[matchedString length], matchedString); 22 | } 23 | 24 | [pool release]; 25 | return(0); 26 | } 27 | -------------------------------------------------------------------------------- /Demo-ios/CocoaOSCDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | NSMainNibFile 20 | MainWindow 21 | UISupportedInterfaceOrientations 22 | 23 | UIInterfaceOrientationPortrait 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CocoaOSC/OSCConnectionDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OSCConnectionDelegate.h 3 | * CocoaOSC 4 | * 5 | * Created by Daniel Dickison on 3/6/10. 6 | * Copyright 2010 Daniel_Dickison. All rights reserved. 7 | * 8 | */ 9 | 10 | @class OSCConnection; 11 | @class OSCPacket; 12 | 13 | 14 | @protocol OSCConnectionDelegate 15 | 16 | @optional 17 | 18 | - (void)oscConnectionWillConnect:(OSCConnection *)connection; 19 | - (void)oscConnectionDidConnect:(OSCConnection *)connection; 20 | - (void)oscConnectionDidDisconnect:(OSCConnection *)connection; 21 | 22 | - (void)oscConnection:(OSCConnection *)connection willSendPacket:(OSCPacket *)packet; 23 | - (void)oscConnection:(OSCConnection *)connection didSendPacket:(OSCPacket *)packet; 24 | 25 | - (void)oscConnection:(OSCConnection *)connection didReceivePacket:(OSCPacket *)packet; 26 | - (void)oscConnection:(OSCConnection *)connection didReceivePacket:(OSCPacket *)packet fromHost:(NSString *)host port:(UInt16)port; 27 | - (void)oscConnection:(OSCConnection *)connection failedToReceivePacketWithError:(NSError *)error; 28 | 29 | @end -------------------------------------------------------------------------------- /CocoaOSC/CocoaOSC-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSHumanReadableCopyright 26 | Copyright © 2011 __MyCompanyName__. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demo-mac/PacketViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PacketViewController.h 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/17/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MyDocument; 12 | @class OSCMutableMessage; 13 | 14 | 15 | @interface PacketViewController : NSViewController 16 | 17 | @property IBOutlet MyDocument *document; 18 | @property (readonly) OSCMutableMessage *mutableMessage; 19 | 20 | - (IBAction)addTextualArgument:(id)sender; 21 | - (IBAction)addNullArgument:(id)sender; 22 | - (IBAction)addImpulseArgument:(id)sender; 23 | - (IBAction)addTrueArgument:(id)sender; 24 | - (IBAction)addFalseArgument:(id)sender; 25 | - (IBAction)addFileArgument:(id)sender; 26 | - (IBAction)addClipboardArgument:(id)sender; 27 | - (IBAction)sendPacket:(id)sender; 28 | 29 | @property IBOutlet NSWindow *textInputSheet; 30 | @property (copy) NSString *textInputString; 31 | @property NSInteger textInputType; 32 | - (IBAction)textAddAction:(id)sender; 33 | - (IBAction)textCancelAction:(id)sender; 34 | 35 | @end 36 | 37 | 38 | @interface PacketArgumentCollectionView : NSCollectionView 39 | 40 | - (NSCollectionViewItem *)newItemForRepresentedObject:(id)object; 41 | 42 | @end -------------------------------------------------------------------------------- /lib/RegexKitLite/examples/utf16ConversionCache.d: -------------------------------------------------------------------------------- 1 | #!/usr/sbin/dtrace -s 2 | 3 | enum { 4 | RKLCacheHitLookupFlag = 1 << 0, 5 | RKLConversionRequiredLookupFlag = 1 << 1, 6 | RKLSetTextLookupFlag = 1 << 2, 7 | RKLDynamicBufferLookupFlag = 1 << 3, 8 | RKLErrorLookupFlag = 1 << 4 9 | }; 10 | 11 | RegexKitLite*:::utf16ConversionCache { 12 | this->eventID = (unsigned long)arg0; 13 | this->lookupResultFlags = (unsigned int)arg1; 14 | this->hitRate = (double *)copyin(arg2, sizeof(double)); 15 | this->stringPtr = (void *)arg3; 16 | this->NSRange_location = (unsigned long)arg4; 17 | this->NSRange_length = (unsigned long)arg5; 18 | this->length = (long)arg6; 19 | 20 | printf("%5lu: flags: %#8.8x {Hit: %d Conv: %d SetText: %d Dyn: %d Error: %d} rate: %6.2f%% string: %#8.8p NSRange {%6lu, %6lu} length: %ld\n", 21 | this->eventID, 22 | this->lookupResultFlags, 23 | (this->lookupResultFlags & RKLCacheHitLookupFlag) != 0, 24 | (this->lookupResultFlags & RKLConversionRequiredLookupFlag) != 0, 25 | (this->lookupResultFlags & RKLSetTextLookupFlag) != 0, 26 | (this->lookupResultFlags & RKLDynamicBufferLookupFlag) != 0, 27 | (this->lookupResultFlags & RKLErrorLookupFlag) != 0, 28 | *this->hitRate, 29 | this->stringPtr, 30 | this->NSRange_location, 31 | this->NSRange_length, 32 | this->length); 33 | } 34 | -------------------------------------------------------------------------------- /CocoaOSC/OSCDispatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // OSCDispatcher.h 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 3/6/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @class OSCAddressNode; 13 | @class OSCPacket; 14 | 15 | 16 | @interface OSCDispatcher : NSObject 17 | { 18 | OSCAddressNode *rootNode; 19 | NSMutableArray *queuedBundles; 20 | } 21 | 22 | // Action selectors should have the signature: 23 | // - (void)actionWithMessage:(OSCPacket *)message; 24 | // Targets are not retained, so make sure you remove them before they get dealloced. 25 | // Also note that it is an error for an address to be both a method leaf AND to contain children. Attempting to add child methods to an already existing method address, or turning an existing parent address in to a method will result in exceptions. 26 | - (void)addMethodAddress:(NSString *)address target:(id)target action:(SEL)action; 27 | - (void)removeMethodsAtAddressPattern:(NSString *)addressPattern; 28 | - (void)removeAllTargetMethods:(id)targetOrNil action:(SEL)actionOrNULL; 29 | 30 | // If packet is a message, it will be delivered immediately. If it's a bundle, it may be queued if the timestamp is in the future. 31 | - (void)dispatchPacket:(OSCPacket *)packet; 32 | 33 | // Cancels queued bundles from being delivered. Returns the canceled bundles. 34 | - (NSArray *)cancelQueuedBundles; 35 | 36 | // Validates the address. Returns nil if address is syntactically invalid. 37 | + (NSArray *)splitAddressComponents:(NSString *)address; 38 | + (NSArray *)splitPatternComponentsToRegex:(NSString *)pattern; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Demo-mac/MyDocumentModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyDocumentModel.m 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/13/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "MyDocumentModel.h" 10 | 11 | 12 | @implementation MyDocumentModel 13 | 14 | @synthesize localHost, localPort, remoteHost, remotePort, methods, sentPackets, protocol; 15 | 16 | - (id)init 17 | { 18 | if (self = [super init]) 19 | { 20 | methods = [NSMutableArray array]; 21 | sentPackets = [NSMutableArray array]; 22 | } 23 | return self; 24 | } 25 | 26 | - (id)initWithCoder:(NSCoder *)decoder 27 | { 28 | if (self = [super init]) 29 | { 30 | methods = [decoder decodeObjectForKey:@"methods"]; 31 | sentPackets = [decoder decodeObjectForKey:@"sentPackets"]; 32 | localHost = [decoder decodeObjectForKey:@"localHost"]; 33 | localPort = [decoder decodeIntForKey:@"localPort"]; 34 | remoteHost = [decoder decodeObjectForKey:@"remoteHost"]; 35 | remotePort = [decoder decodeIntForKey:@"remotePort"]; 36 | protocol = [decoder decodeIntForKey:@"protocol"]; 37 | } 38 | return self; 39 | } 40 | 41 | - (void)encodeWithCoder:(NSCoder *)encoder 42 | { 43 | [encoder encodeObject:methods forKey:@"methods"]; 44 | [encoder encodeObject:sentPackets forKey:@"sentPackets"]; 45 | [encoder encodeObject:localHost forKey:@"localHost"]; 46 | [encoder encodeInt:localPort forKey:@"localPort"]; 47 | [encoder encodeObject:remoteHost forKey:@"remoteHost"]; 48 | [encoder encodeInt:remotePort forKey:@"remotePort"]; 49 | [encoder encodeInt:(int)protocol forKey:@"protocol"]; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Demo-mac/CocoaOSC_Mac_Demo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeExtensions 11 | 12 | oscconfig 13 | 14 | CFBundleTypeIconFile 15 | 16 | CFBundleTypeName 17 | OSCConfiguration 18 | CFBundleTypeOSTypes 19 | 20 | ???? 21 | 22 | CFBundleTypeRole 23 | Editor 24 | NSDocumentClass 25 | MyDocument 26 | 27 | 28 | CFBundleExecutable 29 | ${EXECUTABLE_NAME} 30 | CFBundleIconFile 31 | 32 | CFBundleIdentifier 33 | $(PRODUCT_BUNDLE_IDENTIFIER) 34 | CFBundleInfoDictionaryVersion 35 | 6.0 36 | CFBundleName 37 | ${PRODUCT_NAME} 38 | CFBundlePackageType 39 | APPL 40 | CFBundleShortVersionString 41 | 1.0 42 | CFBundleSignature 43 | ???? 44 | CFBundleVersion 45 | 1 46 | LSMinimumSystemVersion 47 | ${MACOSX_DEPLOYMENT_TARGET} 48 | NSMainNibFile 49 | MainMenu 50 | NSPrincipalClass 51 | NSApplication 52 | 53 | 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CocoaOSC 2 | ======== 3 | 4 | This is an Objective-C library for sending and receiving [Open Sound Control 1.0][osc] (OSC) messages over UDP or TCP. The purpose of OSC was originally to be a modern replacement for the MIDI protocol in electronic music contexts, but it is also useful outside of music for providing a simple and way of serializing and routing arbitrary messages between multiple processes. 5 | 6 | Please consider this library a work in progress. In particular, OSC bundles are currently not supported. 7 | 8 | [osc]: http://opensoundcontrol.org/spec-1_0 9 | 10 | License 11 | ------- 12 | 13 | Copyright (c) 2012, Daniel Dickison 14 | All rights reserved. 15 | 16 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 17 | 18 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 19 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 | -------------------------------------------------------------------------------- /Demo-mac/MyDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyDocument.h 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/7/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import "CocoaOSC.h" 12 | 13 | @class OSCConnection; 14 | @class MyDocumentModel; 15 | @class PacketViewController; 16 | @class MyMethod; 17 | @class OSCPacket; 18 | 19 | @interface MyDocument : NSDocument 20 | { 21 | OSCConnection *connection; 22 | 23 | // This ivar is a hack to work around the bug in NSArrayController where KVO notifications never contain the new or old value in the change dictionary. 24 | MyMethod *previousMethodTableSelection; 25 | } 26 | 27 | @property MyDocumentModel *model; 28 | 29 | @property IBOutlet NSArrayController *methodsController; 30 | @property IBOutlet NSArrayController *sentPacketsController; 31 | 32 | @property IBOutlet NSTableView *methodsTable; 33 | @property IBOutlet NSTableView *sentPacketsTable; 34 | 35 | @property IBOutlet NSPanel *packetInspector; 36 | @property IBOutlet PacketViewController *packetViewController; 37 | 38 | @property IBOutlet NSWindow *createPacketSheet; 39 | @property IBOutlet PacketViewController *createPacketViewController; 40 | 41 | @property (getter=isConnected) BOOL connected; 42 | @property (getter=isListening) BOOL listening; 43 | @property (readonly) BOOL canConfigure; 44 | 45 | - (IBAction)startServer:(NSButton *)sender; 46 | - (IBAction)connect:(NSButton *)sender; 47 | - (IBAction)addMethod:(NSButton *)sender; 48 | - (IBAction)removeSelectedMethod:(NSButton *)sender; 49 | - (IBAction)newPacket:(NSButton *)sender; 50 | 51 | - (IBAction)tableClickAction:(NSTableView *)sender; 52 | - (IBAction)methodsDoubleClickAction:(NSTableView *)sender; 53 | - (IBAction)packetsDoubleClickAction:(NSTableView *)sender; 54 | 55 | - (void)sendPacket:(OSCPacket *)packet; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Demo-mac/MyMethod.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyMethod.m 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/13/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "MyMethod.h" 10 | #import "CocoaOSC.h" 11 | 12 | @implementation MyMethod 13 | 14 | @synthesize dispatcher, address, lastReceivedPacket, lastReceivedDate; 15 | 16 | - (id)initWithCoder:(NSCoder *)decoder 17 | { 18 | if (self = [self init]) 19 | { 20 | address = [decoder decodeObjectForKey:@"address"]; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)encodeWithCoder:(NSCoder *)encoder 26 | { 27 | [encoder encodeObject:address forKey:@"address"]; 28 | } 29 | 30 | - (OSCDispatcher *)dispatcher { 31 | return dispatcher; 32 | } 33 | 34 | - (void)setDispatcher:(OSCDispatcher *)newDisp 35 | { 36 | [self.dispatcher removeAllTargetMethods:self action:NULL]; 37 | dispatcher = newDisp; 38 | if (address) 39 | { 40 | [self.dispatcher addMethodAddress:address target:self action:@selector(receivedPacket:)]; 41 | } 42 | } 43 | 44 | - (NSString *)address { 45 | return address; 46 | } 47 | 48 | - (void)setAddress:(NSString *)newAddr 49 | { 50 | [self.dispatcher removeAllTargetMethods:self action:NULL]; 51 | address = [newAddr copy]; 52 | if (address) 53 | { 54 | [self.dispatcher addMethodAddress:newAddr target:self action:@selector(receivedPacket:)]; 55 | } 56 | } 57 | 58 | + (BOOL)validateAddress:(id *)ioAddress error:(NSError **)outError 59 | { 60 | if (![OSCDispatcher splitAddressComponents:*ioAddress]) 61 | { 62 | if (outError) 63 | { 64 | *outError = [NSError errorWithDomain:@"MyErrors" code:0 userInfo:[NSDictionary dictionaryWithObject:@"Invalid method address." forKey:NSLocalizedDescriptionKey]]; 65 | } 66 | return NO; 67 | } 68 | return YES; 69 | } 70 | - (BOOL)validateAddress:(id *)ioAddress error:(NSError **)outError 71 | { 72 | return [[self class] validateAddress:ioAddress error:outError]; 73 | } 74 | 75 | - (void)receivedPacket:(OSCPacket *)packet 76 | { 77 | self.lastReceivedPacket = packet; 78 | self.lastReceivedDate = [NSDate date]; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /CocoaOSC/OSCPacket.h: -------------------------------------------------------------------------------- 1 | // 2 | // OSCPacket.h 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 1/26/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | /** 13 | OSCPacket is a class cluster. The initializer initWithData: returns one of the two subclasses depending on whether the data describes an OSC message or bundle. This is used for receiving and parsing OSC packets. To construct a new packet for sending, using the init initializer of one of the subclasses directly, then call encode to get the network data. 14 | */ 15 | @interface OSCPacket : NSObject 16 | 17 | // Decode/encode from/to NSData. 18 | - (id)initWithData:(NSData *)data; 19 | - (NSData *)encode; 20 | + (NSData *)dataForContentObject:(id)obj; 21 | 22 | // If true, then it has a timetag and childPackets, but no arguments or address. 23 | @property (nonatomic, readonly, getter=isBundle) BOOL bundle; 24 | 25 | @property (nonatomic, readonly, copy) NSString *address; 26 | @property (nonatomic, readonly) NSArray *arguments; 27 | @property (nonatomic, readonly, copy) NSDate *timetag; 28 | @property (nonatomic, readonly) NSArray *childPackets; 29 | 30 | @end 31 | 32 | 33 | 34 | @interface OSCMutableMessage : OSCPacket 35 | { 36 | NSString *address; 37 | NSArray *arguments; 38 | } 39 | 40 | - (id)init; 41 | 42 | @property (nonatomic, readwrite, copy) NSString *address; 43 | 44 | // Use the specific add* methods if possible. Any unknown types will fail when encode is called. 45 | - (void)addArgument:(id)arg; 46 | 47 | - (void)addInt:(int)anInt; 48 | - (void)addFloat:(float)aFloat; 49 | - (void)addString:(NSString *)str; 50 | - (void)addBlob:(NSData *)blob; 51 | - (void)addTimeTag:(NSDate *)time; 52 | - (void)addBool:(BOOL)aBool; 53 | - (void)addNull; 54 | - (void)addImpulse; 55 | 56 | @property (nonatomic, readonly) NSString *typeTag; 57 | 58 | @end 59 | 60 | 61 | @interface OSCMutableBundle : OSCPacket 62 | { 63 | NSDate *timetag; 64 | NSArray *childPackets; 65 | } 66 | 67 | - (id)init; 68 | 69 | @property (nonatomic, readwrite, copy) NSDate *timetag; 70 | - (void)addChildPacket:(OSCPacket *)packet; 71 | 72 | @end 73 | 74 | 75 | @interface OSCImpulse : NSObject 76 | 77 | + (OSCImpulse *)impulse; 78 | 79 | @end 80 | 81 | 82 | @interface OSCBool : NSObject 83 | 84 | + (OSCBool *)yes; 85 | + (OSCBool *)no; 86 | @property (nonatomic, readonly) BOOL value; 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /lib/RegexKitLite/License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 LucidaGrande;\f2\fmodern\fcharset0 Courier; 3 | } 4 | {\colortbl;\red255\green255\blue255;} 5 | {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}} 6 | {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} 7 | \margl1440\margr1440\vieww10960\viewh15160\viewkind0 8 | \deftab720 9 | \pard\pardeftab720\sa180\ql\qnatural 10 | 11 | \f0\b\fs38 \cf0 RegexKit 12 | \i Lite 13 | \i0 License 14 | \f1 \ 15 | \pard\pardeftab720\sa240\ql\qnatural 16 | 17 | \b0\fs24 \cf0 Copyright \'a9 2008-2010, John Engelhart\ 18 | All rights reserved.\ 19 | \pard\pardeftab720\sa240\qj 20 | \cf0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ 21 | \pard\tx220\tx720\pardeftab720\li720\fi-720\sa180\qj 22 | \ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 23 | {\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ 24 | {\listtext \'95 }Neither the name of the Zang Industries nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\ 25 | \pard\pardeftab720\sa240\qj 26 | 27 | \f2 \cf0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.} -------------------------------------------------------------------------------- /lib/RegexKitLite/License.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | RegexKitLite License 13 | 14 | 15 |
16 |

RegexKitList License

17 | 18 |

Copyright © 2008-2010, John Engelhart

19 | 20 |

All rights reserved.

21 | 22 |

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

23 | 24 |
    25 |
  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • 26 |
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • 27 |
  • Neither the name of the Zang Industries nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • 28 |
29 | 30 |

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /CocoaOSC/NS+OSCAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+OSCAdditions.m 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 1/26/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "NS+OSCAdditions.h" 10 | 11 | 12 | @implementation NSDate (OSCAdditions) 13 | 14 | + (NSDate *)ntpReferenceDate 15 | { 16 | static NSDate *date = nil; 17 | if (!date) 18 | { 19 | NSDateComponents *components = [[NSDateComponents alloc] init]; 20 | [components setYear:1900]; 21 | [components setMonth:1]; 22 | [components setDay:1]; 23 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; 24 | date = [[calendar dateFromComponents:components] copy]; 25 | [components release]; 26 | [calendar release]; 27 | } 28 | return date; 29 | } 30 | 31 | 32 | - (uint64_t)ntpTimestamp 33 | { 34 | NSTimeInterval interval = [self timeIntervalSinceReferenceDate]; 35 | interval -= [[NSDate ntpReferenceDate] timeIntervalSinceReferenceDate]; 36 | uint32_t seconds = (uint32_t)interval; //Floor 37 | uint32_t fractions = 0xffffffff * (interval - seconds); 38 | return ((uint64_t)seconds << 32) + fractions; 39 | } 40 | 41 | + (NSDate *)dateWithNTPTimestamp:(uint64_t)timestamp 42 | { 43 | uint32_t seconds = timestamp >> 32; 44 | uint32_t fractions = timestamp & 0xffffffff; 45 | NSTimeInterval interval = [[NSDate ntpReferenceDate] timeIntervalSinceReferenceDate]; 46 | interval += (NSTimeInterval)seconds; 47 | interval += (NSTimeInterval)((double)fractions / 0xffffffff); 48 | return [NSDate dateWithTimeIntervalSinceReferenceDate:interval]; 49 | } 50 | 51 | @end 52 | 53 | 54 | @implementation NSString (OSCAdditions) 55 | 56 | - (NSData *)oscStringData 57 | { 58 | NSMutableData *data = [[[self dataUsingEncoding:NSASCIIStringEncoding] mutableCopy] autorelease]; 59 | 60 | // Add terminating NULL. 61 | [data setLength:[data length]+1]; 62 | 63 | // Pad to multiple of 4 bytes if necessary. 64 | int rem = (int)([data length] % 4); 65 | if (rem != 0) 66 | { 67 | [data appendBytes:"\0\0\0" length:4-rem]; 68 | } 69 | return data; 70 | } 71 | 72 | @end 73 | 74 | 75 | 76 | @implementation NSArray (OSCAdditions) 77 | 78 | - (id)car 79 | { 80 | if ([self count] > 0) return [self objectAtIndex:0]; 81 | else return nil; 82 | } 83 | 84 | - (NSArray *)cdr 85 | { 86 | if ([self count] > 1) return [self subarrayWithRange:NSMakeRange(1, [self count]-1)]; 87 | else return nil; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /CocoaOSC/OSCConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // OSCConnection.h 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 3/6/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "OSCConnectionDelegate.h" 11 | 12 | 13 | @class AsyncSocket; 14 | @class AsyncUdpSocket; 15 | @class OSCPacket; 16 | @class OSCDispatcher; 17 | 18 | 19 | typedef enum { 20 | OSCConnectionUDP, 21 | OSCConnectionTCP_Int32Header, 22 | OSCConnectionTCP_RFC1055 23 | } OSCConnectionProtocol; 24 | 25 | 26 | 27 | @interface OSCConnection : NSObject 28 | { 29 | id delegate; 30 | OSCDispatcher *dispatcher; 31 | 32 | AsyncSocket *tcpListenSocket; 33 | AsyncSocket *tcpSocket; 34 | AsyncUdpSocket *udpSocket; 35 | 36 | OSCConnectionProtocol protocol; 37 | 38 | NSMutableDictionary *pendingPacketsByTag; 39 | long lastSendTag; 40 | 41 | BOOL continuouslyReceivePackets; 42 | } 43 | 44 | // Don't change any of these properties after calling connect or accept. 45 | @property (nonatomic, assign) id delegate; 46 | @property (nonatomic, readonly) OSCDispatcher *dispatcher; 47 | @property (nonatomic, readonly, getter=isConnected) BOOL connected; 48 | @property (nonatomic, readonly) NSString *connectedHost; 49 | @property (nonatomic, readonly) UInt16 connectedPort; 50 | @property (nonatomic, readonly) NSString *localHost; 51 | @property (nonatomic, readonly) UInt16 localPort; 52 | @property (nonatomic, readonly) OSCConnectionProtocol protocol; 53 | 54 | // Connect and either accept or bind are mutually exclusive. Don't call one after calling the other. 55 | - (BOOL)connectToHost:(NSString *)host port:(UInt16)port protocol:(OSCConnectionProtocol)protocol error:(NSError **)errPtr; 56 | - (void)disconnect; 57 | 58 | // Only TCP connections can accept incoming connections. Interface can be nil to accept on all interfaces. Accepted connections will be set to have the given protocol (which must be one of the TCP protocols). 59 | - (BOOL)acceptOnInterface:(NSString *)interface port:(UInt16)port protocol:(OSCConnectionProtocol)proto error:(NSError **)errPtr; 60 | 61 | // Bind can be used by a server UDP socket to receive packets before sending anything out. This will set the protocol property to OSCConnectionUDP. localAddr can be nil. 62 | - (BOOL)bindToAddress:(NSString *)localAddr port:(UInt16)port error:(NSError **)errPtr; 63 | 64 | // Sends a packet. Use only after calling connect. 65 | - (void)sendPacket:(OSCPacket *)packet; 66 | 67 | // Sends a packet to the specified host and port. This should only be used with UDP sockets that have been set up with bind and have received a packet from a client. 68 | - (void)sendPacket:(OSCPacket *)packet toHost:(NSString *)host port:(UInt16)port; 69 | 70 | // Waits for a packet or continuously waits for packets and dispatches them. Use only after calling connect or bind, or with a connection received via accept. 71 | - (void)receivePacket; 72 | @property (nonatomic, assign) BOOL continuouslyReceivePackets; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Demo-ios/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 1/26/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "AsyncUdpSocket.h" 11 | #import "CocoaOSC.h" 12 | 13 | 14 | enum { 15 | kTagRemoteHost = 42, 16 | kTagRemotePort, 17 | kTagRemoteAddress, 18 | kTagSendValue, 19 | kTagType, 20 | kTagType2, 21 | kTagLocalPort, 22 | kTagLocalAddress, 23 | kTagReceivedValue 24 | }; 25 | 26 | 27 | @implementation AppDelegate 28 | 29 | @synthesize window; 30 | 31 | - (void)applicationDidFinishLaunching:(UIApplication *)application 32 | { 33 | connection = [[OSCConnection alloc] init]; 34 | connection.delegate = self; 35 | connection.continuouslyReceivePackets = YES; 36 | NSError *error; 37 | if (![connection bindToAddress:nil port:0 error:&error]) 38 | { 39 | NSLog(@"Could not bind UDP connection: %@", error); 40 | } 41 | [connection receivePacket]; 42 | 43 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 44 | ((UITextField *)[window viewWithTag:kTagRemoteHost]).text = [defaults stringForKey:@"remoteHost"]; 45 | ((UITextField *)[window viewWithTag:kTagRemotePort]).text = [defaults stringForKey:@"remotePort"]; 46 | ((UITextField *)[window viewWithTag:kTagRemoteAddress]).text = [defaults stringForKey:@"remoteAddress"]; 47 | ((UITextField *)[window viewWithTag:kTagSendValue]).text = [defaults stringForKey:@"sendValue"]; 48 | } 49 | 50 | 51 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 52 | { 53 | [textField resignFirstResponder]; 54 | return YES; 55 | } 56 | 57 | 58 | - (IBAction)typeBarAction:(UISegmentedControl *)sender 59 | { 60 | sendType = sender.selectedSegmentIndex; 61 | ((UISegmentedControl *)[window viewWithTag:kTagType2]).selectedSegmentIndex = -1; 62 | } 63 | 64 | - (IBAction)typeBar2Action:(UISegmentedControl *)sender 65 | { 66 | sendType = 4 + sender.selectedSegmentIndex; 67 | ((UISegmentedControl *)[window viewWithTag:kTagType]).selectedSegmentIndex = -1; 68 | } 69 | 70 | 71 | - (IBAction)sendPacket 72 | { 73 | NSString *remoteHost = ((UITextField *)[window viewWithTag:kTagRemoteHost]).text; 74 | NSString *remotePort = ((UITextField *)[window viewWithTag:kTagRemotePort]).text; 75 | NSString *remoteAddress = ((UITextField *)[window viewWithTag:kTagRemoteAddress]).text; 76 | NSString *sendValue = ((UITextField *)[window viewWithTag:kTagSendValue]).text; 77 | 78 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 79 | [defaults setObject:remoteHost forKey:@"remoteHost"]; 80 | [defaults setObject:remotePort forKey:@"remotePort"]; 81 | [defaults setObject:remoteAddress forKey:@"remoteAddress"]; 82 | [defaults setObject:sendValue forKey:@"sendValue"]; 83 | 84 | NSLog(@"Host: %@", remoteHost); 85 | NSLog(@"Port: %@", remotePort); 86 | NSLog(@"Address: %@", remoteAddress); 87 | NSLog(@"Value: %@", sendValue); 88 | 89 | OSCMutableMessage *message = [[OSCMutableMessage alloc] init]; 90 | message.address = remoteAddress; 91 | switch (sendType) 92 | { 93 | case 0: [message addString:sendValue]; break; 94 | case 1: [message addInt:[sendValue intValue]]; break; 95 | case 2: [message addFloat:[sendValue floatValue]]; break; 96 | case 3: [message addBlob:[sendValue dataUsingEncoding:NSUTF8StringEncoding]]; break; 97 | case 4: [message addTimeTag:[NSDate date]]; break; 98 | case 5: [message addBool:YES]; break; 99 | case 6: [message addBool:NO]; break; 100 | case 7: [message addImpulse]; break; 101 | case 8: [message addNull]; break; 102 | } 103 | [connection sendPacket:message toHost:remoteHost port:[remotePort intValue]]; 104 | [message release]; 105 | } 106 | 107 | 108 | - (void)oscConnection:(OSCConnection *)con didSendPacket:(OSCPacket *)packet; 109 | { 110 | ((UITextField *)[window viewWithTag:kTagLocalPort]).text = [NSString stringWithFormat:@"%hu", con.localPort]; 111 | } 112 | 113 | - (void)oscConnection:(OSCConnection *)con didReceivePacket:(OSCPacket *)packet fromHost:(NSString *)host port:(UInt16)port 114 | { 115 | ((UITextField *)[window viewWithTag:kTagReceivedValue]).text = [packet.arguments description]; 116 | ((UITextField *)[window viewWithTag:kTagLocalAddress]).text = packet.address; 117 | } 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /Demo-mac/PacketViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PacketViewController.m 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/17/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "PacketViewController.h" 10 | #import "MyDocument.h" 11 | #import 12 | 13 | 14 | @implementation PacketViewController 15 | 16 | @synthesize document; 17 | @synthesize textInputSheet, textInputString, textInputType; 18 | 19 | - (OSCMutableMessage *)mutableMessage 20 | { 21 | return (OSCMutableMessage *)[self representedObject]; 22 | } 23 | 24 | - (IBAction)addTextualArgument:(id)sender 25 | { 26 | NSInteger code = [NSApp runModalForWindow:self.textInputSheet]; 27 | [self.textInputSheet orderOut:nil]; 28 | if (code == 1) 29 | { 30 | NSString *string = self.textInputString ? self.textInputString : @""; 31 | switch (self.textInputType) 32 | { 33 | case 0: 34 | [self.mutableMessage addString:string]; 35 | break; 36 | case 1: 37 | [self.mutableMessage addInt:[string intValue]]; 38 | break; 39 | case 2: 40 | [self.mutableMessage addFloat:[string floatValue]]; 41 | break; 42 | case 3: 43 | [self.mutableMessage addBlob:[string dataUsingEncoding:NSUTF8StringEncoding]]; 44 | break; 45 | } 46 | } 47 | } 48 | 49 | - (IBAction)textAddAction:(id)sender 50 | { 51 | [NSApp stopModalWithCode:1]; 52 | } 53 | 54 | - (IBAction)textCancelAction:(id)sender 55 | { 56 | [NSApp stopModalWithCode:0]; 57 | } 58 | 59 | - (IBAction)addNullArgument:(id)sender 60 | { 61 | [self.mutableMessage addNull]; 62 | } 63 | 64 | - (IBAction)addImpulseArgument:(id)sender 65 | { 66 | [self.mutableMessage addImpulse]; 67 | } 68 | 69 | - (IBAction)addTrueArgument:(id)sender 70 | { 71 | [self.mutableMessage addBool:YES]; 72 | } 73 | 74 | - (IBAction)addFalseArgument:(id)sender 75 | { 76 | [self.mutableMessage addBool:NO]; 77 | } 78 | 79 | - (IBAction)addFileArgument:(id)sender 80 | { 81 | NSOpenPanel *openPanel = [NSOpenPanel openPanel]; 82 | [openPanel setCanChooseFiles:YES]; 83 | [openPanel setCanChooseDirectories:NO]; 84 | [openPanel setAllowsMultipleSelection:NO]; 85 | [openPanel beginSheetModalForWindow:[[self view] window] 86 | completionHandler: 87 | ^(NSInteger result) 88 | { 89 | if (result == NSFileHandlingPanelOKButton) 90 | { 91 | NSURL *url = [[openPanel URLs] objectAtIndex:0]; 92 | NSData *data = [NSData dataWithContentsOfURL:url]; 93 | [self.mutableMessage addBlob:data]; 94 | } 95 | }]; 96 | } 97 | 98 | - (IBAction)addClipboardArgument:(id)sender 99 | { 100 | // TODO... 101 | } 102 | 103 | - (IBAction)sendPacket:(id)sender 104 | { 105 | [self.document sendPacket:self.mutableMessage]; 106 | } 107 | 108 | @end 109 | 110 | 111 | 112 | @implementation PacketArgumentCollectionView 113 | 114 | - (NSCollectionViewItem *)newItemForRepresentedObject:(id)object 115 | { 116 | NSCollectionViewItem *item = [[NSCollectionViewItem alloc] initWithNibName:nil bundle:nil]; 117 | NSView *view; 118 | if ([object isKindOfClass:[OSCImpulse class]] || 119 | [object isKindOfClass:[OSCBool class]] || 120 | [object isKindOfClass:[NSString class]] || 121 | [object isKindOfClass:[NSNumber class]] || 122 | [object isKindOfClass:[NSNull class]] || 123 | [object isKindOfClass:[NSDate class]]) 124 | { 125 | view = [[NSTextField alloc] initWithFrame:NSZeroRect]; 126 | [(NSTextField *)view setStringValue:[object description]]; 127 | [(NSTextField *)view sizeToFit]; 128 | } 129 | else if ([object isKindOfClass:[NSData class]]) 130 | { 131 | NSImage *image = [[NSImage alloc] initWithData:object]; 132 | if (image) 133 | { 134 | view = [[NSImageView alloc] initWithFrame:NSZeroRect]; 135 | [(NSImageView *)view setImage:image]; 136 | [(NSImageView *)view sizeToFit]; 137 | } 138 | else 139 | { 140 | view = [[NSTextView alloc] initWithFrame:NSMakeRect(0, 0, 100, 50)]; 141 | [(NSTextView *)view setString:[object description]]; 142 | } 143 | } 144 | [item setView:view]; 145 | return item; 146 | } 147 | 148 | @end -------------------------------------------------------------------------------- /CocoaOSC/OSCDispatcher.m: -------------------------------------------------------------------------------- 1 | // 2 | // OSCDispatcher.m 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 3/6/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "OSCDispatcher.h" 10 | #import "OSCPacket.h" 11 | #import "RegexKitLite.h" 12 | #import "NS+OSCAdditions.h" 13 | 14 | 15 | static NSCharacterSet* getIllegalAddressNameSet(); 16 | static NSString* globToRegex(NSString *glob); 17 | 18 | 19 | @interface OSCAddressNode : NSObject 20 | { 21 | OSCAddressNode *parent; 22 | NSString *name; 23 | NSMutableDictionary *children; 24 | id target; 25 | SEL action; 26 | } 27 | 28 | @property (nonatomic, assign) OSCAddressNode *parent; 29 | @property (nonatomic, copy) NSString *name; 30 | @property (nonatomic, readonly) NSMutableDictionary *children; 31 | @property (nonatomic, assign) id target; 32 | @property (nonatomic, assign) SEL action; 33 | 34 | @property (nonatomic, readonly) NSString *address; 35 | 36 | - (NSString *)description; 37 | - (NSArray *)descendantsMatchingPattern:(NSArray *)pattern; 38 | - (NSArray *)descendantsWithTarget:(id)t action:(SEL)a; 39 | - (void)addMethodAtSubAddress:(NSArray *)address target:(id)t action:(SEL)a; 40 | - (void)delete; 41 | - (void)dispatchMessage:(OSCPacket *)message; 42 | 43 | @end 44 | 45 | 46 | @implementation OSCAddressNode 47 | 48 | @synthesize parent, name, target, action; 49 | 50 | - (void)dealloc 51 | { 52 | [children release]; 53 | [name release]; 54 | [super dealloc]; 55 | } 56 | 57 | - (NSString *)description 58 | { 59 | NSMutableString *string = [NSMutableString stringWithFormat:@"%@ -> %@ (%@)", self.address, self.target, NSStringFromSelector(self.action)]; 60 | NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; 61 | NSArray *allChildren = [[self.children allValues] sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]]; 62 | [sortDescriptor release]; 63 | for (OSCAddressNode *child in allChildren) 64 | { 65 | [string appendFormat:@"\n%@", child]; 66 | } 67 | return string; 68 | } 69 | 70 | - (NSMutableDictionary *)children 71 | { 72 | if (!children) 73 | { 74 | children = [[NSMutableDictionary alloc] init]; 75 | } 76 | return children; 77 | } 78 | 79 | - (NSString *)address 80 | { 81 | // Base case for root node. 82 | if (!parent) return @""; 83 | else return [parent.address stringByAppendingFormat:@"/%@", self.name]; 84 | } 85 | 86 | - (void)addMethodAtSubAddress:(NSArray *)address target:(id)t action:(SEL)a 87 | { 88 | if ([address count] == 0) 89 | { 90 | // Don't use accessor for children to avoid creating unnecessary empty dictionaries for leaves. 91 | NSAssert1([children count] == 0, @"Cannot turn a OSC address container node in to a method leaf: %@", self); 92 | NSAssert1(t, @"Target cannot be nil for OSC address: %@", self); 93 | NSAssert1(a, @"Action cannot be NULL for OSC address: %@", self); 94 | self.target = t; 95 | self.action = a; 96 | return; 97 | } 98 | 99 | NSAssert1(self.target == nil, @"Cannot add child address to an OSC method leaf node: %@", self); 100 | NSString *childName = [address car]; 101 | OSCAddressNode *child = [self.children objectForKey:childName]; 102 | if (!child) 103 | { 104 | child = [[OSCAddressNode alloc] init]; 105 | child.name = childName; 106 | child.parent = self; 107 | [self.children setObject:child forKey:childName]; 108 | [child release]; 109 | } 110 | [child addMethodAtSubAddress:[address cdr] target:t action:a]; 111 | } 112 | 113 | - (NSArray *)descendantsMatchingPattern:(NSArray *)pattern 114 | { 115 | if ([pattern count] == 0) 116 | { 117 | // Container nodes don't count. 118 | if (self.target) return [NSArray arrayWithObject:self]; 119 | else return [NSArray array]; 120 | } 121 | 122 | NSString *childPattern = [pattern car]; 123 | NSArray *subPattern = [pattern cdr]; 124 | OSCAddressNode *exactMatchChild = [self.children objectForKey:childPattern]; 125 | if (exactMatchChild) 126 | { 127 | return [exactMatchChild descendantsMatchingPattern:subPattern]; 128 | } 129 | 130 | NSMutableArray *matchedChildren = [NSMutableArray array]; 131 | for (NSString *childName in self.children) 132 | { 133 | if ([childName isMatchedByRegex:childPattern]) 134 | { 135 | OSCAddressNode *child = [self.children objectForKey:childName]; 136 | NSArray *descendantMatches = [child descendantsMatchingPattern:subPattern]; 137 | [matchedChildren addObjectsFromArray:descendantMatches]; 138 | } 139 | } 140 | return matchedChildren; 141 | } 142 | 143 | - (NSArray *)descendantsWithTarget:(id)t action:(SEL)a 144 | { 145 | if (self.target && 146 | (!t || self.target == t) && 147 | (!a || self.action == a)) 148 | { 149 | return [NSArray arrayWithObject:self]; 150 | } 151 | NSMutableArray *matchedChildren = [NSMutableArray array]; 152 | for (OSCAddressNode *child in [self.children allValues]) 153 | { 154 | [matchedChildren addObjectsFromArray:[child descendantsWithTarget:t action:a]]; 155 | } 156 | return matchedChildren; 157 | } 158 | 159 | - (void)delete 160 | { 161 | [self.parent.children removeObjectForKey:self.name]; 162 | } 163 | 164 | - (void)dispatchMessage:(OSCPacket *)message 165 | { 166 | [self.target performSelector:self.action withObject:message]; 167 | } 168 | 169 | @end 170 | 171 | 172 | 173 | @implementation OSCDispatcher 174 | 175 | - (id)init 176 | { 177 | if (self = [super init]) 178 | { 179 | rootNode = [[OSCAddressNode alloc] init]; 180 | rootNode.name = @""; 181 | } 182 | return self; 183 | } 184 | 185 | - (void)dealloc 186 | { 187 | [self cancelQueuedBundles]; 188 | [queuedBundles release]; 189 | [rootNode release]; 190 | [super dealloc]; 191 | } 192 | 193 | 194 | - (void)addMethodAddress:(NSString *)address target:(id)target action:(SEL)action 195 | { 196 | NSArray *addressComponents = [OSCDispatcher splitAddressComponents:address]; 197 | NSAssert1(addressComponents, @"Failed to add OSC method with invalid address: %@", address); 198 | [rootNode addMethodAtSubAddress:addressComponents target:target action:action]; 199 | } 200 | 201 | - (void)removeMethodsAtAddressPattern:(NSString *)addressPattern 202 | { 203 | NSArray *patternComponents = [OSCDispatcher splitPatternComponentsToRegex:addressPattern]; 204 | NSAssert1(patternComponents, @"Failed to remove OSC method with invalid address pattern: %@", addressPattern); 205 | NSArray *nodes = [rootNode descendantsMatchingPattern:patternComponents]; 206 | [nodes makeObjectsPerformSelector:@selector(delete)]; 207 | } 208 | 209 | - (void)removeAllTargetMethods:(id)targetOrNil action:(SEL)actionOrNULL 210 | { 211 | NSArray *nodes = [rootNode descendantsWithTarget:targetOrNil action:actionOrNULL]; 212 | [nodes makeObjectsPerformSelector:@selector(delete)]; 213 | } 214 | 215 | 216 | - (void)dispatchPacket:(OSCPacket *)packet 217 | { 218 | // TODO: bundles... 219 | 220 | NSArray *patternComponents = [OSCDispatcher splitPatternComponentsToRegex:packet.address]; 221 | NSAssert1(patternComponents, @"Failed to remove OSC method with invalid address pattern: %@", packet.address); 222 | NSArray *nodes = [rootNode descendantsMatchingPattern:patternComponents]; 223 | [nodes makeObjectsPerformSelector:@selector(dispatchMessage:) withObject:packet]; 224 | } 225 | 226 | 227 | - (NSArray *)cancelQueuedBundles 228 | { 229 | // TODO 230 | } 231 | 232 | 233 | + (NSArray *)splitAddressComponents:(NSString *)address 234 | { 235 | if (![address hasPrefix:@"/"]) return nil; 236 | 237 | NSArray *components = [address componentsSeparatedByString:@"/"]; 238 | NSCharacterSet *illegalChars = getIllegalAddressNameSet(); 239 | for (NSString *name in components) 240 | { 241 | if ([name rangeOfCharacterFromSet:illegalChars].location != NSNotFound) 242 | { 243 | return nil; 244 | } 245 | } 246 | return [components subarrayWithRange:NSMakeRange(1, [components count]-1)]; 247 | } 248 | 249 | + (NSArray *)splitPatternComponentsToRegex:(NSString *)pattern 250 | { 251 | if (![pattern hasPrefix:@"/"]) return nil; 252 | 253 | NSString *regexPattern = globToRegex(pattern); 254 | if (![regexPattern isRegexValid]) return nil; 255 | 256 | NSArray *components = [regexPattern componentsSeparatedByString:@"/"]; 257 | return [components subarrayWithRange:NSMakeRange(1, [components count]-1)]; 258 | } 259 | 260 | @end 261 | 262 | 263 | 264 | NSCharacterSet* getIllegalAddressNameSet() 265 | { 266 | NSCharacterSet *set = nil; 267 | if (!set) 268 | { 269 | set = [[NSCharacterSet characterSetWithRange:NSMakeRange(0x20, 94)] mutableCopy]; 270 | [(NSMutableCharacterSet *)set removeCharactersInString:@" #,/?*{}[]"]; 271 | [(NSMutableCharacterSet *)set invert]; 272 | } 273 | return set; 274 | } 275 | 276 | // This isn't totally correct as far as quoting occurences of regex-special characters in glob etc, but it's probably good enough for most uses. 277 | NSString* globToRegex(NSString *glob) 278 | { 279 | NSMutableString *result = [glob mutableCopy]; 280 | [result replaceOccurrencesOfString:@"." withString:@"\\." options:0 range:NSMakeRange(0, [result length])]; 281 | [result replaceOccurrencesOfString:@"?" withString:@"." options:0 range:NSMakeRange(0, [result length])]; 282 | [result replaceOccurrencesOfString:@"*" withString:@".*?" options:0 range:NSMakeRange(0, [result length])]; 283 | [result replaceOccurrencesOfString:@"[!" withString:@"[^" options:0 range:NSMakeRange(0, [result length])]; 284 | [result replaceOccurrencesOfString:@"(" withString:@"\\(" options:0 range:NSMakeRange(0, [result length])]; 285 | [result replaceOccurrencesOfString:@"{" withString:@"(?:" options:0 range:NSMakeRange(0, [result length])]; 286 | [result replaceOccurrencesOfString:@")" withString:@"\\)" options:0 range:NSMakeRange(0, [result length])]; 287 | [result replaceOccurrencesOfString:@"}" withString:@")" options:0 range:NSMakeRange(0, [result length])]; 288 | [result replaceOccurrencesOfString:@"," withString:@"|" options:0 range:NSMakeRange(0, [result length])]; 289 | return result; 290 | } 291 | -------------------------------------------------------------------------------- /Demo-mac/MyDocument.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyDocument.m 3 | // CocoaOSC Mac Demo 4 | // 5 | // Created by Daniel Dickison on 3/7/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "MyDocument.h" 10 | #import "MyDocumentModel.h" 11 | #import "MyMethod.h" 12 | #import "PacketViewController.h" 13 | #import 14 | 15 | 16 | static OSCConnectionProtocol modelToOSCProtocol(NSInteger protocol); 17 | 18 | 19 | @implementation MyDocument 20 | 21 | @synthesize model; 22 | @synthesize methodsController, sentPacketsController; 23 | @synthesize methodsTable, sentPacketsTable; 24 | @synthesize packetInspector, packetViewController; 25 | @synthesize createPacketSheet, createPacketViewController; 26 | @synthesize connected, listening; 27 | 28 | static void * const KVO_CONTEXT = @"MyDocument_KVO_CONTEXT"; 29 | 30 | - (id)init 31 | { 32 | self = [super init]; 33 | if (self) 34 | { 35 | connection = [[OSCConnection alloc] init]; 36 | connection.delegate = self; 37 | connection.continuouslyReceivePackets = YES; 38 | model = [[MyDocumentModel alloc] init]; 39 | } 40 | return self; 41 | } 42 | 43 | 44 | - (void)close 45 | { 46 | [connection disconnect]; 47 | connection = nil; 48 | } 49 | 50 | 51 | - (NSString *)windowNibName 52 | { 53 | return @"MyDocument"; 54 | } 55 | 56 | 57 | - (void)windowControllerDidLoadNib:(NSWindowController *) aController 58 | { 59 | [super windowControllerDidLoadNib:aController]; 60 | [self.packetInspector setContentView:[self.packetViewController view]]; 61 | [self.createPacketSheet setContentView:[self.createPacketViewController view]]; 62 | [self.methodsTable setDoubleAction:@selector(methodsDoubleClickAction:)]; 63 | [self.sentPacketsTable setDoubleAction:@selector(packetsDoubleClickAction:)]; 64 | 65 | [self.methodsController addObserver:self forKeyPath:@"selectionIndex" options:0 context:KVO_CONTEXT]; 66 | } 67 | 68 | 69 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 70 | { 71 | if (context != KVO_CONTEXT) 72 | { 73 | [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; 74 | return; 75 | } 76 | if (object == self.methodsController) 77 | { 78 | if (previousMethodTableSelection) 79 | { 80 | [previousMethodTableSelection removeObserver:self forKeyPath:@"lastReceivedPacket"]; 81 | } 82 | NSArray *arrangedObjects = [self.methodsController arrangedObjects]; 83 | NSInteger index = [self.methodsController selectionIndex]; 84 | if (index != NSNotFound) 85 | { 86 | MyMethod *newMethod = [arrangedObjects objectAtIndex:index]; 87 | [newMethod addObserver:self forKeyPath:@"lastReceivedPacket" options:NSKeyValueObservingOptionInitial context:KVO_CONTEXT]; 88 | previousMethodTableSelection = newMethod; 89 | } 90 | } 91 | else if ([keyPath isEqualToString:@"lastReceivedPacket"]) 92 | { 93 | [self.packetViewController setRepresentedObject:[object valueForKey:@"lastReceivedPacket"]]; 94 | } 95 | } 96 | 97 | 98 | - (IBAction)tableClickAction:(NSTableView *)sender 99 | { 100 | } 101 | 102 | - (IBAction)methodsDoubleClickAction:(NSTableView *)sender 103 | { 104 | [self.packetInspector makeKeyAndOrderFront:self]; 105 | } 106 | 107 | - (IBAction)packetsDoubleClickAction:(NSTableView *)sender 108 | { 109 | NSDictionary *selected = [self.sentPacketsController.selectedObjects lastObject]; 110 | if (selected) 111 | { 112 | OSCPacket *newPacket = [[selected objectForKey:@"packet"] copy]; 113 | [self.createPacketViewController setRepresentedObject:newPacket]; 114 | [NSApp beginSheet:self.createPacketSheet modalForWindow:[self windowForSheet] modalDelegate:nil didEndSelector:NULL contextInfo:NULL]; 115 | } 116 | } 117 | 118 | 119 | - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError 120 | { 121 | return [NSKeyedArchiver archivedDataWithRootObject:self.model]; 122 | } 123 | 124 | - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError 125 | { 126 | NSKeyedUnarchiver *decoder = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; 127 | [decoder setDelegate:self]; 128 | self.model = [decoder decodeObjectForKey:@"root"]; 129 | [decoder finishDecoding]; 130 | return (self.model != nil); 131 | } 132 | 133 | - (id)unarchiver:(NSKeyedUnarchiver *)unarchiver didDecodeObject:(id)object 134 | { 135 | if ([object isKindOfClass:[MyMethod class]]) 136 | { 137 | [object setDispatcher:connection.dispatcher]; 138 | } 139 | return object; 140 | } 141 | 142 | 143 | 144 | - (BOOL)canConfigure 145 | { 146 | return (!self.listening && !self.connected); 147 | } 148 | 149 | + (NSSet *)keyPathsForValuesAffectingCanConfigure 150 | { 151 | return [NSSet setWithObjects:@"listening", @"connected", nil]; 152 | } 153 | 154 | 155 | - (IBAction)startServer:(NSButton *)sender 156 | { 157 | NSError *error; 158 | NSString *host = ([self.model.localHost length] ? self.model.localHost : nil); 159 | OSCConnectionProtocol protocol = modelToOSCProtocol(self.model.protocol); 160 | if (protocol == OSCConnectionUDP) 161 | { 162 | if (![connection bindToAddress:host port:self.model.localPort error:&error]) 163 | { 164 | [self presentError:error]; 165 | return; 166 | } 167 | [connection receivePacket]; 168 | } 169 | else 170 | { 171 | if (![connection acceptOnInterface:nil port:self.model.localPort protocol:protocol error:&error]) 172 | { 173 | [self presentError:error]; 174 | return; 175 | } 176 | } 177 | self.model.localHost = connection.localHost; 178 | self.listening = YES; 179 | } 180 | 181 | 182 | - (IBAction)connect:(NSButton *)sender 183 | { 184 | NSError *error; 185 | if (![connection connectToHost:self.model.remoteHost port:self.model.remotePort protocol:modelToOSCProtocol(self.model.protocol) error:&error]) 186 | { 187 | [self presentError:error]; 188 | return; 189 | } 190 | } 191 | 192 | 193 | - (IBAction)addMethod:(NSButton *)sender 194 | { 195 | MyMethod *method = [[MyMethod alloc] init]; 196 | method.dispatcher = connection.dispatcher; 197 | method.address = @"/new_method"; 198 | [self.methodsController addObject:method]; 199 | } 200 | 201 | - (IBAction)removeSelectedMethod:(NSButton *)sender 202 | { 203 | for (MyMethod *method in [self.methodsController selectedObjects]) 204 | { 205 | [method.dispatcher removeAllTargetMethods:method action:NULL]; 206 | } 207 | [self.methodsController remove:sender]; 208 | } 209 | 210 | 211 | - (IBAction)newPacket:(NSButton *)sender 212 | { 213 | OSCPacket *newPacket = [[OSCMutableMessage alloc] init]; 214 | [self.createPacketViewController setRepresentedObject:newPacket]; 215 | [NSApp beginSheet:self.createPacketSheet modalForWindow:[self windowForSheet] modalDelegate:nil didEndSelector:NULL contextInfo:NULL]; 216 | } 217 | 218 | 219 | - (void)sendPacket:(OSCPacket *)packet 220 | { 221 | if (!packet) return; 222 | 223 | [self.sentPacketsController addObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSDate date], @"date", packet, @"packet", nil]]; 224 | if (self.connected) 225 | { 226 | [connection sendPacket:packet]; 227 | } 228 | else 229 | { 230 | // This case is for UDP servers that have received a remote packet after which the remote address is saved in the model object. 231 | [connection sendPacket:packet toHost:self.model.remoteHost port:self.model.remotePort]; 232 | } 233 | [NSApp endSheet:self.createPacketSheet]; 234 | [self.createPacketSheet orderOut:nil]; 235 | } 236 | 237 | 238 | #pragma mark OSCConnectionDelegate Methods 239 | 240 | //- (void)oscConnectionWillConnect:(OSCConnection *)connection; 241 | - (void)oscConnectionDidConnect:(OSCConnection *)conn 242 | { 243 | // Update the model and UI with actual connection info. 244 | self.connected = YES; 245 | self.listening = NO; 246 | self.model.localHost = conn.localHost; 247 | self.model.localPort = conn.localPort; 248 | self.model.remoteHost = conn.connectedHost; 249 | self.model.remotePort = conn.connectedPort; 250 | 251 | [conn receivePacket]; 252 | } 253 | 254 | - (void)oscConnectionDidDisconnect:(OSCConnection *)connection 255 | { 256 | self.connected = NO; 257 | NSLog(@"Disconnected. Restarting server..."); 258 | [self startServer:nil]; 259 | } 260 | 261 | //- (void)oscConnection:(OSCConnection *)connection willSendPacket:(OSCPacket *)packet; 262 | //- (void)oscConnection:(OSCConnection *)connection didSendPacket:(OSCPacket *)packet; 263 | 264 | - (void)maybeAddNewMethod:(NSString *)address 265 | { 266 | if ([MyMethod validateAddress:&address error:NULL]) 267 | { 268 | BOOL found = NO; 269 | for (MyMethod *method in model.methods) 270 | { 271 | if ([method.address isEqualToString:address]) 272 | { 273 | found = YES; 274 | break; 275 | } 276 | } 277 | if (!found) 278 | { 279 | MyMethod *method = [[MyMethod alloc] init]; 280 | method.dispatcher = connection.dispatcher; 281 | method.address = address; 282 | [self.methodsController addObject:method]; 283 | } 284 | } 285 | } 286 | 287 | - (void)oscConnection:(OSCConnection *)conn didReceivePacket:(OSCPacket *)packet 288 | { 289 | [self maybeAddNewMethod:packet.address]; 290 | } 291 | 292 | - (void)oscConnection:(OSCConnection *)conn didReceivePacket:(OSCPacket *)packet fromHost:(NSString *)host port:(UInt16)port 293 | { 294 | if (host) 295 | { 296 | self.model.remoteHost = host; 297 | self.model.remotePort = port; 298 | } 299 | [self maybeAddNewMethod:packet.address]; 300 | } 301 | //- (void)oscConnection:(OSCConnection *)connection failedToReceivePacketWithError:(NSError *)error; 302 | 303 | @end 304 | 305 | 306 | OSCConnectionProtocol modelToOSCProtocol(NSInteger protocol) 307 | { 308 | switch (protocol) 309 | { 310 | case 0: return OSCConnectionUDP; 311 | case 1: return OSCConnectionTCP_Int32Header; 312 | case 2: return OSCConnectionTCP_RFC1055; 313 | } 314 | return OSCConnectionUDP; 315 | } 316 | 317 | -------------------------------------------------------------------------------- /CocoaOSC/OSCConnection.m: -------------------------------------------------------------------------------- 1 | // 2 | // OSCConnection.m 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 3/6/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "OSCConnection.h" 10 | #import "OSCPacket.h" 11 | #import "OSCDispatcher.h" 12 | #import "AsyncSocket.h" 13 | #import "AsyncUdpSocket.h" 14 | 15 | 16 | #define MAX_PACKET_LENGTH 1048576 17 | 18 | 19 | enum { 20 | kPacketHeaderTag = -1, 21 | kPacketDataTag = -2 22 | }; 23 | 24 | 25 | @interface OSCConnection () 26 | 27 | - (void)dispatchPacketData:(NSData *)data fromHost:(NSString *)host port:(UInt16)port; 28 | - (void)notifyDelegateOfSentPacketWithTag:(long)tag; 29 | - (void)disconnectAndNotifyDelegate:(BOOL)notify; 30 | @property (nonatomic, readonly) id socket; // TCP or UDP socket or nil. 31 | 32 | @end 33 | 34 | 35 | @implementation OSCConnection 36 | 37 | @synthesize protocol, delegate, dispatcher, continuouslyReceivePackets; 38 | 39 | - (id)init 40 | { 41 | if (self = [super init]) 42 | { 43 | dispatcher = [[OSCDispatcher alloc] init]; 44 | pendingPacketsByTag = [[NSMutableDictionary alloc] init]; 45 | } 46 | return self; 47 | } 48 | 49 | - (void)dealloc 50 | { 51 | [self disconnect]; 52 | [dispatcher release]; 53 | [pendingPacketsByTag release]; 54 | [super dealloc]; 55 | } 56 | 57 | 58 | - (void)disconnect 59 | { 60 | [self disconnectAndNotifyDelegate:self.connected]; 61 | } 62 | 63 | - (void)disconnectAndNotifyDelegate:(BOOL)notify 64 | { 65 | [tcpListenSocket setDelegate:nil]; 66 | [tcpListenSocket disconnect]; 67 | [tcpListenSocket release]; 68 | tcpListenSocket = nil; 69 | 70 | [tcpSocket setDelegate:nil]; 71 | [tcpSocket disconnect]; 72 | [tcpSocket release]; 73 | tcpSocket = nil; 74 | 75 | [udpSocket setDelegate:nil]; 76 | [udpSocket release]; 77 | udpSocket = nil; 78 | 79 | [pendingPacketsByTag removeAllObjects]; 80 | if (notify && 81 | [delegate respondsToSelector:@selector(oscConnectionDidDisconnect:)]) 82 | { 83 | [delegate oscConnectionDidDisconnect:self]; 84 | } 85 | } 86 | 87 | 88 | - (BOOL)isConnected 89 | { 90 | return [self.socket isConnected]; 91 | } 92 | 93 | 94 | - (id)socket 95 | { 96 | return (tcpSocket ? (id)tcpSocket : (id)udpSocket); 97 | } 98 | 99 | 100 | - (NSString *)connectedHost 101 | { 102 | return [self.socket connectedHost]; 103 | } 104 | 105 | - (UInt16)connectedPort 106 | { 107 | return [self.socket connectedPort]; 108 | } 109 | 110 | - (NSString *)localHost 111 | { 112 | return [self.socket localHost]; 113 | } 114 | 115 | - (UInt16)localPort 116 | { 117 | return [self.socket localPort]; 118 | } 119 | 120 | 121 | - (BOOL)connectToHost:(NSString *)host port:(UInt16)port protocol:(OSCConnectionProtocol)proto error:(NSError **)errPtr 122 | { 123 | [self disconnectAndNotifyDelegate:self.connected]; 124 | 125 | protocol = proto; 126 | 127 | if ([delegate respondsToSelector:@selector(oscConnectionWillConnect:)]) 128 | { 129 | [delegate oscConnectionWillConnect:self]; 130 | } 131 | 132 | if (protocol == OSCConnectionTCP_Int32Header || 133 | protocol == OSCConnectionTCP_RFC1055) 134 | { 135 | tcpSocket = [[AsyncSocket alloc] initWithDelegate:self]; 136 | if (![tcpSocket connectToHost:host onPort:port error:errPtr]) 137 | { 138 | goto onError; 139 | } 140 | } 141 | else 142 | { 143 | udpSocket = [[AsyncUdpSocket alloc] initWithDelegate:self]; 144 | if (![udpSocket connectToHost:host onPort:port error:errPtr]) 145 | { 146 | goto onError; 147 | } 148 | else 149 | { 150 | // UDP has no actual connection, so we assume it's all peachy and send off the connected notification. 151 | if ([delegate respondsToSelector:@selector(oscConnectionDidConnect:)]) 152 | { 153 | [delegate oscConnectionDidConnect:self]; 154 | } 155 | } 156 | } 157 | return YES; 158 | 159 | onError: 160 | [self disconnectAndNotifyDelegate:NO]; 161 | return NO; 162 | } 163 | 164 | 165 | - (BOOL)acceptOnInterface:(NSString *)interface port:(UInt16)port protocol:(OSCConnectionProtocol)proto error:(NSError **)errPtr 166 | { 167 | NSAssert(proto == OSCConnectionTCP_Int32Header || 168 | proto == OSCConnectionTCP_RFC1055, 169 | @"Can only accept connections on TCP sockets!"); 170 | [self disconnectAndNotifyDelegate:self.connected]; 171 | protocol = proto; 172 | tcpListenSocket = [[AsyncSocket alloc] initWithDelegate:self]; 173 | return [tcpListenSocket acceptOnInterface:interface port:port error:errPtr]; 174 | } 175 | 176 | 177 | - (BOOL)bindToAddress:(NSString *)localAddr port:(UInt16)port error:(NSError **)errPtr 178 | { 179 | [self disconnectAndNotifyDelegate:self.connected]; 180 | protocol = OSCConnectionUDP; 181 | udpSocket = [[AsyncUdpSocket alloc] initWithDelegate:self]; 182 | return [udpSocket bindToAddress:localAddr port:port error:errPtr]; 183 | } 184 | 185 | 186 | - (void)sendPacket:(OSCPacket *)packet 187 | { 188 | if (!self.connected) 189 | { 190 | // Make this non-fatal since sometimes a disconnect is not detected immediately. 191 | NSLog(@"Attempted to send an OSC packet while disconnected; ignoring."); 192 | return; 193 | } 194 | 195 | if ([delegate respondsToSelector:@selector(oscConnection:willSendPacket:)]) 196 | { 197 | [delegate oscConnection:self willSendPacket:packet]; 198 | } 199 | 200 | lastSendTag++; 201 | [pendingPacketsByTag setObject:packet forKey:[NSNumber numberWithLong:lastSendTag]]; 202 | 203 | NSData *packetData = [packet encode]; 204 | if (protocol == OSCConnectionUDP) 205 | { 206 | [udpSocket sendData:packetData withTimeout:-1 tag:lastSendTag]; 207 | } 208 | else if (protocol == OSCConnectionTCP_Int32Header) 209 | { 210 | uint32_t length = CFSwapInt32HostToBig((uint32_t)[packetData length]); 211 | NSData *lengthData = [NSData dataWithBytes:&length length:4]; 212 | [tcpSocket writeData:lengthData withTimeout:-1 tag:kPacketHeaderTag]; 213 | [tcpSocket writeData:packetData withTimeout:-1 tag:lastSendTag]; 214 | } 215 | else 216 | { 217 | // TODO: see http://www.faqs.org/rfcs/rfc1055.html 218 | NSLog(@"OSCConnectionTCP_RFC1055 not yet implemented."); 219 | } 220 | } 221 | 222 | 223 | - (void)sendPacket:(OSCPacket *)packet toHost:(NSString *)host port:(UInt16)port 224 | { 225 | NSAssert(protocol == OSCConnectionUDP && 226 | udpSocket && 227 | ![udpSocket isConnected], 228 | @"-[OSCConnection sendPacket:toHost:port] can only be called on a UDP connection that has been binded."); 229 | lastSendTag++; 230 | [pendingPacketsByTag setObject:packet forKey:[NSNumber numberWithLong:lastSendTag]]; 231 | [udpSocket sendData:[packet encode] toHost:host port:port withTimeout:-1 tag:lastSendTag]; 232 | } 233 | 234 | 235 | - (void)receivePacket 236 | { 237 | if (protocol == OSCConnectionUDP) 238 | { 239 | [udpSocket receiveWithTimeout:-1 tag:0]; 240 | } 241 | else if (protocol == OSCConnectionTCP_Int32Header) 242 | { 243 | [tcpSocket readDataToLength:4 withTimeout:-1 tag:kPacketHeaderTag]; 244 | } 245 | else 246 | { 247 | // TODO: see http://www.faqs.org/rfcs/rfc1055.html 248 | NSLog(@"OSCConnectionTCP_RFC1055 not yet implemented."); 249 | } 250 | } 251 | 252 | 253 | 254 | - (void)dispatchPacketData:(NSData *)data fromHost:(NSString *)host port:(UInt16)port 255 | { 256 | OSCPacket *packet = [[OSCPacket alloc] initWithData:data]; 257 | if (!packet) 258 | { 259 | if ([delegate respondsToSelector:@selector(oscConnection:failedToReceivePacketWithError:)]) 260 | { 261 | [delegate oscConnection:self failedToReceivePacketWithError:nil]; 262 | } 263 | return; 264 | } 265 | 266 | [dispatcher dispatchPacket:packet]; 267 | 268 | if (protocol == OSCConnectionUDP && 269 | [delegate respondsToSelector:@selector(oscConnection:didReceivePacket:fromHost:port:)]) 270 | { 271 | [delegate oscConnection:self didReceivePacket:packet fromHost:host port:port]; 272 | } 273 | else if ([delegate respondsToSelector:@selector(oscConnection:didReceivePacket:)]) 274 | { 275 | [delegate oscConnection:self didReceivePacket:packet]; 276 | } 277 | [packet release]; 278 | } 279 | 280 | 281 | - (void)notifyDelegateOfSentPacketWithTag:(long)tag 282 | { 283 | NSNumber *key = [NSNumber numberWithLong:tag]; 284 | if ([delegate respondsToSelector:@selector(oscConnection:didSendPacket:)]) 285 | { 286 | OSCPacket *packet = [pendingPacketsByTag objectForKey:key]; 287 | [delegate oscConnection:self didSendPacket:packet]; 288 | } 289 | [pendingPacketsByTag removeObjectForKey:key]; 290 | } 291 | 292 | 293 | 294 | #pragma mark TCP Delegate Methods 295 | 296 | - (void)onSocket:(AsyncSocket *)sock didAcceptNewSocket:(AsyncSocket *)newSocket 297 | { 298 | [self disconnectAndNotifyDelegate:NO]; 299 | tcpSocket = [newSocket retain]; 300 | } 301 | 302 | - (void)onSocket:(AsyncSocket *)sock didConnectToHost:(NSString *)host port:(UInt16)port 303 | { 304 | if ([delegate respondsToSelector:@selector(oscConnectionDidConnect:)]) 305 | { 306 | [delegate oscConnectionDidConnect:self]; 307 | } 308 | } 309 | 310 | 311 | - (void)onSocketDidDisconnect:(AsyncSocket *)sock 312 | { 313 | [self disconnectAndNotifyDelegate:YES]; 314 | } 315 | 316 | 317 | - (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag 318 | { 319 | if (tag == kPacketHeaderTag) 320 | { 321 | if ([data length] != 4) 322 | { 323 | NSLog(@"Expected 4-byte packet header but received %@", data); 324 | [self disconnectAndNotifyDelegate:YES]; 325 | return; 326 | } 327 | const void *bytes = [data bytes]; 328 | uint32_t length = CFSwapInt32BigToHost(*(uint32_t *)bytes); 329 | if (length > MAX_PACKET_LENGTH) 330 | { 331 | NSLog(@"Packet exceeds maximum size (%d > %d bytes)", length, MAX_PACKET_LENGTH); 332 | [self disconnectAndNotifyDelegate:YES]; 333 | return; 334 | } 335 | [sock readDataToLength:length withTimeout:-1 tag:kPacketDataTag]; 336 | } 337 | else if (tag == kPacketDataTag) 338 | { 339 | [self dispatchPacketData:data fromHost:nil port:0]; 340 | if (self.continuouslyReceivePackets) 341 | { 342 | [self receivePacket]; 343 | } 344 | } 345 | } 346 | 347 | 348 | - (void)onSocket:(AsyncSocket *)sock didWriteDataWithTag:(long)tag 349 | { 350 | if (tag != kPacketHeaderTag) 351 | { 352 | [self notifyDelegateOfSentPacketWithTag:tag]; 353 | } 354 | } 355 | 356 | 357 | #pragma mark UDP Delegate Methods 358 | 359 | - (BOOL)onUdpSocket:(AsyncUdpSocket *)sock didReceiveData:(NSData *)data withTag:(long)tag fromHost:(NSString *)host port:(UInt16)port 360 | { 361 | [self dispatchPacketData:data fromHost:host port:port]; 362 | if (self.continuouslyReceivePackets) 363 | { 364 | [self receivePacket]; 365 | } 366 | return YES; 367 | } 368 | 369 | - (void)onUdpSocket:(AsyncUdpSocket *)sock didSendDataWithTag:(long)tag 370 | { 371 | [self notifyDelegateOfSentPacketWithTag:tag]; 372 | } 373 | 374 | @end 375 | -------------------------------------------------------------------------------- /CocoaOSC/OSCPacket.m: -------------------------------------------------------------------------------- 1 | // 2 | // OSCPacket.m 3 | // CocoaOSC 4 | // 5 | // Created by Daniel Dickison on 1/26/10. 6 | // Copyright 2010 Daniel_Dickison. All rights reserved. 7 | // 8 | 9 | #import "OSCPacket.h" 10 | #import "NS+OSCAdditions.h" 11 | 12 | 13 | static id parseOSCObject(char typetag, const void *bytes, NSUInteger *ioIndex, NSUInteger length); 14 | 15 | 16 | @implementation OSCImpulse 17 | 18 | + (OSCImpulse *)impulse 19 | { 20 | static OSCImpulse *impulse = nil; 21 | if (!impulse) 22 | { 23 | impulse = [[OSCImpulse alloc] init]; 24 | } 25 | return impulse; 26 | } 27 | 28 | @end 29 | 30 | 31 | @implementation OSCBool 32 | 33 | + (OSCBool *)yes 34 | { 35 | static OSCBool *yes = nil; 36 | if (!yes) 37 | { 38 | yes = [[OSCBool alloc] init]; 39 | } 40 | return yes; 41 | } 42 | 43 | + (OSCBool *)no 44 | { 45 | static OSCBool *no = nil; 46 | if (!no) 47 | { 48 | no = [[OSCBool alloc] init]; 49 | } 50 | return no; 51 | } 52 | 53 | - (BOOL)value 54 | { 55 | return (self == [OSCBool yes]); 56 | } 57 | 58 | - (NSString *)description 59 | { 60 | return (self.value ? @"YES" : @"NO"); 61 | } 62 | 63 | @end 64 | 65 | 66 | 67 | 68 | @implementation OSCPacket 69 | 70 | 71 | // Following accessors overridden by concrete subclasses. 72 | 73 | - (NSString *)address 74 | { 75 | return nil; 76 | } 77 | 78 | - (NSArray *)arguments 79 | { 80 | return nil; 81 | } 82 | 83 | - (NSDate *)timetag 84 | { 85 | return nil; 86 | } 87 | 88 | - (NSArray *)childPackets 89 | { 90 | return nil; 91 | } 92 | 93 | 94 | 95 | // Methods common to cluster. 96 | 97 | - (BOOL)isBundle 98 | { 99 | return self.childPackets != nil; 100 | } 101 | 102 | 103 | - (id)initWithData:(NSData *)data 104 | { 105 | if (self = [super init]) 106 | { 107 | if ([data length] == 0) 108 | { 109 | [self release]; 110 | return nil; 111 | } 112 | unsigned char firstByte[1]; 113 | [data getBytes:firstByte length:1]; 114 | if (firstByte[0] == '/') 115 | { 116 | [self release]; 117 | self = [[OSCMutableMessage alloc] initWithData:data]; 118 | } 119 | else if (firstByte[0] == '#') 120 | { 121 | [self release]; 122 | self = [[OSCMutableBundle alloc] initWithData:data]; 123 | } 124 | else 125 | { 126 | NSLog(@"Unrecognized first byte for OSC message: %@", data); 127 | [self release]; 128 | return nil; 129 | } 130 | } 131 | return self; 132 | } 133 | 134 | - (id)initWithCoder:(NSCoder *)aDecoder 135 | { 136 | [self release]; 137 | self = nil; 138 | NSData *data = [aDecoder decodeObjectForKey:@"data"]; 139 | if (data) { 140 | self = [[OSCPacket alloc] initWithData:data]; 141 | } 142 | return self; 143 | } 144 | 145 | - (id)copyWithZone:(NSZone *)zone 146 | { 147 | // There are certainly more efficient ways to do this, but this is good enough for now. 148 | return [[OSCPacket alloc] initWithData:[self encode]]; 149 | } 150 | 151 | - (void)encodeWithCoder:(NSCoder *)aCoder 152 | { 153 | [aCoder encodeObject:[self encode] forKey:@"data"]; 154 | } 155 | 156 | + (NSData *)dataForContentObject:(id)obj 157 | { 158 | if ([obj isKindOfClass:[NSNumber class]]) 159 | { 160 | const char *objCType = [obj objCType]; 161 | switch (objCType[0]) 162 | { 163 | case 'c': 164 | case 'C': 165 | case 'i': 166 | case 'I': 167 | case 's': 168 | case 'S': 169 | case 'l': 170 | case 'L': 171 | case 'q': 172 | case 'Q': 173 | { 174 | uint32_t num = CFSwapInt32HostToBig([obj intValue]); 175 | return [NSData dataWithBytes:&num length:4]; 176 | } 177 | case 'f': 178 | case 'd': 179 | { 180 | CFSwappedFloat32 num = CFConvertFloat32HostToSwapped([obj floatValue]); 181 | return [NSData dataWithBytes:&num length:4]; 182 | } 183 | case 'B': 184 | return [NSData data]; 185 | default: 186 | return nil; 187 | } 188 | } 189 | else if ([obj isKindOfClass:[NSString class]]) 190 | { 191 | return [obj oscStringData]; 192 | } 193 | else if ([obj isKindOfClass:[NSData class]]) 194 | { 195 | uint32_t contentLength = (uint32_t)[obj length]; 196 | NSUInteger length = 4 + contentLength; 197 | while (length % 4 > 0) length++; 198 | NSMutableData *data = [NSMutableData dataWithCapacity:length]; 199 | uint32_t swappedLength = CFSwapInt32HostToBig(contentLength); 200 | [data appendBytes:&swappedLength length:4]; 201 | [data appendData:obj]; 202 | [data setLength:length]; 203 | return data; 204 | } 205 | else if ([obj isKindOfClass:[NSNull class]]) 206 | { 207 | return [NSData data]; 208 | } 209 | else if ([obj isKindOfClass:[OSCImpulse class]]) 210 | { 211 | return [NSData data]; 212 | } 213 | else if ([obj isKindOfClass:[OSCBool class]]) 214 | { 215 | return [NSData data]; 216 | } 217 | else if ([obj isKindOfClass:[NSDate class]]) 218 | { 219 | uint64_t swapped = CFSwapInt64HostToBig([obj ntpTimestamp]); 220 | return [NSData dataWithBytes:&swapped length:8]; 221 | } 222 | // Unknown types return nil; 223 | return nil; 224 | } 225 | 226 | 227 | - (NSData *)encode 228 | { 229 | return nil; 230 | } 231 | 232 | @end 233 | 234 | 235 | 236 | @implementation OSCMutableMessage 237 | 238 | @synthesize arguments; 239 | @synthesize address; 240 | 241 | - (void)dealloc 242 | { 243 | [arguments release]; 244 | [address release]; 245 | [super dealloc]; 246 | } 247 | 248 | - (id)init 249 | { 250 | return [self initWithData:nil]; 251 | } 252 | 253 | - (id)initWithData:(NSData *)data 254 | { 255 | if (self = [super init]) 256 | { 257 | // Init ivars. 258 | arguments = [[NSMutableArray alloc] init]; 259 | address = @"/"; 260 | 261 | // Parse data. 262 | NSUInteger length = [data length]; 263 | if (length > 0) 264 | { 265 | const void *bytes = [data bytes]; 266 | NSUInteger index = 0; 267 | 268 | // Parse address. 269 | self.address = parseOSCObject('s', bytes, &index, length); 270 | 271 | // Parse type tag and arguments according to those types. 272 | NSString *typetag = parseOSCObject('s', bytes, &index, length); 273 | const char *typeCStr = [typetag UTF8String]; 274 | for (unsigned tagIndex = 0; typeCStr[tagIndex] != '\0'; tagIndex++) 275 | { 276 | // First character is ',' so skip that. 277 | if (tagIndex > 0) 278 | { 279 | [self addArgument:parseOSCObject(typeCStr[tagIndex], bytes, &index, length)]; 280 | } 281 | } 282 | } 283 | } 284 | return self; 285 | } 286 | 287 | 288 | - (void)addArgument:(id)arg 289 | { 290 | [self willChangeValueForKey:@"arguments"]; 291 | [(NSMutableArray *)arguments addObject:arg]; 292 | [self didChangeValueForKey:@"arguments"]; 293 | } 294 | 295 | - (void)addInt:(int)anInt 296 | { 297 | [self addArgument:[NSNumber numberWithInt:anInt]]; 298 | } 299 | 300 | - (void)addFloat:(float)aFloat 301 | { 302 | [self addArgument:[NSNumber numberWithFloat:aFloat]]; 303 | } 304 | 305 | - (void)addString:(NSString *)str 306 | { 307 | [self addArgument:str]; 308 | } 309 | 310 | - (void)addBlob:(NSData *)blob 311 | { 312 | [self addArgument:blob]; 313 | } 314 | 315 | - (void)addTimeTag:(NSDate *)time 316 | { 317 | [self addArgument:time]; 318 | } 319 | 320 | - (void)addBool:(BOOL)aBool 321 | { 322 | [self addArgument:(aBool ? [OSCBool yes] : [OSCBool no])]; 323 | } 324 | 325 | - (void)addNull 326 | { 327 | [self addArgument:[NSNull null]]; 328 | } 329 | 330 | - (void)addImpulse 331 | { 332 | [self addArgument:[OSCImpulse impulse]]; 333 | } 334 | 335 | 336 | - (NSString *)typeTag 337 | { 338 | NSMutableString *str = [NSMutableString stringWithCapacity:[arguments count]+1]; 339 | [str appendString:@","]; 340 | for (id arg in arguments) 341 | { 342 | if ([arg isKindOfClass:[NSNumber class]]) 343 | { 344 | const char *objCType = [arg objCType]; 345 | switch (objCType[0]) 346 | { 347 | case 'c': 348 | case 'C': 349 | case 'i': 350 | case 'I': 351 | case 's': 352 | case 'S': 353 | case 'l': 354 | case 'L': 355 | case 'q': 356 | case 'Q': 357 | [str appendString:@"i"]; 358 | break; 359 | case 'f': 360 | case 'd': 361 | [str appendString:@"f"]; 362 | break; 363 | case 'B': 364 | if ([arg boolValue]) 365 | { 366 | [str appendString:@"T"]; 367 | } 368 | else 369 | { 370 | [str appendString:@"F"]; 371 | } 372 | break; 373 | default: 374 | [str appendString:@"?"]; 375 | } 376 | } 377 | else if ([arg isKindOfClass:[NSString class]]) 378 | { 379 | [str appendString:@"s"]; 380 | } 381 | else if ([arg isKindOfClass:[NSData class]]) 382 | { 383 | [str appendString:@"b"]; 384 | } 385 | else if ([arg isKindOfClass:[NSNull class]]) 386 | { 387 | [str appendString:@"N"]; 388 | } 389 | else if ([arg isKindOfClass:[OSCImpulse class]]) 390 | { 391 | [str appendString:@"I"]; 392 | } 393 | else if ([arg isKindOfClass:[OSCBool class]]) 394 | { 395 | [str appendString:([(OSCBool *)arg value] ? @"T" : @"F")]; 396 | } 397 | else if ([arg isKindOfClass:[NSDate class]]) 398 | { 399 | [str appendString:@"t"]; 400 | } 401 | } 402 | return str; 403 | } 404 | 405 | 406 | - (NSData *)encode 407 | { 408 | NSMutableData *data = [NSMutableData data]; 409 | if (![address hasPrefix:@"/"]) 410 | { 411 | NSLog(@"Failed to encode OSCPacket because address doesn't start with a slash: %@", address); 412 | return nil; 413 | } 414 | [data appendData:[address oscStringData]]; 415 | [data appendData:[self.typeTag oscStringData]]; 416 | for (id arg in arguments) 417 | { 418 | [data appendData:[OSCPacket dataForContentObject:arg]]; 419 | } 420 | return data; 421 | } 422 | 423 | 424 | - (NSString *)description 425 | { 426 | return [NSString stringWithFormat:@"", address, arguments]; 427 | } 428 | 429 | @end 430 | 431 | 432 | 433 | @implementation OSCMutableBundle 434 | 435 | @synthesize childPackets; 436 | @synthesize timetag; 437 | 438 | - (void)dealloc 439 | { 440 | [childPackets release]; 441 | [timetag release]; 442 | [super dealloc]; 443 | } 444 | 445 | - (id)init 446 | { 447 | return [self initWithData:nil]; 448 | } 449 | 450 | - (id)initWithData:(NSData *)data 451 | { 452 | if (self = [super init]) 453 | { 454 | // Init ivars. 455 | childPackets = [[NSMutableArray alloc] init]; 456 | timetag = [[NSDate alloc] init]; 457 | 458 | // Parse data if it's not empty (or nil). 459 | NSUInteger length = [data length]; 460 | if (length > 0) 461 | { 462 | const void *bytes = [data bytes]; 463 | NSUInteger index = 0; 464 | 465 | // Validate bundle marker. 466 | NSString *bundleMarker = parseOSCObject('s', bytes, &index, length); 467 | if (![bundleMarker isEqualToString:@"#bundle"]) 468 | { 469 | NSLog(@"Malformed bundle marker: %@", bundleMarker); 470 | [self release]; 471 | return nil; 472 | } 473 | 474 | // Parse time tag. 475 | self.timetag = parseOSCObject('t', bytes, &index, length); 476 | 477 | // Parse children. 478 | while (index < length) 479 | { 480 | NSUInteger size = [parseOSCObject('i', bytes, &index, length) unsignedIntegerValue]; 481 | NSData *subData = [data subdataWithRange:NSMakeRange(index, size)]; 482 | OSCPacket *childPacket = [[OSCPacket alloc] initWithData:subData]; 483 | [self addChildPacket:childPacket]; 484 | [childPacket release]; 485 | index += size; 486 | } 487 | } 488 | } 489 | return self; 490 | } 491 | 492 | - (void)addChildPacket:(OSCPacket *)packet 493 | { 494 | [(NSMutableArray *)childPackets addObject:packet]; 495 | } 496 | 497 | 498 | - (NSData *)encode 499 | { 500 | NSMutableData *data = [NSMutableData data]; 501 | [data appendData:[@"#bundle" oscStringData]]; 502 | [data appendData:[OSCPacket dataForContentObject:timetag]]; 503 | for (OSCPacket *child in childPackets) 504 | { 505 | NSData *childData = [child encode]; 506 | uint32_t swappedChildLength = CFSwapInt32HostToBig((uint32_t)[childData length]); 507 | [data appendBytes:&swappedChildLength length:4]; 508 | [data appendData:childData]; 509 | } 510 | return data; 511 | } 512 | 513 | 514 | - (NSString *)description 515 | { 516 | return [NSString stringWithFormat:@"", (unsigned long)[childPackets count], timetag]; 517 | } 518 | 519 | @end 520 | 521 | 522 | 523 | static id parseOSCObject(char typetag, const void *bytes, NSUInteger *ioIndex, NSUInteger length) 524 | { 525 | id returnValue; 526 | switch (typetag) 527 | { 528 | case 's': 529 | { 530 | // Strings. 531 | // This implementation mallocs a buffer large enough to hold the rest of the bytes array. This will be grossly inefficient if this string is followed by large blobs or strings. Hopefully that is relatively rare. The upshot is that if the data is missing the terminating NULL character, we won't end up reading random garbage from memory. 532 | NSUInteger bufferSize = length - (*ioIndex); 533 | char *buffer = malloc(bufferSize * sizeof(char)); 534 | strncpy(buffer, bytes + (*ioIndex), bufferSize); 535 | if (buffer[bufferSize-1] == '\0') 536 | { 537 | NSUInteger strLength = strlen(buffer); 538 | returnValue = [[[NSString alloc] initWithBytesNoCopy:buffer length:strLength encoding:NSASCIIStringEncoding freeWhenDone:YES] autorelease]; 539 | *ioIndex += strLength+1; 540 | } 541 | else 542 | { 543 | NSLog(@"OSC string was not NULL-terminated!"); 544 | free(buffer); 545 | *ioIndex = length; 546 | returnValue = nil; 547 | } 548 | break; 549 | } 550 | case 'i': 551 | { 552 | const void *intPtr = bytes + *ioIndex; 553 | uint32_t hostInt = CFSwapInt32BigToHost(*(uint32_t *)intPtr); 554 | returnValue = [NSNumber numberWithInt:hostInt]; 555 | *ioIndex += 4; 556 | break; 557 | } 558 | case 'f': 559 | { 560 | const void *floatPtr = bytes + *ioIndex; 561 | Float32 hostFloat = CFConvertFloat32SwappedToHost(*(CFSwappedFloat32 *)floatPtr); 562 | returnValue = [NSNumber numberWithFloat:hostFloat]; 563 | *ioIndex += 4; 564 | break; 565 | } 566 | case 'b': 567 | { 568 | NSUInteger blobLength = [parseOSCObject('i', bytes, ioIndex, length) unsignedIntegerValue]; 569 | returnValue = [NSData dataWithBytes:(bytes + (*ioIndex)) length:blobLength]; 570 | *ioIndex += blobLength; 571 | break; 572 | } 573 | case 't': 574 | { 575 | const void *intPtr = bytes + *ioIndex; 576 | uint64_t timestamp = CFSwapInt64BigToHost(*(uint64_t *)intPtr); 577 | returnValue = [NSDate dateWithNTPTimestamp:timestamp]; 578 | *ioIndex += 8; 579 | break; 580 | } 581 | case 'T': 582 | { 583 | returnValue = [OSCBool yes]; 584 | break; 585 | } 586 | case 'F': 587 | { 588 | returnValue = [OSCBool no]; 589 | break; 590 | } 591 | case 'I': 592 | { 593 | returnValue = [OSCImpulse impulse]; 594 | break; 595 | } 596 | case 'N': 597 | { 598 | returnValue = [NSNull null]; 599 | break; 600 | } 601 | default: 602 | { 603 | NSLog(@"Unrecognized OSC type tag: %c", typetag); 604 | returnValue = nil; 605 | *ioIndex = length; 606 | break; 607 | } 608 | } 609 | while (*ioIndex % 4 > 0) (*ioIndex)++; 610 | 611 | return returnValue; 612 | } 613 | 614 | -------------------------------------------------------------------------------- /lib/RegexKitLite/RegexKitLite.h: -------------------------------------------------------------------------------- 1 | // 2 | // RegexKitLite.h 3 | // http://regexkit.sourceforge.net/ 4 | // Licensed under the terms of the BSD License, as specified below. 5 | // 6 | 7 | /* 8 | Copyright (c) 2008-2010, John Engelhart 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | * Neither the name of the Zang Industries nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 32 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | */ 38 | 39 | #ifdef __OBJC__ 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | #endif // __OBJC__ 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | #ifndef REGEXKITLITE_VERSION_DEFINED 58 | #define REGEXKITLITE_VERSION_DEFINED 59 | 60 | #define _RKL__STRINGIFY(b) #b 61 | #define _RKL_STRINGIFY(a) _RKL__STRINGIFY(a) 62 | #define _RKL_JOIN_VERSION(a,b) _RKL_STRINGIFY(a##.##b) 63 | #define _RKL_VERSION_STRING(a,b) _RKL_JOIN_VERSION(a,b) 64 | 65 | #define REGEXKITLITE_VERSION_MAJOR 4 66 | #define REGEXKITLITE_VERSION_MINOR 0 67 | 68 | #define REGEXKITLITE_VERSION_CSTRING _RKL_VERSION_STRING(REGEXKITLITE_VERSION_MAJOR, REGEXKITLITE_VERSION_MINOR) 69 | #define REGEXKITLITE_VERSION_NSSTRING @REGEXKITLITE_VERSION_CSTRING 70 | 71 | #endif // REGEXKITLITE_VERSION_DEFINED 72 | 73 | #if !defined(RKL_BLOCKS) && defined(NS_BLOCKS_AVAILABLE) && (NS_BLOCKS_AVAILABLE == 1) 74 | #define RKL_BLOCKS 1 75 | #endif 76 | 77 | #if defined(RKL_BLOCKS) && (RKL_BLOCKS == 1) 78 | #define _RKL_BLOCKS_ENABLED 1 79 | #endif // defined(RKL_BLOCKS) && (RKL_BLOCKS == 1) 80 | 81 | #if defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__) 82 | #warning RegexKitLite support for Blocks is enabled, but __BLOCKS__ is not defined. This compiler may not support Blocks, in which case the behavior is undefined. This will probably cause numerous compiler errors. 83 | #endif // defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__) 84 | 85 | // For Mac OS X < 10.5. 86 | #ifndef NSINTEGER_DEFINED 87 | #define NSINTEGER_DEFINED 88 | #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 89 | typedef long NSInteger; 90 | typedef unsigned long NSUInteger; 91 | #define NSIntegerMin LONG_MIN 92 | #define NSIntegerMax LONG_MAX 93 | #define NSUIntegerMax ULONG_MAX 94 | #else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 95 | typedef int NSInteger; 96 | typedef unsigned int NSUInteger; 97 | #define NSIntegerMin INT_MIN 98 | #define NSIntegerMax INT_MAX 99 | #define NSUIntegerMax UINT_MAX 100 | #endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 101 | #endif // NSINTEGER_DEFINED 102 | 103 | #ifndef RKLREGEXOPTIONS_DEFINED 104 | #define RKLREGEXOPTIONS_DEFINED 105 | 106 | // These must be identical to their ICU regex counterparts. See http://www.icu-project.org/userguide/regexp.html 107 | enum { 108 | RKLNoOptions = 0, 109 | RKLCaseless = 2, 110 | RKLComments = 4, 111 | RKLDotAll = 32, 112 | RKLMultiline = 8, 113 | RKLUnicodeWordBoundaries = 256 114 | }; 115 | typedef uint32_t RKLRegexOptions; // This must be identical to the ICU 'flags' argument type. 116 | 117 | #endif // RKLREGEXOPTIONS_DEFINED 118 | 119 | #ifndef RKLREGEXENUMERATIONOPTIONS_DEFINED 120 | #define RKLREGEXENUMERATIONOPTIONS_DEFINED 121 | 122 | enum { 123 | RKLRegexEnumerationNoOptions = 0UL, 124 | RKLRegexEnumerationCapturedStringsNotRequired = 1UL << 9, 125 | RKLRegexEnumerationReleaseStringReturnedByReplacementBlock = 1UL << 10, 126 | RKLRegexEnumerationFastCapturedStringsXXX = 1UL << 11, 127 | }; 128 | typedef NSUInteger RKLRegexEnumerationOptions; 129 | 130 | #endif // RKLREGEXENUMERATIONOPTIONS_DEFINED 131 | 132 | #ifndef _REGEXKITLITE_H_ 133 | #define _REGEXKITLITE_H_ 134 | 135 | #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465) 136 | #define RKL_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) 137 | #else 138 | #define RKL_DEPRECATED_ATTRIBUTE 139 | #endif 140 | 141 | #if defined(NS_REQUIRES_NIL_TERMINATION) 142 | #define RKL_REQUIRES_NIL_TERMINATION NS_REQUIRES_NIL_TERMINATION 143 | #else // defined(NS_REQUIRES_NIL_TERMINATION) 144 | #define RKL_REQUIRES_NIL_TERMINATION 145 | #endif // defined(NS_REQUIRES_NIL_TERMINATION) 146 | 147 | // This requires a few levels of rewriting to get the desired results. 148 | #define _RKL_CONCAT_2(c,d) c ## d 149 | #define _RKL_CONCAT(a,b) _RKL_CONCAT_2(a,b) 150 | 151 | #ifdef RKL_PREPEND_TO_METHODS 152 | #define RKL_METHOD_PREPEND(x) _RKL_CONCAT(RKL_PREPEND_TO_METHODS, x) 153 | #else // RKL_PREPEND_TO_METHODS 154 | #define RKL_METHOD_PREPEND(x) x 155 | #endif // RKL_PREPEND_TO_METHODS 156 | 157 | // If it looks like low memory notifications might be available, add code to register and respond to them. 158 | // This is (should be) harmless if it turns out that this isn't the case, since the notification that we register for, 159 | // UIApplicationDidReceiveMemoryWarningNotification, is dynamically looked up via dlsym(). 160 | #if ((defined(TARGET_OS_EMBEDDED) && (TARGET_OS_EMBEDDED != 0)) || (defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE != 0))) && (!defined(RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS) || (RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS != 0)) 161 | #define RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS 1 162 | #endif 163 | 164 | #ifdef __OBJC__ 165 | 166 | // NSException exception name. 167 | extern NSString * const RKLICURegexException; 168 | 169 | // NSError error domains and user info keys. 170 | extern NSString * const RKLICURegexErrorDomain; 171 | 172 | extern NSString * const RKLICURegexEnumerationOptionsErrorKey; 173 | extern NSString * const RKLICURegexErrorCodeErrorKey; 174 | extern NSString * const RKLICURegexErrorNameErrorKey; 175 | extern NSString * const RKLICURegexLineErrorKey; 176 | extern NSString * const RKLICURegexOffsetErrorKey; 177 | extern NSString * const RKLICURegexPreContextErrorKey; 178 | extern NSString * const RKLICURegexPostContextErrorKey; 179 | extern NSString * const RKLICURegexRegexErrorKey; 180 | extern NSString * const RKLICURegexRegexOptionsErrorKey; 181 | extern NSString * const RKLICURegexReplacedCountErrorKey; 182 | extern NSString * const RKLICURegexReplacedStringErrorKey; 183 | extern NSString * const RKLICURegexReplacementStringErrorKey; 184 | extern NSString * const RKLICURegexSubjectRangeErrorKey; 185 | extern NSString * const RKLICURegexSubjectStringErrorKey; 186 | 187 | @interface NSString (RegexKitLiteAdditions) 188 | 189 | + (void)RKL_METHOD_PREPEND(clearStringCache); 190 | 191 | // Although these are marked as deprecated, a bug in GCC prevents a warning from being issues for + class methods. Filed bug with Apple, #6736857. 192 | + (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex RKL_DEPRECATED_ATTRIBUTE; 193 | + (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex options:(RKLRegexOptions)options error:(NSError **)error RKL_DEPRECATED_ATTRIBUTE; 194 | 195 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex; 196 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex range:(NSRange)range; 197 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 198 | 199 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex; 200 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex inRange:(NSRange)range; 201 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error; 202 | 203 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex; 204 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex capture:(NSInteger)capture; 205 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex inRange:(NSRange)range; 206 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 207 | 208 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex; 209 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex capture:(NSInteger)capture; 210 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex inRange:(NSRange)range; 211 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 212 | 213 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement; 214 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange; 215 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error; 216 | 217 | //// >= 3.0 218 | 219 | - (NSInteger)RKL_METHOD_PREPEND(captureCount); 220 | - (NSInteger)RKL_METHOD_PREPEND(captureCountWithOptions):(RKLRegexOptions)options error:(NSError **)error; 221 | 222 | - (BOOL)RKL_METHOD_PREPEND(isRegexValid); 223 | - (BOOL)RKL_METHOD_PREPEND(isRegexValidWithOptions):(RKLRegexOptions)options error:(NSError **)error; 224 | 225 | - (void)RKL_METHOD_PREPEND(flushCachedRegexData); 226 | 227 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex; 228 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex capture:(NSInteger)capture; 229 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 230 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 231 | 232 | 233 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex; 234 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 235 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 236 | 237 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex; 238 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 239 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 240 | 241 | //// >= 4.0 242 | 243 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 244 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 245 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 246 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList; 247 | 248 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count; 249 | 250 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 251 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 252 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 253 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList; 254 | 255 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count; 256 | 257 | #ifdef _RKL_BLOCKS_ENABLED 258 | 259 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 260 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 261 | 262 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 263 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 264 | 265 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 266 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 267 | 268 | #endif // _RKL_BLOCKS_ENABLED 269 | 270 | @end 271 | 272 | @interface NSMutableString (RegexKitLiteAdditions) 273 | 274 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement; 275 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange; 276 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error; 277 | 278 | //// >= 4.0 279 | 280 | #ifdef _RKL_BLOCKS_ENABLED 281 | 282 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 283 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 284 | 285 | #endif // _RKL_BLOCKS_ENABLED 286 | 287 | @end 288 | 289 | #endif // __OBJC__ 290 | 291 | #endif // _REGEXKITLITE_H_ 292 | 293 | #ifdef __cplusplus 294 | } // extern "C" 295 | #endif 296 | -------------------------------------------------------------------------------- /CocoaOSC.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0B4C46861460E8B9007B5E06 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C46851460E8B9007B5E06 /* Cocoa.framework */; }; 11 | 0B4C46901460E8B9007B5E06 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C468E1460E8B9007B5E06 /* InfoPlist.strings */; }; 12 | 0B4C46C81460EAAF007B5E06 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C46C71460EAAF007B5E06 /* UIKit.framework */; }; 13 | 0B4C46C91460EAAF007B5E06 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B5068C81460E41500BD27ED /* Foundation.framework */; }; 14 | 0B4C46CB1460EAAF007B5E06 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C46CA1460EAAF007B5E06 /* CoreGraphics.framework */; }; 15 | 0B4C46DB1460EB0A007B5E06 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C469B1460EA4B007B5E06 /* AppDelegate.m */; }; 16 | 0B4C46DD1460EB0A007B5E06 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C469F1460EA4B007B5E06 /* main.m */; }; 17 | 0B4C46DE1460EB0A007B5E06 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C46A01460EA4B007B5E06 /* MainWindow.xib */; }; 18 | 0B4C46DF1460EB85007B5E06 /* libCocoaOSC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B5068C51460E41500BD27ED /* libCocoaOSC.a */; }; 19 | 0B4C46E61460EC07007B5E06 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C46851460E8B9007B5E06 /* Cocoa.framework */; }; 20 | 0B4C46FC1460EC29007B5E06 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C46AB1460EA4B007B5E06 /* MainMenu.xib */; }; 21 | 0B4C46FD1460EC29007B5E06 /* MyDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C46AD1460EA4B007B5E06 /* MyDocument.xib */; }; 22 | 0B4C46FE1460EC29007B5E06 /* PacketView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C46AF1460EA4B007B5E06 /* PacketView.xib */; }; 23 | 0B4C46FF1460EC39007B5E06 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C46B11460EA4B007B5E06 /* main.m */; }; 24 | 0B4C47001460EC39007B5E06 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C46B31460EA4B007B5E06 /* MyDocument.m */; }; 25 | 0B4C47011460EC39007B5E06 /* MyDocumentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C46B51460EA4B007B5E06 /* MyDocumentModel.m */; }; 26 | 0B4C47021460EC39007B5E06 /* MyMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C46B71460EA4B007B5E06 /* MyMethod.m */; }; 27 | 0B4C47031460EC39007B5E06 /* PacketViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4C46B91460EA4B007B5E06 /* PacketViewController.m */; }; 28 | 0B4C470A1460ED2E007B5E06 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C46A71460EA4B007B5E06 /* Credits.rtf */; }; 29 | 0B4C470B1460ED39007B5E06 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0B4C46A91460EA4B007B5E06 /* InfoPlist.strings */; }; 30 | 0B4C470C1460F49A007B5E06 /* CocoaOSC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C46841460E8B9007B5E06 /* CocoaOSC.framework */; }; 31 | 0B4C470D1460F4B8007B5E06 /* CocoaOSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068D51460E46500BD27ED /* CocoaOSC.h */; }; 32 | 0B4C470F1460F4B8007B5E06 /* NS+OSCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068D71460E46500BD27ED /* NS+OSCAdditions.m */; }; 33 | 0B4C47101460F4B8007B5E06 /* OSCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068D81460E46500BD27ED /* OSCConnection.h */; }; 34 | 0B4C47111460F4B8007B5E06 /* OSCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068D91460E46500BD27ED /* OSCConnection.m */; }; 35 | 0B4C47121460F4B8007B5E06 /* OSCConnectionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068DA1460E46500BD27ED /* OSCConnectionDelegate.h */; }; 36 | 0B4C47131460F4B8007B5E06 /* OSCDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068DB1460E46500BD27ED /* OSCDispatcher.h */; }; 37 | 0B4C47141460F4B8007B5E06 /* OSCDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068DC1460E46500BD27ED /* OSCDispatcher.m */; }; 38 | 0B4C47151460F4B8007B5E06 /* OSCPacket.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068DD1460E46500BD27ED /* OSCPacket.h */; }; 39 | 0B4C47161460F4B8007B5E06 /* OSCPacket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068DE1460E46500BD27ED /* OSCPacket.m */; }; 40 | 0B4C471B1460F565007B5E06 /* RegexKitLite.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B50691D1460E4BC00BD27ED /* RegexKitLite.h */; }; 41 | 0B4C471C1460F565007B5E06 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B50691F1460E4BC00BD27ED /* RegexKitLite.m */; }; 42 | 0B4C47231460FBA3007B5E06 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C471F1460FB6F007B5E06 /* libicucore.dylib */; }; 43 | 0B4C47241460FBA8007B5E06 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C47211460FB76007B5E06 /* CFNetwork.framework */; }; 44 | 0B4C47FB146104F8007B5E06 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B4C47FA146104F8007B5E06 /* libicucore.dylib */; }; 45 | 0B4C47FD146105B6007B5E06 /* CocoaOSC.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0B4C46841460E8B9007B5E06 /* CocoaOSC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 46 | 0B5068C91460E41500BD27ED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B5068C81460E41500BD27ED /* Foundation.framework */; }; 47 | 0B5068DF1460E46500BD27ED /* CocoaOSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068D51460E46500BD27ED /* CocoaOSC.h */; }; 48 | 0B5068E01460E46500BD27ED /* NS+OSCAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068D61460E46500BD27ED /* NS+OSCAdditions.h */; }; 49 | 0B5068E11460E46500BD27ED /* NS+OSCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068D71460E46500BD27ED /* NS+OSCAdditions.m */; }; 50 | 0B5068E21460E46500BD27ED /* OSCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068D81460E46500BD27ED /* OSCConnection.h */; }; 51 | 0B5068E31460E46500BD27ED /* OSCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068D91460E46500BD27ED /* OSCConnection.m */; }; 52 | 0B5068E41460E46500BD27ED /* OSCConnectionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068DA1460E46500BD27ED /* OSCConnectionDelegate.h */; }; 53 | 0B5068E51460E46500BD27ED /* OSCDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068DB1460E46500BD27ED /* OSCDispatcher.h */; }; 54 | 0B5068E61460E46500BD27ED /* OSCDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068DC1460E46500BD27ED /* OSCDispatcher.m */; }; 55 | 0B5068E71460E46500BD27ED /* OSCPacket.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B5068DD1460E46500BD27ED /* OSCPacket.h */; }; 56 | 0B5068E81460E46500BD27ED /* OSCPacket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B5068DE1460E46500BD27ED /* OSCPacket.m */; }; 57 | 0B50693E1460E4BC00BD27ED /* RegexKitLite.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B50691D1460E4BC00BD27ED /* RegexKitLite.h */; }; 58 | 0B50693F1460E4BC00BD27ED /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B50691F1460E4BC00BD27ED /* RegexKitLite.m */; }; 59 | 0BFFAAD215F42EC50051E00F /* AsyncSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BFFAACE15F42EC50051E00F /* AsyncSocket.h */; }; 60 | 0BFFAAD315F42EC50051E00F /* AsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BFFAACF15F42EC50051E00F /* AsyncSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 61 | 0BFFAAD415F42EC50051E00F /* AsyncUdpSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BFFAAD015F42EC50051E00F /* AsyncUdpSocket.h */; }; 62 | 0BFFAAD515F42EC50051E00F /* AsyncUdpSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BFFAAD115F42EC50051E00F /* AsyncUdpSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 63 | 0BFFAAD615F42EEE0051E00F /* AsyncSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BFFAACE15F42EC50051E00F /* AsyncSocket.h */; }; 64 | 0BFFAAD715F42EF20051E00F /* AsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BFFAACF15F42EC50051E00F /* AsyncSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 65 | 0BFFAAD815F42EF40051E00F /* AsyncUdpSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BFFAAD015F42EC50051E00F /* AsyncUdpSocket.h */; }; 66 | 0BFFAAD915F42EF70051E00F /* AsyncUdpSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BFFAAD115F42EC50051E00F /* AsyncUdpSocket.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 67 | /* End PBXBuildFile section */ 68 | 69 | /* Begin PBXContainerItemProxy section */ 70 | 0B4C47051460ECC4007B5E06 /* PBXContainerItemProxy */ = { 71 | isa = PBXContainerItemProxy; 72 | containerPortal = 0B5068BC1460E41500BD27ED /* Project object */; 73 | proxyType = 1; 74 | remoteGlobalIDString = 0B4C46831460E8B9007B5E06; 75 | remoteInfo = "CocoaOSC-mac"; 76 | }; 77 | 0B4C47071460ECC7007B5E06 /* PBXContainerItemProxy */ = { 78 | isa = PBXContainerItemProxy; 79 | containerPortal = 0B5068BC1460E41500BD27ED /* Project object */; 80 | proxyType = 1; 81 | remoteGlobalIDString = 0B5068C41460E41500BD27ED; 82 | remoteInfo = "CocoaOSC-ios"; 83 | }; 84 | /* End PBXContainerItemProxy section */ 85 | 86 | /* Begin PBXCopyFilesBuildPhase section */ 87 | 0B4C47FC146105A7007B5E06 /* CopyFiles */ = { 88 | isa = PBXCopyFilesBuildPhase; 89 | buildActionMask = 2147483647; 90 | dstPath = ""; 91 | dstSubfolderSpec = 10; 92 | files = ( 93 | 0B4C47FD146105B6007B5E06 /* CocoaOSC.framework in CopyFiles */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | /* End PBXCopyFilesBuildPhase section */ 98 | 99 | /* Begin PBXFileReference section */ 100 | 0B4C46841460E8B9007B5E06 /* CocoaOSC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CocoaOSC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 101 | 0B4C46851460E8B9007B5E06 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; 102 | 0B4C46881460E8B9007B5E06 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 103 | 0B4C46891460E8B9007B5E06 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 104 | 0B4C468A1460E8B9007B5E06 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 105 | 0B4C468D1460E8B9007B5E06 /* CocoaOSC-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CocoaOSC-Info.plist"; sourceTree = ""; }; 106 | 0B4C468F1460E8B9007B5E06 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 107 | 0B4C469A1460EA4B007B5E06 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 108 | 0B4C469B1460EA4B007B5E06 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 109 | 0B4C469E1460EA4B007B5E06 /* CocoaOSCDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CocoaOSCDemo-Info.plist"; sourceTree = ""; }; 110 | 0B4C469F1460EA4B007B5E06 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 111 | 0B4C46A01460EA4B007B5E06 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 112 | 0B4C46A51460EA4B007B5E06 /* CocoaOSC_Mac_Demo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CocoaOSC_Mac_Demo-Info.plist"; sourceTree = ""; }; 113 | 0B4C46A61460EA4B007B5E06 /* CocoaOSC_Mac_Demo_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CocoaOSC_Mac_Demo_Prefix.pch; sourceTree = ""; }; 114 | 0B4C46A81460EA4B007B5E06 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; 115 | 0B4C46AA1460EA4B007B5E06 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 116 | 0B4C46AC1460EA4B007B5E06 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; 117 | 0B4C46AE1460EA4B007B5E06 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MyDocument.xib; sourceTree = ""; }; 118 | 0B4C46B01460EA4B007B5E06 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PacketView.xib; sourceTree = ""; }; 119 | 0B4C46B11460EA4B007B5E06 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 120 | 0B4C46B21460EA4B007B5E06 /* MyDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDocument.h; sourceTree = ""; }; 121 | 0B4C46B31460EA4B007B5E06 /* MyDocument.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = ""; }; 122 | 0B4C46B41460EA4B007B5E06 /* MyDocumentModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDocumentModel.h; sourceTree = ""; }; 123 | 0B4C46B51460EA4B007B5E06 /* MyDocumentModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDocumentModel.m; sourceTree = ""; }; 124 | 0B4C46B61460EA4B007B5E06 /* MyMethod.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyMethod.h; sourceTree = ""; }; 125 | 0B4C46B71460EA4B007B5E06 /* MyMethod.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyMethod.m; sourceTree = ""; }; 126 | 0B4C46B81460EA4B007B5E06 /* PacketViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PacketViewController.h; sourceTree = ""; }; 127 | 0B4C46B91460EA4B007B5E06 /* PacketViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PacketViewController.m; sourceTree = ""; }; 128 | 0B4C46C51460EAAF007B5E06 /* CocoaOSCios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoaOSCios.app; sourceTree = BUILT_PRODUCTS_DIR; }; 129 | 0B4C46C71460EAAF007B5E06 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 130 | 0B4C46CA1460EAAF007B5E06 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 131 | 0B4C46E41460EC07007B5E06 /* CocoaOSCmac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoaOSCmac.app; sourceTree = BUILT_PRODUCTS_DIR; }; 132 | 0B4C471F1460FB6F007B5E06 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; 133 | 0B4C47211460FB76007B5E06 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 134 | 0B4C47FA146104F8007B5E06 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = SDKs/MacOSX10.7.sdk/usr/lib/libicucore.dylib; sourceTree = DEVELOPER_DIR; }; 135 | 0B5068C51460E41500BD27ED /* libCocoaOSC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCocoaOSC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 136 | 0B5068C81460E41500BD27ED /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 137 | 0B5068CC1460E41500BD27ED /* CocoaOSC-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CocoaOSC-Prefix.pch"; sourceTree = ""; }; 138 | 0B5068D51460E46500BD27ED /* CocoaOSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoaOSC.h; sourceTree = ""; }; 139 | 0B5068D61460E46500BD27ED /* NS+OSCAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NS+OSCAdditions.h"; sourceTree = ""; }; 140 | 0B5068D71460E46500BD27ED /* NS+OSCAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NS+OSCAdditions.m"; sourceTree = ""; }; 141 | 0B5068D81460E46500BD27ED /* OSCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSCConnection.h; sourceTree = ""; }; 142 | 0B5068D91460E46500BD27ED /* OSCConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSCConnection.m; sourceTree = ""; }; 143 | 0B5068DA1460E46500BD27ED /* OSCConnectionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSCConnectionDelegate.h; sourceTree = ""; }; 144 | 0B5068DB1460E46500BD27ED /* OSCDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSCDispatcher.h; sourceTree = ""; }; 145 | 0B5068DC1460E46500BD27ED /* OSCDispatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSCDispatcher.m; sourceTree = ""; }; 146 | 0B5068DD1460E46500BD27ED /* OSCPacket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSCPacket.h; sourceTree = ""; }; 147 | 0B5068DE1460E46500BD27ED /* OSCPacket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSCPacket.m; sourceTree = ""; }; 148 | 0B50691C1460E4BC00BD27ED /* License.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = License.rtf; sourceTree = ""; }; 149 | 0B50691D1460E4BC00BD27ED /* RegexKitLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegexKitLite.h; sourceTree = ""; }; 150 | 0B50691E1460E4BC00BD27ED /* RegexKitLite.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = RegexKitLite.html; sourceTree = ""; }; 151 | 0B50691F1460E4BC00BD27ED /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = ""; }; 152 | 0BFFAACE15F42EC50051E00F /* AsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsyncSocket.h; path = CocoaAsyncSocket/RunLoop/AsyncSocket.h; sourceTree = ""; }; 153 | 0BFFAACF15F42EC50051E00F /* AsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AsyncSocket.m; path = CocoaAsyncSocket/RunLoop/AsyncSocket.m; sourceTree = ""; }; 154 | 0BFFAAD015F42EC50051E00F /* AsyncUdpSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsyncUdpSocket.h; path = CocoaAsyncSocket/RunLoop/AsyncUdpSocket.h; sourceTree = ""; }; 155 | 0BFFAAD115F42EC50051E00F /* AsyncUdpSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AsyncUdpSocket.m; path = CocoaAsyncSocket/RunLoop/AsyncUdpSocket.m; sourceTree = ""; }; 156 | /* End PBXFileReference section */ 157 | 158 | /* Begin PBXFrameworksBuildPhase section */ 159 | 0B4C46801460E8B9007B5E06 /* Frameworks */ = { 160 | isa = PBXFrameworksBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | 0B4C47FB146104F8007B5E06 /* libicucore.dylib in Frameworks */, 164 | 0B4C46861460E8B9007B5E06 /* Cocoa.framework in Frameworks */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | 0B4C46C21460EAAF007B5E06 /* Frameworks */ = { 169 | isa = PBXFrameworksBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | 0B4C47241460FBA8007B5E06 /* CFNetwork.framework in Frameworks */, 173 | 0B4C47231460FBA3007B5E06 /* libicucore.dylib in Frameworks */, 174 | 0B4C46C81460EAAF007B5E06 /* UIKit.framework in Frameworks */, 175 | 0B4C46C91460EAAF007B5E06 /* Foundation.framework in Frameworks */, 176 | 0B4C46CB1460EAAF007B5E06 /* CoreGraphics.framework in Frameworks */, 177 | 0B4C46DF1460EB85007B5E06 /* libCocoaOSC.a in Frameworks */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | 0B4C46E11460EC07007B5E06 /* Frameworks */ = { 182 | isa = PBXFrameworksBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 0B4C470C1460F49A007B5E06 /* CocoaOSC.framework in Frameworks */, 186 | 0B4C46E61460EC07007B5E06 /* Cocoa.framework in Frameworks */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | 0B5068C21460E41500BD27ED /* Frameworks */ = { 191 | isa = PBXFrameworksBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 0B5068C91460E41500BD27ED /* Foundation.framework in Frameworks */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXFrameworksBuildPhase section */ 199 | 200 | /* Begin PBXGroup section */ 201 | 0B4C46871460E8B9007B5E06 /* Other Frameworks */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 0B4C46881460E8B9007B5E06 /* AppKit.framework */, 205 | 0B4C46891460E8B9007B5E06 /* CoreData.framework */, 206 | 0B4C468A1460E8B9007B5E06 /* Foundation.framework */, 207 | ); 208 | name = "Other Frameworks"; 209 | sourceTree = ""; 210 | }; 211 | 0B4C468C1460E8B9007B5E06 /* Mac Supporting Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 0B4C468D1460E8B9007B5E06 /* CocoaOSC-Info.plist */, 215 | 0B4C468E1460E8B9007B5E06 /* InfoPlist.strings */, 216 | ); 217 | name = "Mac Supporting Files"; 218 | sourceTree = ""; 219 | }; 220 | 0B4C46991460EA4B007B5E06 /* Demo-ios */ = { 221 | isa = PBXGroup; 222 | children = ( 223 | 0B4C469A1460EA4B007B5E06 /* AppDelegate.h */, 224 | 0B4C469B1460EA4B007B5E06 /* AppDelegate.m */, 225 | 0B4C469E1460EA4B007B5E06 /* CocoaOSCDemo-Info.plist */, 226 | 0B4C469F1460EA4B007B5E06 /* main.m */, 227 | 0B4C46A01460EA4B007B5E06 /* MainWindow.xib */, 228 | ); 229 | path = "Demo-ios"; 230 | sourceTree = ""; 231 | }; 232 | 0B4C46A11460EA4B007B5E06 /* Demo-mac */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 0B4C46A51460EA4B007B5E06 /* CocoaOSC_Mac_Demo-Info.plist */, 236 | 0B4C46A61460EA4B007B5E06 /* CocoaOSC_Mac_Demo_Prefix.pch */, 237 | 0B4C46A71460EA4B007B5E06 /* Credits.rtf */, 238 | 0B4C46A91460EA4B007B5E06 /* InfoPlist.strings */, 239 | 0B4C46AB1460EA4B007B5E06 /* MainMenu.xib */, 240 | 0B4C46AD1460EA4B007B5E06 /* MyDocument.xib */, 241 | 0B4C46AF1460EA4B007B5E06 /* PacketView.xib */, 242 | 0B4C46B11460EA4B007B5E06 /* main.m */, 243 | 0B4C46B21460EA4B007B5E06 /* MyDocument.h */, 244 | 0B4C46B31460EA4B007B5E06 /* MyDocument.m */, 245 | 0B4C46B41460EA4B007B5E06 /* MyDocumentModel.h */, 246 | 0B4C46B51460EA4B007B5E06 /* MyDocumentModel.m */, 247 | 0B4C46B61460EA4B007B5E06 /* MyMethod.h */, 248 | 0B4C46B71460EA4B007B5E06 /* MyMethod.m */, 249 | 0B4C46B81460EA4B007B5E06 /* PacketViewController.h */, 250 | 0B4C46B91460EA4B007B5E06 /* PacketViewController.m */, 251 | ); 252 | path = "Demo-mac"; 253 | sourceTree = ""; 254 | }; 255 | 0B5068BA1460E41500BD27ED = { 256 | isa = PBXGroup; 257 | children = ( 258 | 0B5068CA1460E41500BD27ED /* CocoaOSC */, 259 | 0B4C46991460EA4B007B5E06 /* Demo-ios */, 260 | 0B4C46A11460EA4B007B5E06 /* Demo-mac */, 261 | 0B5068E91460E4BC00BD27ED /* lib */, 262 | 0B5068C71460E41500BD27ED /* Frameworks */, 263 | 0B5068C61460E41500BD27ED /* Products */, 264 | ); 265 | sourceTree = ""; 266 | }; 267 | 0B5068C61460E41500BD27ED /* Products */ = { 268 | isa = PBXGroup; 269 | children = ( 270 | 0B5068C51460E41500BD27ED /* libCocoaOSC.a */, 271 | 0B4C46841460E8B9007B5E06 /* CocoaOSC.framework */, 272 | 0B4C46C51460EAAF007B5E06 /* CocoaOSCios.app */, 273 | 0B4C46E41460EC07007B5E06 /* CocoaOSCmac.app */, 274 | ); 275 | name = Products; 276 | sourceTree = ""; 277 | }; 278 | 0B5068C71460E41500BD27ED /* Frameworks */ = { 279 | isa = PBXGroup; 280 | children = ( 281 | 0B4C47FA146104F8007B5E06 /* libicucore.dylib */, 282 | 0B4C47211460FB76007B5E06 /* CFNetwork.framework */, 283 | 0B4C471F1460FB6F007B5E06 /* libicucore.dylib */, 284 | 0B5068C81460E41500BD27ED /* Foundation.framework */, 285 | 0B4C46851460E8B9007B5E06 /* Cocoa.framework */, 286 | 0B4C46C71460EAAF007B5E06 /* UIKit.framework */, 287 | 0B4C46CA1460EAAF007B5E06 /* CoreGraphics.framework */, 288 | 0B4C46871460E8B9007B5E06 /* Other Frameworks */, 289 | ); 290 | name = Frameworks; 291 | sourceTree = ""; 292 | }; 293 | 0B5068CA1460E41500BD27ED /* CocoaOSC */ = { 294 | isa = PBXGroup; 295 | children = ( 296 | 0B5068D51460E46500BD27ED /* CocoaOSC.h */, 297 | 0B5068D61460E46500BD27ED /* NS+OSCAdditions.h */, 298 | 0B5068D71460E46500BD27ED /* NS+OSCAdditions.m */, 299 | 0B5068D81460E46500BD27ED /* OSCConnection.h */, 300 | 0B5068D91460E46500BD27ED /* OSCConnection.m */, 301 | 0B5068DA1460E46500BD27ED /* OSCConnectionDelegate.h */, 302 | 0B5068DB1460E46500BD27ED /* OSCDispatcher.h */, 303 | 0B5068DC1460E46500BD27ED /* OSCDispatcher.m */, 304 | 0B5068DD1460E46500BD27ED /* OSCPacket.h */, 305 | 0B5068DE1460E46500BD27ED /* OSCPacket.m */, 306 | 0B5068CB1460E41500BD27ED /* Supporting Files */, 307 | 0B4C468C1460E8B9007B5E06 /* Mac Supporting Files */, 308 | ); 309 | path = CocoaOSC; 310 | sourceTree = ""; 311 | }; 312 | 0B5068CB1460E41500BD27ED /* Supporting Files */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | 0B5068CC1460E41500BD27ED /* CocoaOSC-Prefix.pch */, 316 | ); 317 | name = "Supporting Files"; 318 | sourceTree = ""; 319 | }; 320 | 0B5068E91460E4BC00BD27ED /* lib */ = { 321 | isa = PBXGroup; 322 | children = ( 323 | 0BFFAACD15F42EB70051E00F /* CocoaAsyncSocket */, 324 | 0B5069111460E4BC00BD27ED /* RegexKitLite */, 325 | ); 326 | path = lib; 327 | sourceTree = ""; 328 | }; 329 | 0B5069111460E4BC00BD27ED /* RegexKitLite */ = { 330 | isa = PBXGroup; 331 | children = ( 332 | 0B50691C1460E4BC00BD27ED /* License.rtf */, 333 | 0B50691D1460E4BC00BD27ED /* RegexKitLite.h */, 334 | 0B50691E1460E4BC00BD27ED /* RegexKitLite.html */, 335 | 0B50691F1460E4BC00BD27ED /* RegexKitLite.m */, 336 | ); 337 | path = RegexKitLite; 338 | sourceTree = ""; 339 | }; 340 | 0BFFAACD15F42EB70051E00F /* CocoaAsyncSocket */ = { 341 | isa = PBXGroup; 342 | children = ( 343 | 0BFFAACE15F42EC50051E00F /* AsyncSocket.h */, 344 | 0BFFAACF15F42EC50051E00F /* AsyncSocket.m */, 345 | 0BFFAAD015F42EC50051E00F /* AsyncUdpSocket.h */, 346 | 0BFFAAD115F42EC50051E00F /* AsyncUdpSocket.m */, 347 | ); 348 | name = CocoaAsyncSocket; 349 | sourceTree = ""; 350 | }; 351 | /* End PBXGroup section */ 352 | 353 | /* Begin PBXHeadersBuildPhase section */ 354 | 0B4C46811460E8B9007B5E06 /* Headers */ = { 355 | isa = PBXHeadersBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | 0B4C470D1460F4B8007B5E06 /* CocoaOSC.h in Headers */, 359 | 0B4C47101460F4B8007B5E06 /* OSCConnection.h in Headers */, 360 | 0B4C47121460F4B8007B5E06 /* OSCConnectionDelegate.h in Headers */, 361 | 0B4C47131460F4B8007B5E06 /* OSCDispatcher.h in Headers */, 362 | 0B4C47151460F4B8007B5E06 /* OSCPacket.h in Headers */, 363 | 0B4C471B1460F565007B5E06 /* RegexKitLite.h in Headers */, 364 | 0BFFAAD615F42EEE0051E00F /* AsyncSocket.h in Headers */, 365 | 0BFFAAD815F42EF40051E00F /* AsyncUdpSocket.h in Headers */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | 0B5068C31460E41500BD27ED /* Headers */ = { 370 | isa = PBXHeadersBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 0B5068DF1460E46500BD27ED /* CocoaOSC.h in Headers */, 374 | 0B5068E01460E46500BD27ED /* NS+OSCAdditions.h in Headers */, 375 | 0B5068E21460E46500BD27ED /* OSCConnection.h in Headers */, 376 | 0B5068E41460E46500BD27ED /* OSCConnectionDelegate.h in Headers */, 377 | 0B5068E51460E46500BD27ED /* OSCDispatcher.h in Headers */, 378 | 0B5068E71460E46500BD27ED /* OSCPacket.h in Headers */, 379 | 0B50693E1460E4BC00BD27ED /* RegexKitLite.h in Headers */, 380 | 0BFFAAD215F42EC50051E00F /* AsyncSocket.h in Headers */, 381 | 0BFFAAD415F42EC50051E00F /* AsyncUdpSocket.h in Headers */, 382 | ); 383 | runOnlyForDeploymentPostprocessing = 0; 384 | }; 385 | /* End PBXHeadersBuildPhase section */ 386 | 387 | /* Begin PBXNativeTarget section */ 388 | 0B4C46831460E8B9007B5E06 /* CocoaOSC-mac */ = { 389 | isa = PBXNativeTarget; 390 | buildConfigurationList = 0B4C46951460E8B9007B5E06 /* Build configuration list for PBXNativeTarget "CocoaOSC-mac" */; 391 | buildPhases = ( 392 | 0B4C467F1460E8B9007B5E06 /* Sources */, 393 | 0B4C46801460E8B9007B5E06 /* Frameworks */, 394 | 0B4C46811460E8B9007B5E06 /* Headers */, 395 | 0B4C46821460E8B9007B5E06 /* Resources */, 396 | ); 397 | buildRules = ( 398 | ); 399 | dependencies = ( 400 | ); 401 | name = "CocoaOSC-mac"; 402 | productName = CocoaOSC; 403 | productReference = 0B4C46841460E8B9007B5E06 /* CocoaOSC.framework */; 404 | productType = "com.apple.product-type.framework"; 405 | }; 406 | 0B4C46C41460EAAF007B5E06 /* CocoaOSCDemo-ios */ = { 407 | isa = PBXNativeTarget; 408 | buildConfigurationList = 0B4C46D81460EAAF007B5E06 /* Build configuration list for PBXNativeTarget "CocoaOSCDemo-ios" */; 409 | buildPhases = ( 410 | 0B4C46C11460EAAF007B5E06 /* Sources */, 411 | 0B4C46C21460EAAF007B5E06 /* Frameworks */, 412 | 0B4C46C31460EAAF007B5E06 /* Resources */, 413 | ); 414 | buildRules = ( 415 | ); 416 | dependencies = ( 417 | 0B4C47081460ECC7007B5E06 /* PBXTargetDependency */, 418 | ); 419 | name = "CocoaOSCDemo-ios"; 420 | productName = CocoaOSCDemo; 421 | productReference = 0B4C46C51460EAAF007B5E06 /* CocoaOSCios.app */; 422 | productType = "com.apple.product-type.application"; 423 | }; 424 | 0B4C46E31460EC07007B5E06 /* CocoaOSCDemo-mac */ = { 425 | isa = PBXNativeTarget; 426 | buildConfigurationList = 0B4C46F91460EC07007B5E06 /* Build configuration list for PBXNativeTarget "CocoaOSCDemo-mac" */; 427 | buildPhases = ( 428 | 0B4C46E01460EC07007B5E06 /* Sources */, 429 | 0B4C46E11460EC07007B5E06 /* Frameworks */, 430 | 0B4C46E21460EC07007B5E06 /* Resources */, 431 | 0B4C47FC146105A7007B5E06 /* CopyFiles */, 432 | ); 433 | buildRules = ( 434 | ); 435 | dependencies = ( 436 | 0B4C47061460ECC4007B5E06 /* PBXTargetDependency */, 437 | ); 438 | name = "CocoaOSCDemo-mac"; 439 | productName = "CocoaOSCDemo-mac"; 440 | productReference = 0B4C46E41460EC07007B5E06 /* CocoaOSCmac.app */; 441 | productType = "com.apple.product-type.application"; 442 | }; 443 | 0B5068C41460E41500BD27ED /* CocoaOSC-ios */ = { 444 | isa = PBXNativeTarget; 445 | buildConfigurationList = 0B5068D21460E41500BD27ED /* Build configuration list for PBXNativeTarget "CocoaOSC-ios" */; 446 | buildPhases = ( 447 | 0B5068C11460E41500BD27ED /* Sources */, 448 | 0B5068C21460E41500BD27ED /* Frameworks */, 449 | 0B5068C31460E41500BD27ED /* Headers */, 450 | ); 451 | buildRules = ( 452 | ); 453 | dependencies = ( 454 | ); 455 | name = "CocoaOSC-ios"; 456 | productName = CocoaOSC; 457 | productReference = 0B5068C51460E41500BD27ED /* libCocoaOSC.a */; 458 | productType = "com.apple.product-type.library.static"; 459 | }; 460 | /* End PBXNativeTarget section */ 461 | 462 | /* Begin PBXProject section */ 463 | 0B5068BC1460E41500BD27ED /* Project object */ = { 464 | isa = PBXProject; 465 | attributes = { 466 | LastUpgradeCheck = 0730; 467 | }; 468 | buildConfigurationList = 0B5068BF1460E41500BD27ED /* Build configuration list for PBXProject "CocoaOSC" */; 469 | compatibilityVersion = "Xcode 3.2"; 470 | developmentRegion = English; 471 | hasScannedForEncodings = 0; 472 | knownRegions = ( 473 | en, 474 | English, 475 | ); 476 | mainGroup = 0B5068BA1460E41500BD27ED; 477 | productRefGroup = 0B5068C61460E41500BD27ED /* Products */; 478 | projectDirPath = ""; 479 | projectRoot = ""; 480 | targets = ( 481 | 0B5068C41460E41500BD27ED /* CocoaOSC-ios */, 482 | 0B4C46831460E8B9007B5E06 /* CocoaOSC-mac */, 483 | 0B4C46C41460EAAF007B5E06 /* CocoaOSCDemo-ios */, 484 | 0B4C46E31460EC07007B5E06 /* CocoaOSCDemo-mac */, 485 | ); 486 | }; 487 | /* End PBXProject section */ 488 | 489 | /* Begin PBXResourcesBuildPhase section */ 490 | 0B4C46821460E8B9007B5E06 /* Resources */ = { 491 | isa = PBXResourcesBuildPhase; 492 | buildActionMask = 2147483647; 493 | files = ( 494 | 0B4C46901460E8B9007B5E06 /* InfoPlist.strings in Resources */, 495 | ); 496 | runOnlyForDeploymentPostprocessing = 0; 497 | }; 498 | 0B4C46C31460EAAF007B5E06 /* Resources */ = { 499 | isa = PBXResourcesBuildPhase; 500 | buildActionMask = 2147483647; 501 | files = ( 502 | 0B4C46DE1460EB0A007B5E06 /* MainWindow.xib in Resources */, 503 | ); 504 | runOnlyForDeploymentPostprocessing = 0; 505 | }; 506 | 0B4C46E21460EC07007B5E06 /* Resources */ = { 507 | isa = PBXResourcesBuildPhase; 508 | buildActionMask = 2147483647; 509 | files = ( 510 | 0B4C46FC1460EC29007B5E06 /* MainMenu.xib in Resources */, 511 | 0B4C46FD1460EC29007B5E06 /* MyDocument.xib in Resources */, 512 | 0B4C46FE1460EC29007B5E06 /* PacketView.xib in Resources */, 513 | 0B4C470A1460ED2E007B5E06 /* Credits.rtf in Resources */, 514 | 0B4C470B1460ED39007B5E06 /* InfoPlist.strings in Resources */, 515 | ); 516 | runOnlyForDeploymentPostprocessing = 0; 517 | }; 518 | /* End PBXResourcesBuildPhase section */ 519 | 520 | /* Begin PBXSourcesBuildPhase section */ 521 | 0B4C467F1460E8B9007B5E06 /* Sources */ = { 522 | isa = PBXSourcesBuildPhase; 523 | buildActionMask = 2147483647; 524 | files = ( 525 | 0B4C470F1460F4B8007B5E06 /* NS+OSCAdditions.m in Sources */, 526 | 0B4C47111460F4B8007B5E06 /* OSCConnection.m in Sources */, 527 | 0B4C47141460F4B8007B5E06 /* OSCDispatcher.m in Sources */, 528 | 0B4C47161460F4B8007B5E06 /* OSCPacket.m in Sources */, 529 | 0B4C471C1460F565007B5E06 /* RegexKitLite.m in Sources */, 530 | 0BFFAAD715F42EF20051E00F /* AsyncSocket.m in Sources */, 531 | 0BFFAAD915F42EF70051E00F /* AsyncUdpSocket.m in Sources */, 532 | ); 533 | runOnlyForDeploymentPostprocessing = 0; 534 | }; 535 | 0B4C46C11460EAAF007B5E06 /* Sources */ = { 536 | isa = PBXSourcesBuildPhase; 537 | buildActionMask = 2147483647; 538 | files = ( 539 | 0B4C46DB1460EB0A007B5E06 /* AppDelegate.m in Sources */, 540 | 0B4C46DD1460EB0A007B5E06 /* main.m in Sources */, 541 | ); 542 | runOnlyForDeploymentPostprocessing = 0; 543 | }; 544 | 0B4C46E01460EC07007B5E06 /* Sources */ = { 545 | isa = PBXSourcesBuildPhase; 546 | buildActionMask = 2147483647; 547 | files = ( 548 | 0B4C46FF1460EC39007B5E06 /* main.m in Sources */, 549 | 0B4C47001460EC39007B5E06 /* MyDocument.m in Sources */, 550 | 0B4C47011460EC39007B5E06 /* MyDocumentModel.m in Sources */, 551 | 0B4C47021460EC39007B5E06 /* MyMethod.m in Sources */, 552 | 0B4C47031460EC39007B5E06 /* PacketViewController.m in Sources */, 553 | ); 554 | runOnlyForDeploymentPostprocessing = 0; 555 | }; 556 | 0B5068C11460E41500BD27ED /* Sources */ = { 557 | isa = PBXSourcesBuildPhase; 558 | buildActionMask = 2147483647; 559 | files = ( 560 | 0B5068E11460E46500BD27ED /* NS+OSCAdditions.m in Sources */, 561 | 0B5068E31460E46500BD27ED /* OSCConnection.m in Sources */, 562 | 0B5068E61460E46500BD27ED /* OSCDispatcher.m in Sources */, 563 | 0B5068E81460E46500BD27ED /* OSCPacket.m in Sources */, 564 | 0B50693F1460E4BC00BD27ED /* RegexKitLite.m in Sources */, 565 | 0BFFAAD315F42EC50051E00F /* AsyncSocket.m in Sources */, 566 | 0BFFAAD515F42EC50051E00F /* AsyncUdpSocket.m in Sources */, 567 | ); 568 | runOnlyForDeploymentPostprocessing = 0; 569 | }; 570 | /* End PBXSourcesBuildPhase section */ 571 | 572 | /* Begin PBXTargetDependency section */ 573 | 0B4C47061460ECC4007B5E06 /* PBXTargetDependency */ = { 574 | isa = PBXTargetDependency; 575 | target = 0B4C46831460E8B9007B5E06 /* CocoaOSC-mac */; 576 | targetProxy = 0B4C47051460ECC4007B5E06 /* PBXContainerItemProxy */; 577 | }; 578 | 0B4C47081460ECC7007B5E06 /* PBXTargetDependency */ = { 579 | isa = PBXTargetDependency; 580 | target = 0B5068C41460E41500BD27ED /* CocoaOSC-ios */; 581 | targetProxy = 0B4C47071460ECC7007B5E06 /* PBXContainerItemProxy */; 582 | }; 583 | /* End PBXTargetDependency section */ 584 | 585 | /* Begin PBXVariantGroup section */ 586 | 0B4C468E1460E8B9007B5E06 /* InfoPlist.strings */ = { 587 | isa = PBXVariantGroup; 588 | children = ( 589 | 0B4C468F1460E8B9007B5E06 /* en */, 590 | ); 591 | name = InfoPlist.strings; 592 | sourceTree = ""; 593 | }; 594 | 0B4C46A71460EA4B007B5E06 /* Credits.rtf */ = { 595 | isa = PBXVariantGroup; 596 | children = ( 597 | 0B4C46A81460EA4B007B5E06 /* English */, 598 | ); 599 | name = Credits.rtf; 600 | sourceTree = ""; 601 | }; 602 | 0B4C46A91460EA4B007B5E06 /* InfoPlist.strings */ = { 603 | isa = PBXVariantGroup; 604 | children = ( 605 | 0B4C46AA1460EA4B007B5E06 /* English */, 606 | ); 607 | name = InfoPlist.strings; 608 | sourceTree = ""; 609 | }; 610 | 0B4C46AB1460EA4B007B5E06 /* MainMenu.xib */ = { 611 | isa = PBXVariantGroup; 612 | children = ( 613 | 0B4C46AC1460EA4B007B5E06 /* English */, 614 | ); 615 | name = MainMenu.xib; 616 | sourceTree = ""; 617 | }; 618 | 0B4C46AD1460EA4B007B5E06 /* MyDocument.xib */ = { 619 | isa = PBXVariantGroup; 620 | children = ( 621 | 0B4C46AE1460EA4B007B5E06 /* English */, 622 | ); 623 | name = MyDocument.xib; 624 | sourceTree = ""; 625 | }; 626 | 0B4C46AF1460EA4B007B5E06 /* PacketView.xib */ = { 627 | isa = PBXVariantGroup; 628 | children = ( 629 | 0B4C46B01460EA4B007B5E06 /* English */, 630 | ); 631 | name = PacketView.xib; 632 | sourceTree = ""; 633 | }; 634 | /* End PBXVariantGroup section */ 635 | 636 | /* Begin XCBuildConfiguration section */ 637 | 0B4C46961460E8B9007B5E06 /* Debug */ = { 638 | isa = XCBuildConfiguration; 639 | buildSettings = { 640 | COMBINE_HIDPI_IMAGES = YES; 641 | DYLIB_COMPATIBILITY_VERSION = 1; 642 | DYLIB_CURRENT_VERSION = 1; 643 | FRAMEWORK_SEARCH_PATHS = ( 644 | "$(inherited)", 645 | "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", 646 | ); 647 | FRAMEWORK_VERSION = A; 648 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 649 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 650 | GCC_PREFIX_HEADER = "CocoaOSC/CocoaOSC-Prefix.pch"; 651 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 652 | INFOPLIST_FILE = "CocoaOSC/CocoaOSC-Info.plist"; 653 | INSTALL_PATH = "@executable_path/../Frameworks"; 654 | MACOSX_DEPLOYMENT_TARGET = 10.7; 655 | ONLY_ACTIVE_ARCH = YES; 656 | PRODUCT_BUNDLE_IDENTIFIER = "com.danieldickison.${PRODUCT_NAME:rfc1034identifier}"; 657 | PRODUCT_NAME = CocoaOSC; 658 | SDKROOT = macosx; 659 | SKIP_INSTALL = YES; 660 | WRAPPER_EXTENSION = framework; 661 | }; 662 | name = Debug; 663 | }; 664 | 0B4C46971460E8B9007B5E06 /* Release */ = { 665 | isa = XCBuildConfiguration; 666 | buildSettings = { 667 | COMBINE_HIDPI_IMAGES = YES; 668 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 669 | DYLIB_COMPATIBILITY_VERSION = 1; 670 | DYLIB_CURRENT_VERSION = 1; 671 | FRAMEWORK_SEARCH_PATHS = ( 672 | "$(inherited)", 673 | "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", 674 | ); 675 | FRAMEWORK_VERSION = A; 676 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 677 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 678 | GCC_PREFIX_HEADER = "CocoaOSC/CocoaOSC-Prefix.pch"; 679 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 680 | INFOPLIST_FILE = "CocoaOSC/CocoaOSC-Info.plist"; 681 | INSTALL_PATH = "@executable_path/../Frameworks"; 682 | MACOSX_DEPLOYMENT_TARGET = 10.7; 683 | PRODUCT_BUNDLE_IDENTIFIER = "com.danieldickison.${PRODUCT_NAME:rfc1034identifier}"; 684 | PRODUCT_NAME = CocoaOSC; 685 | SDKROOT = macosx; 686 | SKIP_INSTALL = YES; 687 | WRAPPER_EXTENSION = framework; 688 | }; 689 | name = Release; 690 | }; 691 | 0B4C46D91460EAAF007B5E06 /* Debug */ = { 692 | isa = XCBuildConfiguration; 693 | buildSettings = { 694 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 695 | GCC_PRECOMPILE_PREFIX_HEADER = NO; 696 | INFOPLIST_FILE = "Demo-ios/CocoaOSCDemo-Info.plist"; 697 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 698 | OTHER_LDFLAGS = "-ObjC"; 699 | PRODUCT_BUNDLE_IDENTIFIER = "com.danieldickison.${PRODUCT_NAME:identifier}"; 700 | PRODUCT_NAME = CocoaOSCios; 701 | WRAPPER_EXTENSION = app; 702 | }; 703 | name = Debug; 704 | }; 705 | 0B4C46DA1460EAAF007B5E06 /* Release */ = { 706 | isa = XCBuildConfiguration; 707 | buildSettings = { 708 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 709 | GCC_PRECOMPILE_PREFIX_HEADER = NO; 710 | INFOPLIST_FILE = "Demo-ios/CocoaOSCDemo-Info.plist"; 711 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 712 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 713 | OTHER_LDFLAGS = "-ObjC"; 714 | PRODUCT_BUNDLE_IDENTIFIER = "com.danieldickison.${PRODUCT_NAME:identifier}"; 715 | PRODUCT_NAME = CocoaOSCios; 716 | WRAPPER_EXTENSION = app; 717 | }; 718 | name = Release; 719 | }; 720 | 0B4C46FA1460EC07007B5E06 /* Debug */ = { 721 | isa = XCBuildConfiguration; 722 | buildSettings = { 723 | CLANG_ENABLE_OBJC_ARC = YES; 724 | COMBINE_HIDPI_IMAGES = YES; 725 | FRAMEWORK_SEARCH_PATHS = ( 726 | "$(inherited)", 727 | "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", 728 | ); 729 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 730 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 731 | GCC_PREFIX_HEADER = "Demo-mac/CocoaOSC_Mac_Demo_Prefix.pch"; 732 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 733 | INFOPLIST_FILE = "Demo-mac/CocoaOSC_Mac_Demo-Info.plist"; 734 | MACOSX_DEPLOYMENT_TARGET = 10.7; 735 | ONLY_ACTIVE_ARCH = YES; 736 | PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}"; 737 | PRODUCT_NAME = CocoaOSCmac; 738 | SDKROOT = macosx; 739 | WRAPPER_EXTENSION = app; 740 | }; 741 | name = Debug; 742 | }; 743 | 0B4C46FB1460EC07007B5E06 /* Release */ = { 744 | isa = XCBuildConfiguration; 745 | buildSettings = { 746 | CLANG_ENABLE_OBJC_ARC = YES; 747 | COMBINE_HIDPI_IMAGES = YES; 748 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 749 | FRAMEWORK_SEARCH_PATHS = ( 750 | "$(inherited)", 751 | "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", 752 | ); 753 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 754 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 755 | GCC_PREFIX_HEADER = "Demo-mac/CocoaOSC_Mac_Demo_Prefix.pch"; 756 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 757 | INFOPLIST_FILE = "Demo-mac/CocoaOSC_Mac_Demo-Info.plist"; 758 | MACOSX_DEPLOYMENT_TARGET = 10.7; 759 | PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034identifier}"; 760 | PRODUCT_NAME = CocoaOSCmac; 761 | SDKROOT = macosx; 762 | WRAPPER_EXTENSION = app; 763 | }; 764 | name = Release; 765 | }; 766 | 0B5068D01460E41500BD27ED /* Debug */ = { 767 | isa = XCBuildConfiguration; 768 | buildSettings = { 769 | ALWAYS_SEARCH_USER_PATHS = NO; 770 | COPY_PHASE_STRIP = NO; 771 | ENABLE_TESTABILITY = YES; 772 | GCC_C_LANGUAGE_STANDARD = gnu99; 773 | GCC_DYNAMIC_NO_PIC = NO; 774 | GCC_OPTIMIZATION_LEVEL = 0; 775 | GCC_PREPROCESSOR_DEFINITIONS = ( 776 | "DEBUG=1", 777 | "$(inherited)", 778 | ); 779 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 780 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 781 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 782 | GCC_WARN_UNUSED_VARIABLE = YES; 783 | HEADER_SEARCH_PATHS = .; 784 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 785 | ONLY_ACTIVE_ARCH = YES; 786 | SDKROOT = iphoneos; 787 | }; 788 | name = Debug; 789 | }; 790 | 0B5068D11460E41500BD27ED /* Release */ = { 791 | isa = XCBuildConfiguration; 792 | buildSettings = { 793 | ALWAYS_SEARCH_USER_PATHS = NO; 794 | COPY_PHASE_STRIP = YES; 795 | GCC_C_LANGUAGE_STANDARD = gnu99; 796 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 797 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 798 | GCC_WARN_UNUSED_VARIABLE = YES; 799 | HEADER_SEARCH_PATHS = .; 800 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 801 | SDKROOT = iphoneos; 802 | VALIDATE_PRODUCT = YES; 803 | }; 804 | name = Release; 805 | }; 806 | 0B5068D31460E41500BD27ED /* Debug */ = { 807 | isa = XCBuildConfiguration; 808 | buildSettings = { 809 | DSTROOT = /tmp/CocoaOSC.dst; 810 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 811 | GCC_PREFIX_HEADER = "CocoaOSC/CocoaOSC-Prefix.pch"; 812 | GCC_THUMB_SUPPORT = NO; 813 | OTHER_LDFLAGS = "-ObjC"; 814 | PRODUCT_NAME = CocoaOSC; 815 | SKIP_INSTALL = YES; 816 | }; 817 | name = Debug; 818 | }; 819 | 0B5068D41460E41500BD27ED /* Release */ = { 820 | isa = XCBuildConfiguration; 821 | buildSettings = { 822 | DSTROOT = /tmp/CocoaOSC.dst; 823 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 824 | GCC_PREFIX_HEADER = "CocoaOSC/CocoaOSC-Prefix.pch"; 825 | GCC_THUMB_SUPPORT = NO; 826 | OTHER_LDFLAGS = "-ObjC"; 827 | PRODUCT_NAME = CocoaOSC; 828 | SKIP_INSTALL = YES; 829 | }; 830 | name = Release; 831 | }; 832 | /* End XCBuildConfiguration section */ 833 | 834 | /* Begin XCConfigurationList section */ 835 | 0B4C46951460E8B9007B5E06 /* Build configuration list for PBXNativeTarget "CocoaOSC-mac" */ = { 836 | isa = XCConfigurationList; 837 | buildConfigurations = ( 838 | 0B4C46961460E8B9007B5E06 /* Debug */, 839 | 0B4C46971460E8B9007B5E06 /* Release */, 840 | ); 841 | defaultConfigurationIsVisible = 0; 842 | defaultConfigurationName = Release; 843 | }; 844 | 0B4C46D81460EAAF007B5E06 /* Build configuration list for PBXNativeTarget "CocoaOSCDemo-ios" */ = { 845 | isa = XCConfigurationList; 846 | buildConfigurations = ( 847 | 0B4C46D91460EAAF007B5E06 /* Debug */, 848 | 0B4C46DA1460EAAF007B5E06 /* Release */, 849 | ); 850 | defaultConfigurationIsVisible = 0; 851 | defaultConfigurationName = Release; 852 | }; 853 | 0B4C46F91460EC07007B5E06 /* Build configuration list for PBXNativeTarget "CocoaOSCDemo-mac" */ = { 854 | isa = XCConfigurationList; 855 | buildConfigurations = ( 856 | 0B4C46FA1460EC07007B5E06 /* Debug */, 857 | 0B4C46FB1460EC07007B5E06 /* Release */, 858 | ); 859 | defaultConfigurationIsVisible = 0; 860 | defaultConfigurationName = Release; 861 | }; 862 | 0B5068BF1460E41500BD27ED /* Build configuration list for PBXProject "CocoaOSC" */ = { 863 | isa = XCConfigurationList; 864 | buildConfigurations = ( 865 | 0B5068D01460E41500BD27ED /* Debug */, 866 | 0B5068D11460E41500BD27ED /* Release */, 867 | ); 868 | defaultConfigurationIsVisible = 0; 869 | defaultConfigurationName = Release; 870 | }; 871 | 0B5068D21460E41500BD27ED /* Build configuration list for PBXNativeTarget "CocoaOSC-ios" */ = { 872 | isa = XCConfigurationList; 873 | buildConfigurations = ( 874 | 0B5068D31460E41500BD27ED /* Debug */, 875 | 0B5068D41460E41500BD27ED /* Release */, 876 | ); 877 | defaultConfigurationIsVisible = 0; 878 | defaultConfigurationName = Release; 879 | }; 880 | /* End XCConfigurationList section */ 881 | }; 882 | rootObject = 0B5068BC1460E41500BD27ED /* Project object */; 883 | } 884 | -------------------------------------------------------------------------------- /Demo-ios/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12C60 6 | 3084 7 | 1187.34 8 | 625.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIButton 17 | IBUICustomObject 18 | IBUILabel 19 | IBUISegmentedControl 20 | IBUITextField 21 | IBUIView 22 | IBUIViewController 23 | IBUIWindow 24 | 25 | 26 | YES 27 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 28 | 29 | 30 | PluginDependencyRecalculationVersion 31 | 32 | 33 | 34 | YES 35 | 36 | IBFilesOwner 37 | IBCocoaTouchFramework 38 | 39 | 40 | IBFirstResponder 41 | IBCocoaTouchFramework 42 | 43 | 44 | IBCocoaTouchFramework 45 | 46 | 47 | 48 | 1316 49 | 50 | YES 51 | 52 | 53 | {320, 480} 54 | 55 | 56 | 57 | 58 | 1 59 | MC44NDIyNDA1MTI0IDAuODUyNDg2MTkzMiAwLjg3Nzc5NDIwNjEAA 60 | 61 | NO 62 | NO 63 | 64 | IBCocoaTouchFramework 65 | YES 66 | 67 | 68 | 69 | 70 | 274 71 | 72 | YES 73 | 74 | 75 | 268 76 | {{103, 20}, {200, 31}} 77 | 78 | 79 | 80 | NO 81 | NO 82 | 42 83 | IBCocoaTouchFramework 84 | 0 85 | 86 | 3 87 | 88 | 89 | 3 90 | MAA 91 | 92 | 2 93 | 94 | 95 | YES 96 | 17 97 | 98 | 1 99 | 1 100 | IBCocoaTouchFramework 101 | 102 | 1 103 | 104 | 1 105 | 12 106 | 107 | 108 | Helvetica 109 | 12 110 | 16 111 | 112 | 113 | 114 | 115 | 268 116 | {{23, 25}, {72, 21}} 117 | 118 | 119 | 120 | NO 121 | YES 122 | NO 123 | IBCocoaTouchFramework 124 | Host: 125 | 126 | 1 127 | MCAwIDAAA 128 | darkTextColor 129 | 130 | 131 | 1 132 | 10 133 | 134 | Helvetica-Bold 135 | Helvetica 136 | 2 137 | 17 138 | 139 | 140 | Helvetica-Bold 141 | 17 142 | 16 143 | 144 | 145 | 146 | 147 | 268 148 | {{103, 59}, {200, 31}} 149 | 150 | 151 | 152 | NO 153 | NO 154 | 43 155 | IBCocoaTouchFramework 156 | 0 157 | 158 | 3 159 | 160 | 161 | 3 162 | MAA 163 | 164 | 165 | YES 166 | 17 167 | 168 | 1 169 | 2 170 | IBCocoaTouchFramework 171 | 172 | 1 173 | 174 | 175 | 176 | 177 | 178 | 268 179 | {{23, 64}, {72, 21}} 180 | 181 | 182 | 183 | NO 184 | YES 185 | NO 186 | IBCocoaTouchFramework 187 | Port: 188 | 189 | 190 | 1 191 | 10 192 | 193 | 194 | 195 | 196 | 197 | 268 198 | {{103, 98}, {200, 31}} 199 | 200 | 201 | 202 | NO 203 | NO 204 | 44 205 | IBCocoaTouchFramework 206 | 0 207 | 208 | 3 209 | 210 | 211 | 3 212 | MAA 213 | 214 | 215 | YES 216 | 17 217 | 218 | 1 219 | 1 220 | IBCocoaTouchFramework 221 | 222 | 1 223 | 224 | 225 | 226 | 227 | 228 | 268 229 | {{22, 103}, {74, 21}} 230 | 231 | 232 | 233 | NO 234 | YES 235 | NO 236 | IBCocoaTouchFramework 237 | Address: 238 | 239 | 240 | 1 241 | 10 242 | 243 | 244 | 245 | 246 | 247 | 268 248 | {{103, 137}, {200, 31}} 249 | 250 | 251 | 252 | NO 253 | NO 254 | 45 255 | IBCocoaTouchFramework 256 | 0 257 | 258 | 3 259 | 260 | 261 | 3 262 | MAA 263 | 264 | 265 | YES 266 | 17 267 | 268 | 1 269 | IBCocoaTouchFramework 270 | 271 | 1 272 | 273 | 274 | 275 | 276 | 277 | 268 278 | {{22, 140}, {74, 21}} 279 | 280 | 281 | 282 | NO 283 | YES 284 | NO 285 | IBCocoaTouchFramework 286 | Value: 287 | 288 | 289 | 1 290 | 10 291 | 292 | 293 | 294 | 295 | 296 | 268 297 | {{21, 176}, {282, 30}} 298 | 299 | 300 | 301 | NO 302 | NO 303 | 46 304 | IBCocoaTouchFramework 305 | 2 306 | 4 307 | 0 308 | 309 | YES 310 | String 311 | Int 312 | Float 313 | Blob 314 | 315 | 316 | YES 317 | 318 | 319 | 320 | 321 | 322 | 323 | YES 324 | 325 | 326 | 327 | 328 | 329 | 330 | YES 331 | {0, 0} 332 | {0, 0} 333 | {0, 0} 334 | {0, 0} 335 | 336 | 337 | YES 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 268 347 | {{20, 213}, {282, 30}} 348 | 349 | 350 | 351 | NO 352 | NO 353 | 47 354 | IBCocoaTouchFramework 355 | 2 356 | 5 357 | 358 | YES 359 | Time 360 | True 361 | False 362 | Impulse 363 | Null 364 | 365 | 366 | YES 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | YES 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | YES 383 | {0, 0} 384 | {0, 0} 385 | {0, 0} 386 | {0, 0} 387 | {0, 0} 388 | 389 | 390 | YES 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 268 401 | {{22, 250}, {282, 37}} 402 | 403 | 404 | 405 | NO 406 | NO 407 | IBCocoaTouchFramework 408 | 0 409 | 0 410 | 1 411 | Send 412 | 413 | 3 414 | MQA 415 | 416 | 417 | 1 418 | MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA 419 | 420 | 421 | 3 422 | MC41AA 423 | 424 | 425 | Helvetica-Bold 426 | Helvetica 427 | 2 428 | 15 429 | 430 | 431 | Helvetica-Bold 432 | 15 433 | 16 434 | 435 | 436 | 437 | 438 | 268 439 | {{22, 294}, {282, 21}} 440 | 441 | 442 | 443 | NO 444 | YES 445 | NO 446 | IBCocoaTouchFramework 447 | Receive 448 | 449 | 450 | 1 451 | 10 452 | 1 453 | 454 | 455 | 456 | 457 | 458 | 268 459 | {{102, 317}, {200, 31}} 460 | 461 | 462 | 463 | NO 464 | NO 465 | 48 466 | IBCocoaTouchFramework 467 | NO 468 | 0 469 | 470 | 3 471 | 472 | 473 | 3 474 | MAA 475 | 476 | 477 | YES 478 | 17 479 | 480 | 1 481 | 1 482 | IBCocoaTouchFramework 483 | 484 | 1 485 | 486 | 487 | 488 | 489 | 490 | 268 491 | {{22, 320}, {72, 21}} 492 | 493 | 494 | 495 | NO 496 | YES 497 | NO 498 | IBCocoaTouchFramework 499 | Port: 500 | 501 | 502 | 1 503 | 10 504 | 505 | 506 | 507 | 508 | 509 | 268 510 | {{103, 356}, {200, 31}} 511 | 512 | 513 | 514 | NO 515 | NO 516 | 49 517 | IBCocoaTouchFramework 518 | NO 519 | 0 520 | 521 | 3 522 | 523 | 524 | 3 525 | MAA 526 | 527 | 528 | YES 529 | 17 530 | 531 | 1 532 | 2 533 | IBCocoaTouchFramework 534 | 535 | 1 536 | 537 | 538 | 539 | 540 | 541 | 268 542 | {{20, 359}, {74, 21}} 543 | 544 | 545 | 546 | NO 547 | YES 548 | NO 549 | IBCocoaTouchFramework 550 | Address: 551 | 552 | 553 | 1 554 | 10 555 | 556 | 557 | 558 | 559 | 560 | 268 561 | {{104, 395}, {200, 31}} 562 | 563 | 564 | NO 565 | NO 566 | 50 567 | IBCocoaTouchFramework 568 | NO 569 | 0 570 | 571 | 3 572 | 573 | 3 574 | MAA 575 | 576 | 577 | YES 578 | YES 579 | 10 580 | 581 | IBCocoaTouchFramework 582 | 583 | 584 | 585 | 586 | 587 | 588 | 268 589 | {{20, 400}, {74, 21}} 590 | 591 | 592 | 593 | NO 594 | YES 595 | NO 596 | IBCocoaTouchFramework 597 | Values: 598 | 599 | 600 | 1 601 | 10 602 | 603 | 604 | 605 | 606 | {{0, 20}, {320, 460}} 607 | 608 | 609 | _NS:9 610 | 611 | 1 612 | MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA 613 | 614 | IBCocoaTouchFramework 615 | 616 | 617 | 618 | 1 619 | 1 620 | 621 | 622 | IBUIScreenMetrics 623 | 624 | YES 625 | 626 | YES 627 | 628 | 629 | 630 | 631 | YES 632 | {320, 480} 633 | {480, 320} 634 | 635 | 636 | IBCocoaTouchFramework 637 | Retina 3.5 Full Screen 638 | 0 639 | 640 | IBCocoaTouchFramework 641 | NO 642 | 643 | 644 | 645 | 646 | YES 647 | 648 | 649 | delegate 650 | 651 | 652 | 653 | 5 654 | 655 | 656 | 657 | rootViewController 658 | 659 | 660 | 661 | 46 662 | 663 | 664 | 665 | window 666 | 667 | 668 | 669 | 28 670 | 671 | 672 | 673 | delegate 674 | 675 | 676 | 677 | 30 678 | 679 | 680 | 681 | delegate 682 | 683 | 684 | 685 | 31 686 | 687 | 688 | 689 | delegate 690 | 691 | 692 | 693 | 32 694 | 695 | 696 | 697 | delegate 698 | 699 | 700 | 701 | 33 702 | 703 | 704 | 705 | sendPacket 706 | 707 | 708 | 7 709 | 710 | 35 711 | 712 | 713 | 714 | typeBarAction: 715 | 716 | 717 | 13 718 | 719 | 36 720 | 721 | 722 | 723 | delegate 724 | 725 | 726 | 727 | 34 728 | 729 | 730 | 731 | delegate 732 | 733 | 734 | 735 | 29 736 | 737 | 738 | 739 | typeBar2Action: 740 | 741 | 742 | 13 743 | 744 | 43 745 | 746 | 747 | 748 | 749 | YES 750 | 751 | 0 752 | 753 | YES 754 | 755 | 756 | 757 | 758 | 759 | 2 760 | 761 | 762 | YES 763 | 764 | 765 | 766 | 767 | -1 768 | 769 | 770 | File's Owner 771 | 772 | 773 | 4 774 | 775 | 776 | App Delegate 777 | 778 | 779 | -2 780 | 781 | 782 | 783 | 784 | 44 785 | 786 | 787 | YES 788 | 789 | 790 | 791 | 792 | 793 | 45 794 | 795 | 796 | YES 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 6 820 | 821 | 822 | 823 | 824 | 7 825 | 826 | 827 | 828 | 829 | 8 830 | 831 | 832 | 833 | 834 | 9 835 | 836 | 837 | 838 | 839 | 10 840 | 841 | 842 | 843 | 844 | 11 845 | 846 | 847 | 848 | 849 | 12 850 | 851 | 852 | 853 | 854 | 13 855 | 856 | 857 | 858 | 859 | 15 860 | 861 | 862 | 863 | 864 | 41 865 | 866 | 867 | 868 | 869 | 14 870 | 871 | 872 | 873 | 874 | 25 875 | 876 | 877 | 878 | 879 | 20 880 | 881 | 882 | 883 | 884 | 21 885 | 886 | 887 | 888 | 889 | 22 890 | 891 | 892 | 893 | 894 | 23 895 | 896 | 897 | 898 | 899 | 27 900 | 901 | 902 | 903 | 904 | 39 905 | 906 | 907 | 908 | 909 | 910 | 911 | YES 912 | 913 | YES 914 | -1.CustomClassName 915 | -1.IBPluginDependency 916 | -2.CustomClassName 917 | -2.IBPluginDependency 918 | 10.IBPluginDependency 919 | 11.IBPluginDependency 920 | 12.IBPluginDependency 921 | 13.IBPluginDependency 922 | 14.IBPluginDependency 923 | 15.IBPluginDependency 924 | 2.IBAttributePlaceholdersKey 925 | 2.IBPluginDependency 926 | 20.IBPluginDependency 927 | 21.IBPluginDependency 928 | 22.IBPluginDependency 929 | 23.IBPluginDependency 930 | 25.IBPluginDependency 931 | 27.IBPluginDependency 932 | 39.IBPluginDependency 933 | 4.CustomClassName 934 | 4.IBPluginDependency 935 | 41.IBPluginDependency 936 | 44.IBPluginDependency 937 | 45.IBPluginDependency 938 | 6.IBPluginDependency 939 | 7.IBPluginDependency 940 | 8.IBPluginDependency 941 | 9.IBPluginDependency 942 | 943 | 944 | YES 945 | UIApplication 946 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 947 | UIResponder 948 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 949 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 950 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 951 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 952 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 953 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 954 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 955 | 956 | YES 957 | 958 | 959 | 960 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 961 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 962 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 963 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 964 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 965 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 966 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 967 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 968 | AppDelegate 969 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 970 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 971 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 972 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 973 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 974 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 975 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 976 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 977 | 978 | 979 | 980 | YES 981 | 982 | 983 | 984 | 985 | 986 | YES 987 | 988 | 989 | 990 | 991 | 46 992 | 993 | 994 | 995 | YES 996 | 997 | AppDelegate 998 | NSObject 999 | 1000 | YES 1001 | 1002 | YES 1003 | sendPacket 1004 | typeBar2Action: 1005 | typeBarAction: 1006 | 1007 | 1008 | YES 1009 | id 1010 | UISegmentedControl 1011 | UISegmentedControl 1012 | 1013 | 1014 | 1015 | YES 1016 | 1017 | YES 1018 | sendPacket 1019 | typeBar2Action: 1020 | typeBarAction: 1021 | 1022 | 1023 | YES 1024 | 1025 | sendPacket 1026 | id 1027 | 1028 | 1029 | typeBar2Action: 1030 | UISegmentedControl 1031 | 1032 | 1033 | typeBarAction: 1034 | UISegmentedControl 1035 | 1036 | 1037 | 1038 | 1039 | window 1040 | UIWindow 1041 | 1042 | 1043 | window 1044 | 1045 | window 1046 | UIWindow 1047 | 1048 | 1049 | 1050 | IBProjectSource 1051 | ./Classes/AppDelegate.h 1052 | 1053 | 1054 | 1055 | 1056 | 0 1057 | IBCocoaTouchFramework 1058 | 1059 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 1060 | 1061 | 1062 | YES 1063 | 3 1064 | 2083 1065 | 1066 | 1067 | --------------------------------------------------------------------------------