Permalink
Browse files

Get stuff into source control, not yet functional

  • Loading branch information...
0 parents commit aab35ba5a82184b9f315eaf5f7efe87064d549b9 @nparry committed Mar 3, 2009
@@ -0,0 +1,4 @@
+.DS_Store
+*.pbxuser
+*.mode1v3
+build/**/*
@@ -0,0 +1,12 @@
+#import <Cocoa/Cocoa.h>
+
+@interface AppController : NSObject {
+ IBOutlet NSTextField *gui_password;
+ BOOL syncInProgress;
+}
+
+@property BOOL syncInProgress;
+
+- (IBAction) syncNow:(id) sender;
+
+@end
@@ -0,0 +1,67 @@
+#import "AppController.h"
+#import "PasswordStorage.h"
+#import "BirthdaySyncer.h"
+#import "BirthdaySyncConstants.h"
+
+@interface AppController (Private)
+- (void) startSync;
+- (void) endSync:(BirthdaySyncer*)bs;
+@end
+
+@implementation AppController
+
+@synthesize syncInProgress;
+
+- (void)awakeFromNib {
+ NSString *pw = getBirthdaySyncPassword();
+ if (pw) {
+ [gui_password setStringValue:pw];
+ }
+ [gui_password setDelegate:self];
+
+ [[NSUserDefaults standardUserDefaults]
+ addObserver:self
+ forKeyPath:kEnableSyncPref
+ options:NSKeyValueObservingOptionNew
+ context:NULL];
+}
+
+-(void) controlTextDidEndEditing:(NSNotification *)aNotification {
+ saveBirthdaySyncPassword([gui_password stringValue]);
+}
+
+- (void) observeValueForKeyPath:(NSString *)keyPath
+ ofObject:(id)object
+ change:(NSDictionary *)change
+ context:(void *)context {
+ BOOL enabled = [[NSUserDefaults standardUserDefaults] boolForKey:kEnableSyncPref];
+ if (enabled) {
+ [BirthdaySyncer registerWithSyncServices];
+ }
+ else {
+ [BirthdaySyncer unregisterFromSyncServices];
+ }
+}
+
+- (IBAction) syncNow:(id)sender {
+ [self startSync];
+}
+
+@end
+
+@implementation AppController (Private)
+
+- (void) startSync {
+ [self setSyncInProgress:YES];
+ BirthdaySyncer *bs = [[BirthdaySyncer alloc] init];
+ [bs runAsynchronousSyncAndCall:self
+ selector:@selector(endSync:)];
+}
+
+- (void) endSync:(BirthdaySyncer*)bs {
+ [bs release];
+ [self setSyncInProgress:NO];
+}
+
+@end
+
Binary file not shown.
@@ -0,0 +1,312 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
+ 45FC24620F5AE792009B70E3 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45FC24610F5AE792009B70E3 /* AppController.m */; };
+ 45FE574C0F5B16E900CC771D /* PasswordStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 45FE574B0F5B16E900CC771D /* PasswordStorage.m */; };
+ 45FE57680F5B26B400CC771D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45FE57670F5B26B400CC771D /* Security.framework */; };
+ 45FE58B10F5B564700CC771D /* BirthdaySyncer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45FE58B00F5B564700CC771D /* BirthdaySyncer.m */; };
+ 45FE5A750F5B8C1B00CC771D /* SyncServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45FE5A740F5B8C1B00CC771D /* SyncServices.framework */; };
+ 45FE5A800F5B8CF800CC771D /* BirthdaySyncConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 45FE5A7F0F5B8CF800CC771D /* BirthdaySyncConstants.m */; };
+ 45FE5A960F5B8E9F00CC771D /* ClientDescription.plist in Resources */ = {isa = PBXBuildFile; fileRef = 45FE5A950F5B8E9F00CC771D /* ClientDescription.plist */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 32CA4F630368D1EE00C91783 /* BirthdaySync_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BirthdaySync_Prefix.pch; sourceTree = "<group>"; };
+ 45FC24600F5AE792009B70E3 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
+ 45FC24610F5AE792009B70E3 /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppController.m; sourceTree = "<group>"; };
+ 45FE574A0F5B16E900CC771D /* PasswordStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PasswordStorage.h; sourceTree = "<group>"; };
+ 45FE574B0F5B16E900CC771D /* PasswordStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PasswordStorage.m; sourceTree = "<group>"; };
+ 45FE57670F5B26B400CC771D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
+ 45FE58AF0F5B564700CC771D /* BirthdaySyncer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BirthdaySyncer.h; sourceTree = "<group>"; };
+ 45FE58B00F5B564700CC771D /* BirthdaySyncer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BirthdaySyncer.m; sourceTree = "<group>"; };
+ 45FE58B20F5B574300CC771D /* BirthdaySyncConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BirthdaySyncConstants.h; sourceTree = "<group>"; };
+ 45FE5A740F5B8C1B00CC771D /* SyncServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SyncServices.framework; path = System/Library/Frameworks/SyncServices.framework; sourceTree = SDKROOT; };
+ 45FE5A7F0F5B8CF800CC771D /* BirthdaySyncConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BirthdaySyncConstants.m; sourceTree = "<group>"; };
+ 45FE5A950F5B8E9F00CC771D /* ClientDescription.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = ClientDescription.plist; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* BirthdaySync.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BirthdaySync.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ 45FE57680F5B26B400CC771D /* Security.framework in Frameworks */,
+ 45FE5A750F5B8C1B00CC771D /* SyncServices.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 45FC24600F5AE792009B70E3 /* AppController.h */,
+ 45FC24610F5AE792009B70E3 /* AppController.m */,
+ 45FE574A0F5B16E900CC771D /* PasswordStorage.h */,
+ 45FE574B0F5B16E900CC771D /* PasswordStorage.m */,
+ 45FE58AF0F5B564700CC771D /* BirthdaySyncer.h */,
+ 45FE58B00F5B564700CC771D /* BirthdaySyncer.m */,
+ 45FE58B20F5B574300CC771D /* BirthdaySyncConstants.h */,
+ 45FE5A7F0F5B8CF800CC771D /* BirthdaySyncConstants.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* BirthdaySync.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* BirthdaySync */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ 45FE57670F5B26B400CC771D /* Security.framework */,
+ 45FE5A740F5B8C1B00CC771D /* SyncServices.framework */,
+ );
+ name = BirthdaySync;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* BirthdaySync_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
+ 45FE5A950F5B8E9F00CC771D /* ClientDescription.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* BirthdaySync */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BirthdaySync" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = BirthdaySync;
+ productInstallPath = "$(HOME)/Applications";
+ productName = BirthdaySync;
+ productReference = 8D1107320486CEB800E47090 /* BirthdaySync.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BirthdaySync" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* BirthdaySync */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* BirthdaySync */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
+ 45FE5A960F5B8E9F00CC771D /* ClientDescription.plist in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ 45FC24620F5AE792009B70E3 /* AppController.m in Sources */,
+ 45FE574C0F5B16E900CC771D /* PasswordStorage.m in Sources */,
+ 45FE58B10F5B564700CC771D /* BirthdaySyncer.m in Sources */,
+ 45FE5A800F5B8CF800CC771D /* BirthdaySyncConstants.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1DDD58150DA1D0A300B32029 /* English */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = BirthdaySync_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = BirthdaySync;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = BirthdaySync_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = BirthdaySync;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BirthdaySync" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BirthdaySync" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
Oops, something went wrong.

0 comments on commit aab35ba

Please sign in to comment.