Skip to content
Browse files

Refactored everything. Starting to add HUD UI. Removed motion sensing.

  • Loading branch information...
1 parent 1a0f0f6 commit 1bb612e470ec18959ab1e04d04cc58674a2aebfa @nwinter committed Aug 31, 2013
Showing with 2,448 additions and 6,703 deletions.
  1. BIN Icon.jpg
  2. +0 −65 Json/JSON.h
  3. +0 −53 Json/NSObject+SBJSON.h
  4. +0 −45 Json/NSObject+SBJSON.m
  5. +0 −48 Json/NSString+SBJSON.h
  6. +0 −45 Json/NSString+SBJSON.m
  7. +0 −86 Json/SBJsonBase.h
  8. +0 −78 Json/SBJsonBase.m
  9. +0 −86 Json/SBJsonParser.h
  10. +0 −516 Json/SBJsonParser.m
  11. +0 −127 Json/SBJsonWriter.h
  12. +0 −239 Json/SBJsonWriter.m
  13. +372 −196 Telepath.xcodeproj/project.pbxproj
  14. +653 −0 Telepath/Base.lproj/MainMenu.xib
  15. 0 Telepath/{Classes → }/ImageSnap.h
  16. 0 Telepath/{Classes → }/ImageSnap.m
  17. +58 −0 Telepath/Images.xcassets/AppIcon.appiconset/Contents.json
  18. +17 −0 Telepath/Images.xcassets/WebcamDefaultImage.imageset/Contents.json
  19. BIN Telepath/Images.xcassets/WebcamDefaultImage.imageset/webcam.png
  20. +0 −21 Telepath/QMAppDelegate.h
  21. +0 −608 Telepath/QMAppDelegate.m
  22. BIN Telepath/Resources/FXHihat.caf
  23. BIN Telepath/Resources/FXKick.caf
  24. BIN Telepath/Resources/FXSnare.caf
  25. BIN Telepath/Resources/FXTam.caf
  26. BIN Telepath/Resources/FXToms.caf
  27. BIN Telepath/Resources/FXWilhelm.caf
  28. +19 −0 Telepath/TPAppDelegate.h
  29. +191 −0 Telepath/TPAppDelegate.m
  30. +13 −0 Telepath/TPHUDWindowController.h
  31. +75 −0 Telepath/TPHUDWindowController.m
  32. +141 −0 Telepath/TPHUDWindowController.xib
  33. +8 −5 Telepath/{Classes/QMLightSensor.h → TPLightSensor.h}
  34. +22 −23 Telepath/{Classes/QMLightSensor.m → TPLightSensor.m}
  35. +23 −0 Telepath/TPTracker.h
  36. +161 −0 Telepath/TPTracker.m
  37. +21 −0 Telepath/TPTrackerCamera.h
  38. +94 −0 Telepath/TPTrackerCamera.m
  39. +14 −0 Telepath/TPTrackerKeyboard.h
  40. +173 −0 Telepath/TPTrackerKeyboard.m
  41. +13 −0 Telepath/TPTrackerLight.h
  42. +47 −0 Telepath/TPTrackerLight.m
  43. +13 −0 Telepath/TPTrackerMouse.h
  44. +58 −0 Telepath/TPTrackerMouse.m
  45. +13 −0 Telepath/TPTrackerWindow.h
  46. +106 −0 Telepath/TPTrackerWindow.m
  47. +15 −0 Telepath/TPUtilities.h
  48. +19 −0 Telepath/TPUtilities.m
  49. +3 −3 Telepath/Telepath-Info.plist
  50. +3 −1 Telepath/Telepath-Prefix.pch
  51. +8 −0 Telepath/Telepath.xcdatamodeld/.xccurrentversion
  52. +4 −0 Telepath/Telepath.xcdatamodeld/Telepath.xcdatamodel/contents
  53. +29 −0 Telepath/en.lproj/Credits.rtf
  54. +0 −3,303 Telepath/en.lproj/MainMenu.xib
  55. +4 −3 Telepath/main.m
  56. +0 −171 Telepath/smslib.h
  57. +0 −981 Telepath/smslib.m
  58. +22 −0 TelepathTests/TelepathTests-Info.plist
  59. +34 −0 TelepathTests/TelepathTests.m
  60. +2 −0 TelepathTests/en.lproj/InfoPlist.strings
View
BIN Icon.jpg
Deleted file not rendered
View
65 Json/JSON.h
@@ -1,65 +0,0 @@
-/*
- Copyright (C) 2009-2010 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-/**
- @mainpage A strict JSON parser and generator for Objective-C
-
- JSON (JavaScript Object Notation) is a lightweight data-interchange
- format. This framework provides two apis for parsing and generating
- JSON. One standard object-based and a higher level api consisting of
- categories added to existing Objective-C classes.
-
- This framework does its best to be as strict as possible, both in what it accepts and what it generates. For example, it does not support trailing commas in arrays or objects. Nor does it support embedded comments, or anything else not in the JSON specification. This is considered a feature.
-
- @section Links
-
- @li <a href="http://stig.github.com/json-framework">Project home page</a>.
- @li Online version of the <a href="http://stig.github.com/json-framework/api">API documentation</a>.
-
-*/
-
-
-// This setting of 1 is best if you copy the source into your project.
-// The build transforms the 1 to a 0 when building the framework and static lib.
-
-#if 1
-
-#import "SBJsonParser.h"
-#import "SBJsonWriter.h"
-#import "NSObject+SBJSON.h"
-#import "NSString+SBJSON.h"
-
-#else
-
-#import <JSON/SBJsonParser.h>
-#import <JSON/SBJsonWriter.h>
-#import <JSON/NSObject+SBJSON.h>
-#import <JSON/NSString+SBJSON.h>
-
-#endif
View
53 Json/NSObject+SBJSON.h
@@ -1,53 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import <Foundation/Foundation.h>
-
-
-/**
- @brief Adds JSON generation to Foundation classes
-
- This is a category on NSObject that adds methods for returning JSON representations
- of standard objects to the objects themselves. This means you can call the
- -JSONRepresentation method on an NSArray object and it'll do what you want.
- */
-@interface NSObject (NSObject_SBJSON)
-
-/**
- @brief Returns a string containing the receiver encoded in JSON.
-
- This method is added as a category on NSObject but is only actually
- supported for the following objects:
- @li NSDictionary
- @li NSArray
- */
-- (NSString *)JSONRepresentation;
-
-@end
-
View
45 Json/NSObject+SBJSON.m
@@ -1,45 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import "NSObject+SBJSON.h"
-#import "SBJsonWriter.h"
-
-@implementation NSObject (NSObject_SBJSON)
-
-- (NSString *)JSONRepresentation {
- SBJsonWriter *jsonWriter = [SBJsonWriter new];
- NSString *json = [jsonWriter stringWithObject:self];
- if (!json)
- NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]);
- [jsonWriter release];
- return json;
-}
-
-@end
-
View
48 Json/NSString+SBJSON.h
@@ -1,48 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import <Foundation/Foundation.h>
-
-/**
- @brief Adds JSON parsing methods to NSString
-
-This is a category on NSString that adds methods for parsing the target string.
-*/
-@interface NSString (NSString_SBJSON)
-
-/**
- @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation.
-
- Returns the dictionary or array represented in the receiver, or nil on error.
-
- Returns the NSDictionary or NSArray represented by the current string's JSON representation.
- */
-- (id)JSONValue;
-
-@end
View
45 Json/NSString+SBJSON.m
@@ -1,45 +0,0 @@
-/*
- Copyright (C) 2007-2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import "NSString+SBJSON.h"
-#import "SBJsonParser.h"
-
-@implementation NSString (NSString_SBJSON)
-
-- (id)JSONValue
-{
- SBJsonParser *jsonParser = [SBJsonParser new];
- id repr = [jsonParser objectWithString:self];
- if (!repr)
- NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]);
- [jsonParser release];
- return repr;
-}
-
-@end
View
86 Json/SBJsonBase.h
@@ -1,86 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import <Foundation/Foundation.h>
-
-extern NSString * SBJSONErrorDomain;
-
-
-enum {
- EUNSUPPORTED = 1,
- EPARSENUM,
- EPARSE,
- EFRAGMENT,
- ECTRL,
- EUNICODE,
- EDEPTH,
- EESCAPE,
- ETRAILCOMMA,
- ETRAILGARBAGE,
- EEOF,
- EINPUT
-};
-
-/**
- @brief Common base class for parsing & writing.
-
- This class contains the common error-handling code and option between the parser/writer.
- */
-@interface SBJsonBase : NSObject {
- NSMutableArray *errorTrace;
-
-@protected
- NSUInteger depth, maxDepth;
-}
-
-/**
- @brief The maximum recursing depth.
-
- Defaults to 512. If the input is nested deeper than this the input will be deemed to be
- malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can
- turn off this security feature by setting the maxDepth value to 0.
- */
-@property NSUInteger maxDepth;
-
-/**
- @brief Return an error trace, or nil if there was no errors.
-
- Note that this method returns the trace of the last method that failed.
- You need to check the return value of the call you're making to figure out
- if the call actually failed, before you know call this method.
- */
- @property(copy,readonly) NSArray* errorTrace;
-
-/// @internal for use in subclasses to add errors to the stack trace
-- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str;
-
-/// @internal for use in subclasess to clear the error before a new parsing attempt
-- (void)clearErrorTrace;
-
-@end
View
78 Json/SBJsonBase.m
@@ -1,78 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import "SBJsonBase.h"
-NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain";
-
-
-@implementation SBJsonBase
-
-@synthesize errorTrace;
-@synthesize maxDepth;
-
-- (id)init {
- self = [super init];
- if (self)
- self.maxDepth = 512;
- return self;
-}
-
-- (void)dealloc {
- [errorTrace release];
- [super dealloc];
-}
-
-- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str {
- NSDictionary *userInfo;
- if (!errorTrace) {
- errorTrace = [NSMutableArray new];
- userInfo = [NSDictionary dictionaryWithObject:str forKey:NSLocalizedDescriptionKey];
-
- } else {
- userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
- str, NSLocalizedDescriptionKey,
- [errorTrace lastObject], NSUnderlyingErrorKey,
- nil];
- }
-
- NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo];
-
- [self willChangeValueForKey:@"errorTrace"];
- [errorTrace addObject:error];
- [self didChangeValueForKey:@"errorTrace"];
-}
-
-- (void)clearErrorTrace {
- [self willChangeValueForKey:@"errorTrace"];
- [errorTrace release];
- errorTrace = nil;
- [self didChangeValueForKey:@"errorTrace"];
-}
-
-@end
View
86 Json/SBJsonParser.h
@@ -1,86 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import <Foundation/Foundation.h>
-#import "SBJsonBase.h"
-
-/**
- @brief The JSON parser class.
-
- JSON is mapped to Objective-C types in the following way:
-
- @li Null -> NSNull
- @li String -> NSMutableString
- @li Array -> NSMutableArray
- @li Object -> NSMutableDictionary
- @li Boolean -> NSNumber (initialised with -initWithBool:)
- @li Number -> (NSNumber | NSDecimalNumber)
-
- Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber
- instances. These are initialised with the -initWithBool: method, and
- round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be
- represented as 'true' and 'false' again.)
-
- As an optimisation short JSON integers turn into NSNumber instances, while complex ones turn into NSDecimalNumber instances.
- We can thus avoid any loss of precision as JSON allows ridiculously large numbers.
-
- */
-@interface SBJsonParser : SBJsonBase {
-
-@private
- const char *c;
-}
-
-/**
- @brief Return the object represented by the given string
-
- Returns the object represented by the passed-in string or nil on error. The returned object can be
- a string, number, boolean, null, array or dictionary.
-
- @param repr the json string to parse
- */
-- (id)objectWithString:(NSString *)repr;
-
-/**
- @brief Return the object represented by the given string
-
- Returns the object represented by the passed-in string or nil on error. The returned object can be
- a string, number, boolean, null, array or dictionary.
-
- @param jsonText the json string to parse
- @param error pointer to an NSError object to populate on error
- */
-
-- (id)objectWithString:(NSString*)jsonText
- error:(NSError**)error;
-
-
-@end
-
-
View
516 Json/SBJsonParser.m
@@ -1,516 +0,0 @@
-/*
- Copyright (C) 2009,2010 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import "SBJsonParser.h"
-
-@interface SBJsonParser ()
-
-- (BOOL)scanValue:(NSObject **)o;
-
-- (BOOL)scanRestOfArray:(NSMutableArray **)o;
-- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o;
-- (BOOL)scanRestOfNull:(NSNull **)o;
-- (BOOL)scanRestOfFalse:(NSNumber **)o;
-- (BOOL)scanRestOfTrue:(NSNumber **)o;
-- (BOOL)scanRestOfString:(NSMutableString **)o;
-
-// Cannot manage without looking at the first digit
-- (BOOL)scanNumber:(NSNumber **)o;
-
-- (BOOL)scanHexQuad:(unichar *)x;
-- (BOOL)scanUnicodeChar:(unichar *)x;
-
-- (BOOL)scanIsAtEnd;
-
-@end
-
-#define skipWhitespace(c) while (isspace(*c)) c++
-#define skipDigits(c) while (isdigit(*c)) c++
-
-
-@implementation SBJsonParser
-
-static char ctrl[0x22];
-
-
-+ (void)initialize {
- ctrl[0] = '\"';
- ctrl[1] = '\\';
- for (int i = 1; i < 0x20; i++)
- ctrl[i+1] = i;
- ctrl[0x21] = 0;
-}
-
-- (id)objectWithString:(NSString *)repr {
- [self clearErrorTrace];
-
- if (!repr) {
- [self addErrorWithCode:EINPUT description:@"Input was 'nil'"];
- return nil;
- }
-
- depth = 0;
- c = [repr UTF8String];
-
- id o;
- if (![self scanValue:&o]) {
- return nil;
- }
-
- // We found some valid JSON. But did it also contain something else?
- if (![self scanIsAtEnd]) {
- [self addErrorWithCode:ETRAILGARBAGE description:@"Garbage after JSON"];
- return nil;
- }
-
- NSAssert1(o, @"Should have a valid object from %@", repr);
-
- // Check that the object we've found is a valid JSON container.
- if (![o isKindOfClass:[NSDictionary class]] && ![o isKindOfClass:[NSArray class]]) {
- [self addErrorWithCode:EFRAGMENT description:@"Valid fragment, but not JSON"];
- return nil;
- }
-
- return o;
-}
-
-- (id)objectWithString:(NSString*)repr error:(NSError**)error {
- id tmp = [self objectWithString:repr];
- if (tmp)
- return tmp;
-
- if (error)
- *error = [self.errorTrace lastObject];
- return nil;
-}
-
-
-/*
- In contrast to the public methods, it is an error to omit the error parameter here.
- */
-- (BOOL)scanValue:(NSObject **)o
-{
- skipWhitespace(c);
-
- switch (*c++) {
- case '{':
- return [self scanRestOfDictionary:(NSMutableDictionary **)o];
- break;
- case '[':
- return [self scanRestOfArray:(NSMutableArray **)o];
- break;
- case '"':
- return [self scanRestOfString:(NSMutableString **)o];
- break;
- case 'f':
- return [self scanRestOfFalse:(NSNumber **)o];
- break;
- case 't':
- return [self scanRestOfTrue:(NSNumber **)o];
- break;
- case 'n':
- return [self scanRestOfNull:(NSNull **)o];
- break;
- case '-':
- case '0'...'9':
- c--; // cannot verify number correctly without the first character
- return [self scanNumber:(NSNumber **)o];
- break;
- case '+':
- [self addErrorWithCode:EPARSENUM description: @"Leading + disallowed in number"];
- return NO;
- break;
- case 0x0:
- [self addErrorWithCode:EEOF description:@"Unexpected end of string"];
- return NO;
- break;
- default:
- [self addErrorWithCode:EPARSE description: @"Unrecognised leading character"];
- return NO;
- break;
- }
-
- NSAssert(0, @"Should never get here");
- return NO;
-}
-
-- (BOOL)scanRestOfTrue:(NSNumber **)o
-{
- if (!strncmp(c, "rue", 3)) {
- c += 3;
- *o = [NSNumber numberWithBool:YES];
- return YES;
- }
- [self addErrorWithCode:EPARSE description:@"Expected 'true'"];
- return NO;
-}
-
-- (BOOL)scanRestOfFalse:(NSNumber **)o
-{
- if (!strncmp(c, "alse", 4)) {
- c += 4;
- *o = [NSNumber numberWithBool:NO];
- return YES;
- }
- [self addErrorWithCode:EPARSE description: @"Expected 'false'"];
- return NO;
-}
-
-- (BOOL)scanRestOfNull:(NSNull **)o {
- if (!strncmp(c, "ull", 3)) {
- c += 3;
- *o = [NSNull null];
- return YES;
- }
- [self addErrorWithCode:EPARSE description: @"Expected 'null'"];
- return NO;
-}
-
-- (BOOL)scanRestOfArray:(NSMutableArray **)o {
- if (maxDepth && ++depth > maxDepth) {
- [self addErrorWithCode:EDEPTH description: @"Nested too deep"];
- return NO;
- }
-
- *o = [NSMutableArray arrayWithCapacity:8];
-
- for (; *c ;) {
- id v;
-
- skipWhitespace(c);
- if (*c == ']' && c++) {
- depth--;
- return YES;
- }
-
- if (![self scanValue:&v]) {
- [self addErrorWithCode:EPARSE description:@"Expected value while parsing array"];
- return NO;
- }
-
- [*o addObject:v];
-
- skipWhitespace(c);
- if (*c == ',' && c++) {
- skipWhitespace(c);
- if (*c == ']') {
- [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in array"];
- return NO;
- }
- }
- }
-
- [self addErrorWithCode:EEOF description: @"End of input while parsing array"];
- return NO;
-}
-
-- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o
-{
- if (maxDepth && ++depth > maxDepth) {
- [self addErrorWithCode:EDEPTH description: @"Nested too deep"];
- return NO;
- }
-
- *o = [NSMutableDictionary dictionaryWithCapacity:7];
-
- for (; *c ;) {
- id k, v;
-
- skipWhitespace(c);
- if (*c == '}' && c++) {
- depth--;
- return YES;
- }
-
- if (!(*c == '\"' && c++ && [self scanRestOfString:&k])) {
- [self addErrorWithCode:EPARSE description: @"Object key string expected"];
- return NO;
- }
-
- skipWhitespace(c);
- if (*c != ':') {
- [self addErrorWithCode:EPARSE description: @"Expected ':' separating key and value"];
- return NO;
- }
-
- c++;
- if (![self scanValue:&v]) {
- NSString *string = [NSString stringWithFormat:@"Object value expected for key: %@", k];
- [self addErrorWithCode:EPARSE description: string];
- return NO;
- }
-
- [*o setObject:v forKey:k];
-
- skipWhitespace(c);
- if (*c == ',' && c++) {
- skipWhitespace(c);
- if (*c == '}') {
- [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in object"];
- return NO;
- }
- }
- }
-
- [self addErrorWithCode:EEOF description: @"End of input while parsing object"];
- return NO;
-}
-
-- (BOOL)scanRestOfString:(NSMutableString **)o
-{
- // if the string has no control characters in it, return it in one go, without any temporary allocations.
- size_t len = strcspn(c, ctrl);
- if (len && *(c + len) == '\"')
- {
- *o = [[[NSMutableString alloc] initWithBytes:(char*)c length:len encoding:NSUTF8StringEncoding] autorelease];
- c += len + 1;
- return YES;
- }
-
- *o = [NSMutableString stringWithCapacity:16];
- do {
- // First see if there's a portion we can grab in one go.
- // Doing this caused a massive speedup on the long string.
- len = strcspn(c, ctrl);
- if (len) {
- // check for
- id t = [[NSString alloc] initWithBytesNoCopy:(char*)c
- length:len
- encoding:NSUTF8StringEncoding
- freeWhenDone:NO];
- if (t) {
- [*o appendString:t];
- [t release];
- c += len;
- }
- }
-
- if (*c == '"') {
- c++;
- return YES;
-
- } else if (*c == '\\') {
- unichar uc = *++c;
- switch (uc) {
- case '\\':
- case '/':
- case '"':
- break;
-
- case 'b': uc = '\b'; break;
- case 'n': uc = '\n'; break;
- case 'r': uc = '\r'; break;
- case 't': uc = '\t'; break;
- case 'f': uc = '\f'; break;
-
- case 'u':
- c++;
- if (![self scanUnicodeChar:&uc]) {
- [self addErrorWithCode:EUNICODE description: @"Broken unicode character"];
- return NO;
- }
- c--; // hack.
- break;
- default:
- [self addErrorWithCode:EESCAPE description: [NSString stringWithFormat:@"Illegal escape sequence '0x%x'", uc]];
- return NO;
- break;
- }
- CFStringAppendCharacters((CFMutableStringRef)*o, &uc, 1);
- c++;
-
- } else if (*c < 0x20) {
- [self addErrorWithCode:ECTRL description: [NSString stringWithFormat:@"Unescaped control character '0x%x'", *c]];
- return NO;
-
- } else {
- NSLog(@"should not be able to get here");
- }
- } while (*c);
-
- [self addErrorWithCode:EEOF description:@"Unexpected EOF while parsing string"];
- return NO;
-}
-
-- (BOOL)scanUnicodeChar:(unichar *)x
-{
- unichar hi, lo;
-
- if (![self scanHexQuad:&hi]) {
- [self addErrorWithCode:EUNICODE description: @"Missing hex quad"];
- return NO;
- }
-
- if (hi >= 0xd800) { // high surrogate char?
- if (hi < 0xdc00) { // yes - expect a low char
-
- if (!(*c == '\\' && ++c && *c == 'u' && ++c && [self scanHexQuad:&lo])) {
- [self addErrorWithCode:EUNICODE description: @"Missing low character in surrogate pair"];
- return NO;
- }
-
- if (lo < 0xdc00 || lo >= 0xdfff) {
- [self addErrorWithCode:EUNICODE description:@"Invalid low surrogate char"];
- return NO;
- }
-
- hi = (hi - 0xd800) * 0x400 + (lo - 0xdc00) + 0x10000;
-
- } else if (hi < 0xe000) {
- [self addErrorWithCode:EUNICODE description:@"Invalid high character in surrogate pair"];
- return NO;
- }
- }
-
- *x = hi;
- return YES;
-}
-
-- (BOOL)scanHexQuad:(unichar *)x
-{
- *x = 0;
- for (int i = 0; i < 4; i++) {
- unichar uc = *c;
- c++;
- int d = (uc >= '0' && uc <= '9')
- ? uc - '0' : (uc >= 'a' && uc <= 'f')
- ? (uc - 'a' + 10) : (uc >= 'A' && uc <= 'F')
- ? (uc - 'A' + 10) : -1;
- if (d == -1) {
- [self addErrorWithCode:EUNICODE description:@"Missing hex digit in quad"];
- return NO;
- }
- *x *= 16;
- *x += d;
- }
- return YES;
-}
-
-- (BOOL)scanNumber:(NSNumber **)o
-{
- BOOL simple = YES;
-
- const char *ns = c;
-
- // The logic to test for validity of the number formatting is relicensed
- // from JSON::XS with permission from its author Marc Lehmann.
- // (Available at the CPAN: http://search.cpan.org/dist/JSON-XS/ .)
-
- if ('-' == *c)
- c++;
-
- if ('0' == *c && c++) {
- if (isdigit(*c)) {
- [self addErrorWithCode:EPARSENUM description: @"Leading 0 disallowed in number"];
- return NO;
- }
-
- } else if (!isdigit(*c) && c != ns) {
- [self addErrorWithCode:EPARSENUM description: @"No digits after initial minus"];
- return NO;
-
- } else {
- skipDigits(c);
- }
-
- // Fractional part
- if ('.' == *c && c++) {
- simple = NO;
- if (!isdigit(*c)) {
- [self addErrorWithCode:EPARSENUM description: @"No digits after decimal point"];
- return NO;
- }
- skipDigits(c);
- }
-
- // Exponential part
- if ('e' == *c || 'E' == *c) {
- simple = NO;
- c++;
-
- if ('-' == *c || '+' == *c)
- c++;
-
- if (!isdigit(*c)) {
- [self addErrorWithCode:EPARSENUM description: @"No digits after exponent"];
- return NO;
- }
- skipDigits(c);
- }
-
- // If we are only reading integers, don't go through the expense of creating an NSDecimal.
- // This ends up being a very large perf win.
- if (simple) {
- BOOL negate = NO;
- long long val = 0;
- const char *d = ns;
-
- if (*d == '-') {
- negate = YES;
- d++;
- }
-
- while (isdigit(*d)) {
- val *= 10;
- if (val < 0)
- goto longlong_overflow;
- val += *d - '0';
- if (val < 0)
- goto longlong_overflow;
- d++;
- }
-
- *o = [NSNumber numberWithLongLong:negate ? -val : val];
- return YES;
-
- } else {
- // jumped to by simple branch, if an overflow occured
- longlong_overflow:;
-
- id str = [[NSString alloc] initWithBytesNoCopy:(char*)ns
- length:c - ns
- encoding:NSUTF8StringEncoding
- freeWhenDone:NO];
- [str autorelease];
- if (str && (*o = [NSDecimalNumber decimalNumberWithString:str]))
- return YES;
-
- [self addErrorWithCode:EPARSENUM description: @"Failed creating decimal instance"];
- return NO;
- }
-}
-
-- (BOOL)scanIsAtEnd
-{
- skipWhitespace(c);
- return !*c;
-}
-
-
-@end
View
127 Json/SBJsonWriter.h
@@ -1,127 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import <Foundation/Foundation.h>
-#import "SBJsonBase.h"
-
-/**
- @brief The JSON writer class.
-
- Objective-C types are mapped to JSON types in the following way:
-
- @li NSNull -> Null
- @li NSString -> String
- @li NSArray -> Array
- @li NSDictionary -> Object
- @li NSNumber (-initWithBool:) -> Boolean
- @li NSNumber -> Number
-
- In JSON the keys of an object must be strings. NSDictionary keys need
- not be, but attempting to convert an NSDictionary with non-string keys
- into JSON will throw an exception.
-
- NSNumber instances created with the +initWithBool: method are
- converted into the JSON boolean "true" and "false" values, and vice
- versa. Any other NSNumber instances are converted to a JSON number the
- way you would expect.
-
- */
-@interface SBJsonWriter : SBJsonBase {
-
-@private
- BOOL sortKeys, humanReadable;
-}
-
-/**
- @brief Whether we are generating human-readable (multiline) JSON.
-
- Set whether or not to generate human-readable JSON. The default is NO, which produces
- JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable
- JSON with linebreaks after each array value and dictionary key/value pair, indented two
- spaces per nesting level.
- */
-@property BOOL humanReadable;
-
-/**
- @brief Whether or not to sort the dictionary keys in the output.
-
- If this is set to YES, the dictionary keys in the JSON output will be in sorted order.
- (This is useful if you need to compare two structures, for example.) The default is NO.
- */
-@property BOOL sortKeys;
-
-/**
- @brief Return JSON representation (or fragment) for the given object.
-
- Returns a string containing JSON representation of the passed in value, or nil on error.
- If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error.
-
- @param value any instance that can be represented as a JSON fragment
-
- */
-- (NSString*)stringWithObject:(id)value;
-
-/**
- @brief Return JSON representation (or fragment) for the given object.
-
- Returns a string containing JSON representation of the passed in value, or nil on error.
- If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error.
-
- @param value any instance that can be represented as a JSON fragment
- @param error pointer to object to be populated with NSError on failure
-
- */- (NSString*)stringWithObject:(id)value
- error:(NSError**)error;
-
-
-@end
-
-/**
- @brief Allows generation of JSON for otherwise unsupported classes.
-
- If you have a custom class that you want to create a JSON representation for you can implement
- this method in your class. It should return a representation of your object defined
- in terms of objects that can be translated into JSON. For example, a Person
- object might implement it like this:
-
- @code
- - (id)proxyForJson {
- return [NSDictionary dictionaryWithObjectsAndKeys:
- name, @"name",
- phone, @"phone",
- email, @"email",
- nil];
- }
- @endcode
-
- */
-@interface NSObject (SBProxyForJson)
-- (id)proxyForJson;
-@end
-
View
239 Json/SBJsonWriter.m
@@ -1,239 +0,0 @@
-/*
- Copyright (C) 2009 Stig Brautaset. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * 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.
-
- * Neither the name of the author nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
- 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.
- */
-
-#import "SBJsonWriter.h"
-
-@interface SBJsonWriter ()
-
-- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json;
-- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json;
-- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json;
-- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json;
-
-- (NSString*)indent;
-
-@end
-
-@implementation SBJsonWriter
-
-@synthesize sortKeys;
-@synthesize humanReadable;
-
-static NSMutableCharacterSet *kEscapeChars;
-
-+ (void)initialize {
- kEscapeChars = [[NSMutableCharacterSet characterSetWithRange: NSMakeRange(0,32)] retain];
- [kEscapeChars addCharactersInString: @"\"\\"];
-}
-
-- (NSString*)stringWithObject:(id)value {
- [self clearErrorTrace];
-
- if ([value isKindOfClass:[NSDictionary class]] || [value isKindOfClass:[NSArray class]]) {
- depth = 0;
- NSMutableString *json = [NSMutableString stringWithCapacity:128];
- if ([self appendValue:value into:json])
- return json;
- }
-
- if ([value respondsToSelector:@selector(proxyForJson)]) {
- NSString *tmp = [self stringWithObject:[value proxyForJson]];
- if (tmp)
- return tmp;
- }
-
- [self addErrorWithCode:EFRAGMENT description:@"Not valid type for JSON"];
- return nil;
-}
-
-- (NSString*)stringWithObject:(id)value error:(NSError**)error {
- NSString *tmp = [self stringWithObject:value];
- if (tmp)
- return tmp;
-
- if (error)
- *error = [self.errorTrace lastObject];
- return nil;
-}
-
-- (NSString*)indent {
- return [@"\n" stringByPaddingToLength:1 + 2 * depth withString:@" " startingAtIndex:0];
-}
-
-- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json {
- if ([fragment isKindOfClass:[NSDictionary class]]) {
- if (![self appendDictionary:fragment into:json])
- return NO;
-
- } else if ([fragment isKindOfClass:[NSArray class]]) {
- if (![self appendArray:fragment into:json])
- return NO;
-
- } else if ([fragment isKindOfClass:[NSString class]]) {
- if (![self appendString:fragment into:json])
- return NO;
-
- } else if ([fragment isKindOfClass:[NSNumber class]]) {
- if ('c' == *[fragment objCType]) {
- [json appendString:[fragment boolValue] ? @"true" : @"false"];
- } else if ([fragment isEqualToNumber:(NSNumber*)kCFNumberNaN]) {
- [self addErrorWithCode:EUNSUPPORTED description:@"NaN is not a valid number in JSON"];
- return NO;
-
- } else if (isinf([fragment doubleValue])) {
- [self addErrorWithCode:EUNSUPPORTED description:@"Infinity is not a valid number in JSON"];
- return NO;
-
- } else {
- [json appendString:[fragment stringValue]];
- }
- } else if ([fragment isKindOfClass:[NSNull class]]) {
- [json appendString:@"null"];
- } else if ([fragment respondsToSelector:@selector(proxyForJson)]) {
- [self appendValue:[fragment proxyForJson] into:json];
-
- } else {
- [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"JSON serialisation not supported for %@", [fragment class]]];
- return NO;
- }
- return YES;
-}
-
-- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json {
- if (maxDepth && ++depth > maxDepth) {
- [self addErrorWithCode:EDEPTH description: @"Nested too deep"];
- return NO;
- }
- [json appendString:@"["];
-
- BOOL addComma = NO;
- for (id value in fragment) {
- if (addComma)
- [json appendString:@","];
- else
- addComma = YES;
-
- if ([self humanReadable])
- [json appendString:[self indent]];
-
- if (![self appendValue:value into:json]) {
- return NO;
- }
- }
-
- depth--;
- if ([self humanReadable] && [fragment count])
- [json appendString:[self indent]];
- [json appendString:@"]"];
- return YES;
-}
-
-- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json {
- if (maxDepth && ++depth > maxDepth) {
- [self addErrorWithCode:EDEPTH description: @"Nested too deep"];
- return NO;
- }
- [json appendString:@"{"];
-
- NSString *colon = [self humanReadable] ? @" : " : @":";
- BOOL addComma = NO;
- NSArray *keys = [fragment allKeys];
- if (self.sortKeys)
- keys = [keys sortedArrayUsingSelector:@selector(compare:)];
-
- for (id value in keys) {
- if (addComma)
- [json appendString:@","];
- else
- addComma = YES;
-
- if ([self humanReadable])
- [json appendString:[self indent]];
-
- if (![value isKindOfClass:[NSString class]]) {
- [self addErrorWithCode:EUNSUPPORTED description: @"JSON object key must be string"];
- return NO;
- }
-
- if (![self appendString:value into:json])
- return NO;
-
- [json appendString:colon];
- if (![self appendValue:[fragment objectForKey:value] into:json]) {
- [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"Unsupported value for key %@ in object", value]];
- return NO;
- }
- }
-
- depth--;
- if ([self humanReadable] && [fragment count])
- [json appendString:[self indent]];
- [json appendString:@"}"];
- return YES;
-}
-
-- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json {
-
- [json appendString:@"\""];
-
- NSRange esc = [fragment rangeOfCharacterFromSet:kEscapeChars];
- if ( !esc.length ) {
- // No special chars -- can just add the raw string:
- [json appendString:fragment];
-
- } else {
- NSUInteger length = [fragment length];
- for (NSUInteger i = 0; i < length; i++) {
- unichar uc = [fragment characterAtIndex:i];
- switch (uc) {
- case '"': [json appendString:@"\\\""]; break;
- case '\\': [json appendString:@"\\\\"]; break;
- case '\t': [json appendString:@"\\t"]; break;
- case '\n': [json appendString:@"\\n"]; break;
- case '\r': [json appendString:@"\\r"]; break;
- case '\b': [json appendString:@"\\b"]; break;
- case '\f': [json appendString:@"\\f"]; break;
- default:
- if (uc < 0x20) {
- [json appendFormat:@"\\u%04x", uc];
- } else {
- CFStringAppendCharacters((CFMutableStringRef)json, &uc, 1);
- }
- break;
-
- }
- }
- }
-
- [json appendString:@"\""];
- return YES;
-}
-
-
-@end
View
568 Telepath.xcodeproj/project.pbxproj
@@ -7,316 +7,415 @@
objects = {
/* Begin PBXBuildFile section */
- C83AE59715CB851B0093D5F7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C83AE59615CB851B0093D5F7 /* Cocoa.framework */; };
- C83AE5A115CB851B0093D5F7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C83AE59F15CB851B0093D5F7 /* InfoPlist.strings */; };
- C83AE5A315CB851B0093D5F7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C83AE5A215CB851B0093D5F7 /* main.m */; };
- C83AE5AA15CB851B0093D5F7 /* QMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C83AE5A915CB851B0093D5F7 /* QMAppDelegate.m */; };
- C83AE5AD15CB851B0093D5F7 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C83AE5AB15CB851B0093D5F7 /* MainMenu.xib */; };
- C83AE5C715CB886E0093D5F7 /* Icon.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C83AE5C615CB886E0093D5F7 /* Icon.jpg */; };
- C85CA14D15CC80FA00ACB134 /* NSObject+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = C85CA14415CC80FA00ACB134 /* NSObject+SBJSON.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C85CA14E15CC80FA00ACB134 /* NSString+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = C85CA14615CC80FA00ACB134 /* NSString+SBJSON.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C85CA14F15CC80FA00ACB134 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = C85CA14815CC80FA00ACB134 /* SBJsonBase.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C85CA15015CC80FA00ACB134 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C85CA14A15CC80FA00ACB134 /* SBJsonParser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C85CA15115CC80FA00ACB134 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = C85CA14C15CC80FA00ACB134 /* SBJsonWriter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C894E8B41637162D0055F66A /* smslib.m in Sources */ = {isa = PBXBuildFile; fileRef = C894E8B21637162D0055F66A /* smslib.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C894E8B61637172A0055F66A /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C894E8B51637172A0055F66A /* IOKit.framework */; };
- C89D4BA7163765DC004EDE38 /* FXWilhelm.caf in Resources */ = {isa = PBXBuildFile; fileRef = C89D4BA6163765DC004EDE38 /* FXWilhelm.caf */; };
- C8B8C93216372537009B9876 /* QMLightSensor.m in Sources */ = {isa = PBXBuildFile; fileRef = C8B8C93116372537009B9876 /* QMLightSensor.m */; };
- C8C421CF162F369A0097C124 /* ImageSnap.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C421CE162F369A0097C124 /* ImageSnap.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
- C8C421D5162F3B580097C124 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8C421D4162F3B580097C124 /* QTKit.framework */; };
- C8C421D7162F3B710097C124 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8C421D6162F3B710097C124 /* Quartz.framework */; };
- C8C421D9162F3B810097C124 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8C421D8162F3B810097C124 /* CoreFoundation.framework */; };
- C8F39355163B2186004B47AA /* FXTam.caf in Resources */ = {isa = PBXBuildFile; fileRef = C8F39350163B2186004B47AA /* FXTam.caf */; };
- C8F39356163B2186004B47AA /* FXToms.caf in Resources */ = {isa = PBXBuildFile; fileRef = C8F39351163B2186004B47AA /* FXToms.caf */; };
- C8F39357163B2186004B47AA /* FXSnare.caf in Resources */ = {isa = PBXBuildFile; fileRef = C8F39352163B2186004B47AA /* FXSnare.caf */; };
- C8F39358163B2186004B47AA /* FXKick.caf in Resources */ = {isa = PBXBuildFile; fileRef = C8F39353163B2186004B47AA /* FXKick.caf */; };
- C8F39359163B2186004B47AA /* FXHihat.caf in Resources */ = {isa = PBXBuildFile; fileRef = C8F39354163B2186004B47AA /* FXHihat.caf */; };
- C8F3935B163B3357004B47AA /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C83AE59915CB851B0093D5F7 /* AppKit.framework */; };
+ C8F6325917D1053800330DFD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8F6325817D1053800330DFD /* Cocoa.framework */; };
+ C8F6326317D1053800330DFD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C8F6326117D1053800330DFD /* InfoPlist.strings */; };
+ C8F6326517D1053800330DFD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F6326417D1053800330DFD /* main.m */; };
+ C8F6326917D1053800330DFD /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = C8F6326717D1053800330DFD /* Credits.rtf */; };
+ C8F6326C17D1053800330DFD /* TPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F6326B17D1053800330DFD /* TPAppDelegate.m */; };
+ C8F6326F17D1053800330DFD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C8F6326D17D1053800330DFD /* MainMenu.xib */; };
+ C8F6327217D1053800330DFD /* Telepath.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C8F6327017D1053800330DFD /* Telepath.xcdatamodeld */; };
+ C8F6327417D1053800330DFD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C8F6327317D1053800330DFD /* Images.xcassets */; };
+ C8F6327B17D1053800330DFD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8F6327A17D1053800330DFD /* XCTest.framework */; };
+ C8F6327C17D1053800330DFD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8F6325817D1053800330DFD /* Cocoa.framework */; };
+ C8F6328417D1053800330DFD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C8F6328217D1053800330DFD /* InfoPlist.strings */; };
+ C8F6328617D1053800330DFD /* TelepathTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F6328517D1053800330DFD /* TelepathTests.m */; };
+ C8F6329017D1057D00330DFD /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8F6328F17D1057D00330DFD /* QTKit.framework */; };
+ C8F6329417D1074200330DFD /* TPHUDWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F6329217D1074200330DFD /* TPHUDWindowController.m */; };
+ C8F6329517D1074200330DFD /* TPHUDWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C8F6329317D1074200330DFD /* TPHUDWindowController.xib */; };
+ C8F6329817D109C200330DFD /* TPLightSensor.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F6329717D109C200330DFD /* TPLightSensor.m */; };
+ C8F6329C17D10C3C00330DFD /* ImageSnap.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F6329B17D10C3C00330DFD /* ImageSnap.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ C8F632A517D26AD600330DFD /* TPTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632A417D26AD600330DFD /* TPTracker.m */; };
+ C8F632A817D26B8700330DFD /* TPTrackerKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632A717D26B8700330DFD /* TPTrackerKeyboard.m */; };
+ C8F632AB17D26B9000330DFD /* TPTrackerMouse.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632AA17D26B9000330DFD /* TPTrackerMouse.m */; };
+ C8F632AE17D26B9A00330DFD /* TPTrackerWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632AD17D26B9A00330DFD /* TPTrackerWindow.m */; };
+ C8F632B117D26BA800330DFD /* TPTrackerLight.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632B017D26BA800330DFD /* TPTrackerLight.m */; };
+ C8F632B417D26BC400330DFD /* TPTrackerCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632B317D26BC400330DFD /* TPTrackerCamera.m */; };
+ C8F632B817D26D8B00330DFD /* TPUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F632B717D26D8B00330DFD /* TPUtilities.m */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ C8F6327D17D1053800330DFD /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = C8F6324D17D1053700330DFD /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = C8F6325417D1053800330DFD;
+ remoteInfo = Telepath;
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
- C83AE59215CB851B0093D5F7 /* Telepath.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Telepath.app; sourceTree = BUILT_PRODUCTS_DIR; };
- C83AE59615CB851B0093D5F7 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
- C83AE59915CB851B0093D5F7 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
- C83AE59A15CB851B0093D5F7 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
- C83AE59B15CB851B0093D5F7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- C83AE59E15CB851B0093D5F7 /* Telepath-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Telepath-Info.plist"; sourceTree = "<group>"; };
- C83AE5A015CB851B0093D5F7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- C83AE5A215CB851B0093D5F7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- C83AE5A415CB851B0093D5F7 /* Telepath-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Telepath-Prefix.pch"; sourceTree = "<group>"; };
- C83AE5A815CB851B0093D5F7 /* QMAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QMAppDelegate.h; sourceTree = "<group>"; };
- C83AE5A915CB851B0093D5F7 /* QMAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QMAppDelegate.m; sourceTree = "<group>"; };
- C83AE5AC15CB851B0093D5F7 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
- C83AE5C615CB886E0093D5F7 /* Icon.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Icon.jpg; sourceTree = "<group>"; };
- C85CA14215CC80FA00ACB134 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = "<group>"; };
- C85CA14315CC80FA00ACB134 /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = "<group>"; };
- C85CA14415CC80FA00ACB134 /* NSObject+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SBJSON.m"; sourceTree = "<group>"; };
- C85CA14515CC80FA00ACB134 /* NSString+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SBJSON.h"; sourceTree = "<group>"; };
- C85CA14615CC80FA00ACB134 /* NSString+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SBJSON.m"; sourceTree = "<group>"; };
- C85CA14715CC80FA00ACB134 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonBase.h; sourceTree = "<group>"; };
- C85CA14815CC80FA00ACB134 /* SBJsonBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonBase.m; sourceTree = "<group>"; };
- C85CA14915CC80FA00ACB134 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = "<group>"; };
- C85CA14A15CC80FA00ACB134 /* SBJsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonParser.m; sourceTree = "<group>"; };
- C85CA14B15CC80FA00ACB134 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = "<group>"; };
- C85CA14C15CC80FA00ACB134 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = "<group>"; };
- C894E8B21637162D0055F66A /* smslib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = smslib.m; sourceTree = "<group>"; };
- C894E8B31637162D0055F66A /* smslib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smslib.h; sourceTree = "<group>"; };
- C894E8B51637172A0055F66A /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
- C89D4BA6163765DC004EDE38 /* FXWilhelm.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FXWilhelm.caf; path = Resources/FXWilhelm.caf; sourceTree = "<group>"; };
- C8B8C93016372537009B9876 /* QMLightSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMLightSensor.h; path = Classes/QMLightSensor.h; sourceTree = "<group>"; };
- C8B8C93116372537009B9876 /* QMLightSensor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMLightSensor.m; path = Classes/QMLightSensor.m; sourceTree = "<group>"; };
- C8C421CD162F369A0097C124 /* ImageSnap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImageSnap.h; path = Classes/ImageSnap.h; sourceTree = "<group>"; };
- C8C421CE162F369A0097C124 /* ImageSnap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImageSnap.m; path = Classes/ImageSnap.m; sourceTree = "<group>"; };
- C8C421D4162F3B580097C124 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
- C8C421D6162F3B710097C124 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
- C8C421D8162F3B810097C124 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
- C8F39350163B2186004B47AA /* FXTam.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FXTam.caf; path = Resources/FXTam.caf; sourceTree = "<group>"; };
- C8F39351163B2186004B47AA /* FXToms.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FXToms.caf; path = Resources/FXToms.caf; sourceTree = "<group>"; };
- C8F39352163B2186004B47AA /* FXSnare.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FXSnare.caf; path = Resources/FXSnare.caf; sourceTree = "<group>"; };
- C8F39353163B2186004B47AA /* FXKick.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FXKick.caf; path = Resources/FXKick.caf; sourceTree = "<group>"; };
- C8F39354163B2186004B47AA /* FXHihat.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FXHihat.caf; path = Resources/FXHihat.caf; sourceTree = "<group>"; };
+ C8F6325517D1053800330DFD /* Telepath.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Telepath.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ C8F6325817D1053800330DFD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ C8F6325B17D1053800330DFD /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ C8F6325C17D1053800330DFD /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ C8F6325D17D1053800330DFD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ C8F6326017D1053800330DFD /* Telepath-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Telepath-Info.plist"; sourceTree = "<group>"; };
+ C8F6326217D1053800330DFD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ C8F6326417D1053800330DFD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ C8F6326617D1053800330DFD /* Telepath-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Telepath-Prefix.pch"; sourceTree = "<group>"; };
+ C8F6326817D1053800330DFD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
+ C8F6326A17D1053800330DFD /* TPAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TPAppDelegate.h; sourceTree = "<group>"; };
+ C8F6326B17D1053800330DFD /* TPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TPAppDelegate.m; sourceTree = "<group>"; };
+ C8F6326E17D1053800330DFD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ C8F6327117D1053800330DFD /* Telepath.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Telepath.xcdatamodel; sourceTree = "<group>"; };
+ C8F6327317D1053800330DFD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+ C8F6327917D1053800330DFD /* TelepathTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TelepathTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ C8F6327A17D1053800330DFD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
+ C8F6328117D1053800330DFD /* TelepathTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TelepathTests-Info.plist"; sourceTree = "<group>"; };
+ C8F6328317D1053800330DFD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ C8F6328517D1053800330DFD /* TelepathTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TelepathTests.m; sourceTree = "<group>"; };
+ C8F6328F17D1057D00330DFD /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
+ C8F6329117D1074200330DFD /* TPHUDWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPHUDWindowController.h; sourceTree = "<group>"; };
+ C8F6329217D1074200330DFD /* TPHUDWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPHUDWindowController.m; sourceTree = "<group>"; };
+ C8F6329317D1074200330DFD /* TPHUDWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TPHUDWindowController.xib; sourceTree = "<group>"; };
+ C8F6329617D109C200330DFD /* TPLightSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPLightSensor.h; sourceTree = "<group>"; };
+ C8F6329717D109C200330DFD /* TPLightSensor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPLightSensor.m; sourceTree = "<group>"; };
+ C8F6329A17D10C3C00330DFD /* ImageSnap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSnap.h; sourceTree = "<group>"; };
+ C8F6329B17D10C3C00330DFD /* ImageSnap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageSnap.m; sourceTree = "<group>"; };
+ C8F632A317D26AD600330DFD /* TPTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPTracker.h; sourceTree = "<group>"; };
+ C8F632A417D26AD600330DFD /* TPTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPTracker.m; sourceTree = "<group>"; };
+ C8F632A617D26B8700330DFD /* TPTrackerKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPTrackerKeyboard.h; sourceTree = "<group>"; };
+ C8F632A717D26B8700330DFD /* TPTrackerKeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPTrackerKeyboard.m; sourceTree = "<group>"; };
+ C8F632A917D26B9000330DFD /* TPTrackerMouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPTrackerMouse.h; sourceTree = "<group>"; };
+ C8F632AA17D26B9000330DFD /* TPTrackerMouse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPTrackerMouse.m; sourceTree = "<group>"; };
+ C8F632AC17D26B9A00330DFD /* TPTrackerWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPTrackerWindow.h; sourceTree = "<group>"; };
+ C8F632AD17D26B9A00330DFD /* TPTrackerWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPTrackerWindow.m; sourceTree = "<group>"; };
+ C8F632AF17D26BA800330DFD /* TPTrackerLight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPTrackerLight.h; sourceTree = "<group>"; };
+ C8F632B017D26BA800330DFD /* TPTrackerLight.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPTrackerLight.m; sourceTree = "<group>"; };
+ C8F632B217D26BC400330DFD /* TPTrackerCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPTrackerCamera.h; sourceTree = "<group>"; };
+ C8F632B317D26BC400330DFD /* TPTrackerCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPTrackerCamera.m; sourceTree = "<group>"; };
+ C8F632B617D26D8B00330DFD /* TPUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPUtilities.h; sourceTree = "<group>"; };
+ C8F632B717D26D8B00330DFD /* TPUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TPUtilities.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- C83AE58F15CB851B0093D5F7 /* Frameworks */ = {
+ C8F6325217D1053800330DFD /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C8F6329017D1057D00330DFD /* QTKit.framework in Frameworks */,
+ C8F6325917D1053800330DFD /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C8F6327617D1053800330DFD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- C8F3935B163B3357004B47AA /* AppKit.framework in Frameworks */,
- C894E8B61637172A0055F66A /* IOKit.framework in Frameworks */,
- C8C421D9162F3B810097C124 /* CoreFoundation.framework in Frameworks */,
- C8C421D7162F3B710097C124 /* Quartz.framework in Frameworks */,
- C8C421D5162F3B580097C124 /* QTKit.framework in Frameworks */,
- C83AE59715CB851B0093D5F7 /* Cocoa.framework in Frameworks */,
+ C8F6327C17D1053800330DFD /* Cocoa.framework in Frameworks */,
+ C8F6327B17D1053800330DFD /* XCTest.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- C83AE58715CB851B0093D5F7 = {
+ C8F6324C17D1053700330DFD = {
isa = PBXGroup;
children = (
- C83AE5C615CB886E0093D5F7 /* Icon.jpg */,
- C83AE59C15CB851B0093D5F7 /* Telepath */,
- C89D4BA4163765D1004EDE38 /* Resources */,
- C83AE59515CB851B0093D5F7 /* Frameworks */,
- C83AE59315CB851B0093D5F7 /* Products */,
+ C8F6325E17D1053800330DFD /* Telepath */,
+ C8F6327F17D1053800330DFD /* TelepathTests */,
+ C8F6325717D1053800330DFD /* Frameworks */,
+ C8F6325617D1053800330DFD /* Products */,
);
sourceTree = "<group>";
};
- C83AE59315CB851B0093D5F7 /* Products */ = {
+ C8F6325617D1053800330DFD /* Products */ = {
isa = PBXGroup;
children = (
- C83AE59215CB851B0093D5F7 /* Telepath.app */,
+ C8F6325517D1053800330DFD /* Telepath.app */,
+ C8F6327917D1053800330DFD /* TelepathTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
- C83AE59515CB851B0093D5F7 /* Frameworks */ = {
+ C8F6325717D1053800330DFD /* Frameworks */ = {
isa = PBXGroup;
children = (
- C894E8B51637172A0055F66A /* IOKit.framework */,
- C83AE59615CB851B0093D5F7 /* Cocoa.framework */,
- C8C421D4162F3B580097C124 /* QTKit.framework */,
- C8C421D6162F3B710097C124 /* Quartz.framework */,
- C8C421D8162F3B810097C124 /* CoreFoundation.framework */,
- C83AE59815CB851B0093D5F7 /* Other Frameworks */,
+ C8F6328F17D1057D00330DFD /* QTKit.framework */,
+ C8F6325817D1053800330DFD /* Cocoa.framework */,
+ C8F6327A17D1053800330DFD /* XCTest.framework */,
+ C8F6325A17D1053800330DFD /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
- C83AE59815CB851B0093D5F7 /* Other Frameworks */ = {
+ C8F6325A17D1053800330DFD /* Other Frameworks */ = {
isa = PBXGroup;
children = (
- C83AE59915CB851B0093D5F7 /* AppKit.framework */,
- C83AE59A15CB851B0093D5F7 /* CoreData.framework */,
- C83AE59B15CB851B0093D5F7 /* Foundation.framework */,
+ C8F6325B17D1053800330DFD /* AppKit.framework */,
+ C8F6325C17D1053800330DFD /* CoreData.framework */,
+ C8F6325D17D1053800330DFD /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
- C83AE59C15CB851B0093D5F7 /* Telepath */ = {
+ C8F6325E17D1053800330DFD /* Telepath */ = {
isa = PBXGroup;
children = (
- C8C421CB162F367B0097C124 /* Classes */,
- C83AE5A815CB851B0093D5F7 /* QMAppDelegate.h */,
- C83AE5A915CB851B0093D5F7 /* QMAppDelegate.m */,
- C83AE5AB15CB851B0093D5F7 /* MainMenu.xib */,
- C83AE59D15CB851B0093D5F7 /* Supporting Files */,
+ C8F6329917D10C2B00330DFD /* Third Party */,
+ C8F632B517D26BDA00330DFD /* Trackers */,
+ C8F6326A17D1053800330DFD /* TPAppDelegate.h */,
+ C8F6326B17D1053800330DFD /* TPAppDelegate.m */,
+ C8F6326D17D1053800330DFD /* MainMenu.xib */,
+ C8F6329117D1074200330DFD /* TPHUDWindowController.h */,
+ C8F6329217D1074200330DFD /* TPHUDWindowController.m */,
+ C8F6329317D1074200330DFD /* TPHUDWindowController.xib */,
+ C8F6329617D109C200330DFD /* TPLightSensor.h */,
+ C8F6329717D109C200330DFD /* TPLightSensor.m */,
+ C8F632B617D26D8B00330DFD /* TPUtilities.h */,
+ C8F632B717D26D8B00330DFD /* TPUtilities.m */,
+ C8F6327317D1053800330DFD /* Images.xcassets */,
+ C8F6327017D1053800330DFD /* Telepath.xcdatamodeld */,
+ C8F6325F17D1053800330DFD /* Supporting Files */,
);
path = Telepath;
sourceTree = "<group>";
};
- C83AE59D15CB851B0093D5F7 /* Supporting Files */ = {
+ C8F6325F17D1053800330DFD /* Supporting Files */ = {
isa = PBXGroup;
children = (
- C85CA14115CC80FA00ACB134 /* Json */,
- C83AE59E15CB851B0093D5F7 /* Telepath-Info.plist */,
- C83AE59F15CB851B0093D5F7 /* InfoPlist.strings */,
- C83AE5A215CB851B0093D5F7 /* main.m */,
- C83AE5A415CB851B0093D5F7 /* Telepath-Prefix.pch */,
+ C8F6326017D1053800330DFD /* Telepath-Info.plist */,
+ C8F6326117D1053800330DFD /* InfoPlist.strings */,
+ C8F6326417D1053800330DFD /* main.m */,
+ C8F6326617D1053800330DFD /* Telepath-Prefix.pch */,
+ C8F6326717D1053800330DFD /* Credits.rtf */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
- C85CA14115CC80FA00ACB134 /* Json */ = {
+ C8F6327F17D1053800330DFD /* TelepathTests */ = {
isa = PBXGroup;
children = (
- C85CA14215CC80FA00ACB134 /* JSON.h */,
- C85CA14315CC80FA00ACB134 /* NSObject+SBJSON.h */,
- C85CA14415CC80FA00ACB134 /* NSObject+SBJSON.m */,
- C85CA14515CC80FA00ACB134 /* NSString+SBJSON.h */,
- C85CA14615CC80FA00ACB134 /* NSString+SBJSON.m */,
- C85CA14715CC80FA00ACB134 /* SBJsonBase.h */,
- C85CA14815CC80FA00ACB134 /* SBJsonBase.m */,
- C85CA14915CC80FA00ACB134 /* SBJsonParser.h */,
- C85CA14A15CC80FA00ACB134 /* SBJsonParser.m */,
- C85CA14B15CC80FA00ACB134 /* SBJsonWriter.h */,
- C85CA14C15CC80FA00ACB134 /* SBJsonWriter.m */,
- );
- path = Json;
- sourceTree = SOURCE_ROOT;
- };
- C89D4BA4163765D1004EDE38 /* Resources */ = {
+ C8F6328517D1053800330DFD /* TelepathTests.m */,
+ C8F6328017D1053800330DFD /* Supporting Files */,
+ );
+ path = TelepathTests;
+ sourceTree = "<group>";
+ };
+ C8F6328017D1053800330DFD /* Supporting Files */ = {
isa = PBXGroup;
children = (
- C89D4BA6163765DC004EDE38 /* FXWilhelm.caf */,
- C8F39350163B2186004B47AA /* FXTam.caf */,
- C8F39351163B2186004B47AA /* FXToms.caf */,
- C8F39352163B2186004B47AA /* FXSnare.caf */,
- C8F39353163B2186004B47AA /* FXKick.caf */,
- C8F39354163B2186004B47AA /* FXHihat.caf */,
- );
- name = Resources;
- path = Telepath;
+ C8F6328117D1053800330DFD /* TelepathTests-Info.plist */,
+ C8F6328217D1053800330DFD /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
sourceTree = "<group>";
};
- C8C421CB162F367B0097C124 /* Classes */ = {
+ C8F6329917D10C2B00330DFD /* Third Party */ = {
isa = PBXGroup;
children = (
- C894E8B31637162D0055F66A /* smslib.h */,
- C894E8B21637162D0055F66A /* smslib.m */,
- C8B8C93016372537009B9876 /* QMLightSensor.h */,
- C8B8C93116372537009B9876 /* QMLightSensor.m */,
- C8C421CD162F369A0097C124 /* ImageSnap.h */,
- C8C421CE162F369A0097C124 /* ImageSnap.m */,
- );
- name = Classes;
+ C8F6329A17D10C3C00330DFD /* ImageSnap.h */,
+ C8F6329B17D10C3C00330DFD /* ImageSnap.m */,
+ );
+ name = "Third Party";
+ sourceTree = "<group>";
+ };
+ C8F632B517D26BDA00330DFD /* Trackers */ = {
+ isa = PBXGroup;
+ children = (
+ C8F632A317D26AD600330DFD /* TPTracker.h */,
+ C8F632A417D26AD600330DFD /* TPTracker.m */,
+ C8F632A617D26B8700330DFD /* TPTrackerKeyboard.h */,
+ C8F632A717D26B8700330DFD /* TPTrackerKeyboard.m */,
+ C8F632A917D26B9000330DFD /* TPTrackerMouse.h */,
+ C8F632AA17D26B9000330DFD /* TPTrackerMouse.m */,
+ C8F632AC17D26B9A00330DFD /* TPTrackerWindow.h */,
+ C8F632AD17D26B9A00330DFD /* TPTrackerWindow.m */,
+ C8F632AF17D26BA800330DFD /* TPTrackerLight.h */,
+ C8F632B017D26BA800330DFD /* TPTrackerLight.m */,
+ C8F632B217D26BC400330DFD /* TPTrackerCamera.h */,
+ C8F632B317D26BC400330DFD /* TPTrackerCamera.m */,
+ );
+ name = Trackers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
- C83AE59115CB851B0093D5F7 /* Telepath */ = {
+ C8F6325417D1053800330DFD /* Telepath */ = {
isa = PBXNativeTarget;
- buildConfigurationList = C83AE5B015CB851B0093D5F7 /* Build configuration list for PBXNativeTarget "Telepath" */;
+ buildConfigurationList = C8F6328917D1053800330DFD /* Build configuration list for PBXNativeTarget "Telepath" */;
buildPhases = (
- C83AE58E15CB851B0093D5F7 /* Sources */,
- C83AE58F15CB851B0093D5F7 /* Frameworks */,
- C83AE59015CB851B0093D5F7 /* Resources */,
+ C8F6325117D1053800330DFD /* Sources */,
+ C8F6325217D1053800330DFD /* Frameworks */,
+ C8F6325317D1053800330DFD /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Telepath;
productName = Telepath;
- productReference = C83AE59215CB851B0093D5F7 /* Telepath.app */;
+ productReference = C8F6325517D1053800330DFD /* Telepath.app */;
productType = "com.apple.product-type.application";
};
+ C8F6327817D1053800330DFD /* TelepathTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C8F6328C17D1053800330DFD /* Build configuration list for PBXNativeTarget "TelepathTests" */;
+ buildPhases = (
+ C8F6327517D1053800330DFD /* Sources */,
+ C8F6327617D1053800330DFD /* Frameworks */,
+ C8F6327717D1053800330DFD /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ C8F6327E17D1053800330DFD /* PBXTargetDependency */,
+ );
+ name = TelepathTests;
+ productName = TelepathTests;
+ productReference = C8F6327917D1053800330DFD /* TelepathTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
- C83AE58915CB851B0093D5F7 /* Project object */ = {
+ C8F6324D17D1053700330DFD /* Project object */ = {
isa = PBXProject;
attributes = {
- CLASSPREFIX = QM;
- LastUpgradeCheck = 0450;
- ORGANIZATIONNAME = "Inkren, Inc";
+ CLASSPREFIX = TP;
+ LastUpgradeCheck = 0500;
+ ORGANIZATIONNAME = "Nick Winter";
+ TargetAttributes = {
+ C8F6327817D1053800330DFD = {
+ TestTargetID = C8F6325417D1053800330DFD;
+ };
+ };
};
- buildConfigurationList = C83AE58C15CB851B0093D5F7 /* Build configuration list for PBXProject "Telepath" */;
+ buildConfigurationList = C8F6325017D1053700330DFD /* Build configuration list for PBXProject "Telepath" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
+ Base,
);
- mainGroup = C83AE58715CB851B0093D5F7;
- productRefGroup = C83AE59315CB851B0093D5F7 /* Products */;
+ mainGroup = C8F6324C17D1053700330DFD;
+ productRefGroup = C8F6325617D1053800330DFD /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
- C83AE59115CB851B0093D5F7 /* Telepath */,
+ C8F6325417D1053800330DFD /* Telepath */,
+ C8F6327817D1053800330DFD /* TelepathTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
- C83AE59015CB851B0093D5F7 /* Resources */ = {
+ C8F6325317D1053800330DFD /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C8F6326317D1053800330DFD /* InfoPlist.strings in Resources */,
+ C8F6327417D1053800330DFD /* Images.xcassets in Resources */,
+ C8F6329517D1074200330DFD /* TPHUDWindowController.xib in Resources */,
+ C8F6326917D1053800330DFD /* Credits.rtf in Resources */,
+ C8F6326F17D1053800330DFD /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C8F6327717D1053800330DFD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- C83AE5A115CB851B0093D5F7 /* InfoPlist.strings in Resources */,
- C83AE5AD15CB851B0093D5F7 /* MainMenu.xib in Resources */,
- C83AE5C715CB886E0093D5F7 /* Icon.jpg in Resources */,
- C89D4BA7163765DC004EDE38 /* FXWilhelm.caf in Resources */,
- C8F39355163B2186004B47AA /* FXTam.caf in Resources */,
- C8F39356163B2186004B47AA /* FXToms.caf in Resources */,
- C8F39357163B2186004B47AA /* FXSnare.caf in Resources */,
- C8F39358163B2186004B47AA /* FXKick.caf in Resources */,
- C8F39359163B2186004B47AA /* FXHihat.caf in Resources */,
+ C8F6328417D1053800330DFD /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- C83AE58E15CB851B0093D5F7 /* Sources */ = {
+ C8F6325117D1053800330DFD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- C83AE5A315CB851B0093D5F7 /* main.m in Sources */,
- C83AE5AA15CB851B0093D5F7 /* QMAppDelegate.m in Sources */,
- C85CA14D15CC80FA00ACB134 /* NSObject+SBJSON.m in Sources */,
- C85CA14E15CC80FA00ACB134 /* NSString+SBJSON.m in Sources */,
- C85CA14F15CC80FA00ACB134 /* SBJsonBase.m in Sources */,
- C85CA15015CC80FA00ACB134 /* SBJsonParser.m in Sources */,
- C85CA15115CC80FA00ACB134 /* SBJsonWriter.m in Sources */,
- C8C421CF162F369A0097C124 /* ImageSnap.m in Sources */,
- C894E8B41637162D0055F66A /* smslib.m in Sources */,
- C8B8C93216372537009B9876 /* QMLightSensor.m in Sources */,
+ C8F6326C17D1053800330DFD /* TPAppDelegate.m in Sources */,
+ C8F6329C17D10C3C00330DFD /* ImageSnap.m in Sources */,
+ C8F6327217D1053800330DFD /* Telepath.xcdatamodeld in Sources */,
+ C8F632A517D26AD600330DFD /* TPTracker.m in Sources */,
+ C8F6326517D1053800330DFD /* main.m in Sources */,
+ C8F632B417D26BC400330DFD /* TPTrackerCamera.m in Sources */,
+ C8F632B817D26D8B00330DFD /* TPUtilities.m in Sources */,
+ C8F6329417D1074200330DFD /* TPHUDWindowController.m in Sources */,
+ C8F632AE17D26B9A00330DFD /* TPTrackerWindow.m in Sources */,
+ C8F632B117D26BA800330DFD /* TPTrackerLight.m in Sources */,
+ C8F6329817D109C200330DFD /* TPLightSensor.m in Sources */,
+ C8F632A817D26B8700330DFD /* TPTrackerKeyboard.m in Sources */,
+ C8F632AB17D26B9000330DFD /* TPTrackerMouse.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C8F6327517D1053800330DFD /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C8F6328617D1053800330DFD /* TelepathTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ C8F6327E17D1053800330DFD /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = C8F6325417D1053800330DFD /* Telepath */;
+ targetProxy = C8F6327D17D1053800330DFD /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin PBXVariantGroup section */
- C83AE59F15CB851B0093D5F7 /* InfoPlist.strings */ = {
+ C8F6326117D1053800330DFD /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
- C83AE5A015CB851B0093D5F7 /* en */,
+ C8F6326217D1053800330DFD /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
- C83AE5AB15CB851B0093D5F7 /* MainMenu.xib */ = {
+ C8F6326717D1053800330DFD /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ C8F6326817D1053800330DFD /* en */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+ C8F6326D17D1053800330DFD /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
- C83AE5AC15CB851B0093D5F7 /* en */,
+ C8F6326E17D1053800330DFD /* Base */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
+ C8F6328217D1053800330DFD /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ C8F6328317D1053800330DFD /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
- C83AE5AE15CB851B0093D5F7 /* Debug */ = {
+ C8F6328717D1053800330DFD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -327,40 +426,54 @@
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.6;
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
- C83AE5AF15CB851B0093D5F7 /* Release */ = {
+ C8F6328817D1053800330DFD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.6;
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
SDKROOT = macosx;
};
name = Release;
};
- C83AE5B115CB851B0093D5F7 /* Debug */ = {
+ C8F6328A17D1053800330DFD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Telepath/Telepath-Prefix.pch";
@@ -370,9 +483,10 @@
};
name = Debug;
};
- C83AE5B215CB851B0093D5F7 /* Release */ = {
+ C8F6328B17D1053800330DFD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Telepath/Telepath-Prefix.pch";
@@ -382,28 +496,90 @@
};
name = Release;
};
+ C8F6328D17D1053800330DFD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Telepath.app/Contents/MacOS/Telepath";
+ COMBINE_HIDPI_IMAGES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ "$(inherited)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Telepath/Telepath-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ INFOPLIST_FILE = "TelepathTests/TelepathTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Debug;
+ };
+ C8F6328E17D1053800330DFD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Telepath.app/Contents/MacOS/Telepath";
+ COMBINE_HIDPI_IMAGES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ "$(inherited)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Telepath/Telepath-Prefix.pch";
+ INFOPLIST_FILE = "TelepathTests/TelepathTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- C83AE58C15CB851B0093D5F7 /* Build configuration list for PBXProject "Telepath" */ = {
+ C8F6325017D1053700330DFD /* Build configuration list for PBXProject "Telepath" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- C83AE5AE15CB851B0093D5F7 /* Debug */,
- C83AE5AF15CB851B0093D5F7 /* Release */,
+ C8F6328717D1053800330DFD /* Debug */,
+ C8F6328817D1053800330DFD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- C83AE5B015CB851B0093D5F7 /* Build configuration list for PBXNativeTarget "Telepath" */ = {
+ C8F6328917D1053800330DFD /* Build configuration list for PBXNativeTarget "Telepath" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- C83AE5B115CB851B0093D5F7 /* Debug */,
- C83AE5B215CB851B0093D5F7 /* Release */,
+ C8F6328A17D1053800330DFD /* Debug */,
+ C8F6328B17D1053800330DFD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C8F6328C17D1053800330DFD /* Build configuration list for PBXNativeTarget "TelepathTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C8F6328D17D1053800330DFD /* Debug */,
+ C8F6328E17D1053800330DFD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+
+/* Begin XCVersionGroup section */
+ C8F6327017D1053800330DFD /* Telepath.xcdatamodeld */ = {
+ isa = XCVersionGroup;
+ children = (
+ C8F6327117D1053800330DFD /* Telepath.xcdatamodel */,
+ );
+ currentVersion = C8F6327117D1053800330DFD /* Telepath.xcdatamodel */;
+ path = Telepath.xcdatamodeld;
+ sourceTree = "<group>";
+ versionGroupType = wrapper.xcdatamodel;
+ };
+/* End XCVersionGroup section */
};
- rootObject = C83AE58915CB851B0093D5F7 /* Project object */;
+ rootObject = C8F6324D17D1053700330DFD /* Project object */;
}
View
653 Telepath/Base.lproj/MainMenu.xib
@@ -0,0 +1,653 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4504" systemVersion="12E55" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+ <dependencies>
+ <deployment defaultVersion="1080" identifier="macosx"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4504"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
+ <connections>
+ <outlet property="delegate" destination="494" id="495"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application"/>
+ <menu title="AMainMenu" systemMenu="main" id="29">
+ <items>
+ <menuItem title="Telepath" id="56">
+ <menu key="submenu" title="Telepath" systemMenu="apple" id="57">
+ <items>
+ <menuItem title="About Telepath" id="58">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="236">
+ <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+ </menuItem>
+ <menuItem title="Preferences…" keyEquivalent="," id="129"/>
+ <menuItem isSeparatorItem="YES" id="143">
+ <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+ </menuItem>
+ <menuItem title="Services" id="131">
+ <menu key="submenu" title="Services" systemMenu="services" id="130"/>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="144">
+ <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+ </menuItem>
+ <menuItem title="Hide Telepath" keyEquivalent="h" id="134">
+ <connections>
+ <action selector="hide:" target="-1" id="367"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Hide Others" keyEquivalent="h" id="145">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="hideOtherApplications:" target="-1" id="368"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Show All" id="150">
+ <connections>
+ <action selector="unhideAllApplications:" target="-1" id="370"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="149">
+ <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+ </menuItem>
+ <menuItem title="Quit Telepath" keyEquivalent="q" id="136">
+ <connections>
+ <action selector="terminate:" target="-3" id="449"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="File" id="83">
+ <menu key="submenu" title="File" id="81">
+ <items>
+ <menuItem title="New" keyEquivalent="n" id="82">
+ <connections>
+ <action selector="newDocument:" target="-1" id="373"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Open…" keyEquivalent="o" id="72">
+ <connections>
+ <action selector="openDocument:" target="-1" id="374"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Open Recent" id="124">
+ <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
+ <items>
+ <menuItem title="Clear Menu" id="126">
+ <connections>
+ <action selector="clearRecentDocuments:" target="-1" id="127"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="79">
+ <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+ </menuItem>
+ <menuItem title="Close" keyEquivalent="w" id="73">
+ <connections>
+ <action selector="performClose:" target="-1" id="193"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Save…" keyEquivalent="s" id="75">
+ <connections>
+ <action selector="saveDocument:" target="-1" id="362"/>
+ </connections>
+ </menuItem>
+ <