Skip to content
Browse files

move constants into separate file and remove all header imports excep…

…t TICoreDataSync.h in each implementation file
  • Loading branch information...
1 parent cbe23cf commit e0205eb40c103c7f9ed35912e2e8c9cc157aadee Tim Isted committed Apr 23, 2011
View
10 Examples/ShoppingListMac/ShoppingListMac.xcodeproj/project.pbxproj
@@ -7,12 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
- 382390CA136086030068EB37 /* TICDSTypesAndEnums.m in Sources */ = {isa = PBXBuildFile; fileRef = 382390C9136086030068EB37 /* TICDSTypesAndEnums.m */; };
382390CE136087850068EB37 /* TICDSLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 382390CD136087850068EB37 /* TICDSLog.m */; };
382390D213608A1D0068EB37 /* TICDSApplicationRegistrationOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 382390D113608A1D0068EB37 /* TICDSApplicationRegistrationOperation.m */; };
382390D513608AAF0068EB37 /* TICDSError.m in Sources */ = {isa = PBXBuildFile; fileRef = 382390D413608AAE0068EB37 /* TICDSError.m */; };
385878121363406B0015A40F /* DocumentShopsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 385878111363406B0015A40F /* DocumentShopsWindow.xib */; };
3863105B13634163003D8EE3 /* TIDocumentShopsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3863105A13634163003D8EE3 /* TIDocumentShopsWindowController.m */; };
+ 3863106813636BDD003D8EE3 /* TICDSConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 3863106713636BDD003D8EE3 /* TICDSConstants.m */; };
388A3E80135707CA00824C88 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 388A3E7F135707CA00824C88 /* Cocoa.framework */; };
388A3E8A135707CA00824C88 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 388A3E88135707CA00824C88 /* InfoPlist.strings */; };
388A3E8D135707CA00824C88 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 388A3E8C135707CA00824C88 /* main.m */; };
@@ -55,7 +55,6 @@
/* Begin PBXFileReference section */
382390C8136086030068EB37 /* TICDSTypesAndEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TICDSTypesAndEnums.h; sourceTree = "<group>"; };
- 382390C9136086030068EB37 /* TICDSTypesAndEnums.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TICDSTypesAndEnums.m; sourceTree = "<group>"; };
382390CC136087850068EB37 /* TICDSLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TICDSLog.h; sourceTree = "<group>"; };
382390CD136087850068EB37 /* TICDSLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TICDSLog.m; sourceTree = "<group>"; };
382390D013608A1D0068EB37 /* TICDSApplicationRegistrationOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TICDSApplicationRegistrationOperation.h; sourceTree = "<group>"; };
@@ -65,6 +64,8 @@
385878111363406B0015A40F /* DocumentShopsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DocumentShopsWindow.xib; sourceTree = "<group>"; };
3863105913634163003D8EE3 /* TIDocumentShopsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TIDocumentShopsWindowController.h; sourceTree = "<group>"; };
3863105A13634163003D8EE3 /* TIDocumentShopsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TIDocumentShopsWindowController.m; sourceTree = "<group>"; };
+ 3863106613636BDD003D8EE3 /* TICDSConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TICDSConstants.h; sourceTree = "<group>"; };
+ 3863106713636BDD003D8EE3 /* TICDSConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TICDSConstants.m; sourceTree = "<group>"; };
388A3E7B135707CA00824C88 /* ShoppingListMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShoppingListMac.app; sourceTree = BUILT_PRODUCTS_DIR; };
388A3E7F135707CA00824C88 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
388A3E82135707CA00824C88 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -325,7 +326,8 @@
38FFACB9136042D3004758EE /* TICDSAllClassHeaders.h */,
38FFACB713604232004758EE /* TICDSClassesAndProtocols.h */,
382390C8136086030068EB37 /* TICDSTypesAndEnums.h */,
- 382390C9136086030068EB37 /* TICDSTypesAndEnums.m */,
+ 3863106613636BDD003D8EE3 /* TICDSConstants.h */,
+ 3863106713636BDD003D8EE3 /* TICDSConstants.m */,
);
path = "01 Headers and Constants";
sourceTree = "<group>";
@@ -440,7 +442,6 @@
38FF6075135708F100D12E6D /* ShoppingList.xcdatamodeld in Sources */,
38FFACBD1360439F004758EE /* TICDSApplicationSyncManager.m in Sources */,
38FFACC113604B8A004758EE /* NSObject+TIDelegateCommunications.m in Sources */,
- 382390CA136086030068EB37 /* TICDSTypesAndEnums.m in Sources */,
382390CE136087850068EB37 /* TICDSLog.m in Sources */,
382390D213608A1D0068EB37 /* TICDSApplicationRegistrationOperation.m in Sources */,
382390D513608AAF0068EB37 /* TICDSError.m in Sources */,
@@ -463,6 +464,7 @@
38C0B641136338BC00B63589 /* TIKQDirectoryWatcher.m in Sources */,
38C0B642136338BC00B63589 /* TIManagedObjectExtensions.m in Sources */,
3863105B13634163003D8EE3 /* TIDocumentShopsWindowController.m in Sources */,
+ 3863106813636BDD003D8EE3 /* TICDSConstants.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
41 TICoreDataSync/01 Headers and Constants/TICDSConstants.h
@@ -0,0 +1,41 @@
+//
+// TICDSStringConstants.h
+// ShoppingListMac
+//
+// Created by Tim Isted on 23/04/2011.
+// Copyright 2011 Tim Isted. All rights reserved.
+//
+
+extern NSString * const TICDSSyncChangeTypeNames[];
+
+extern NSString * const TICDSErrorUserInfoKey;
+extern NSString * const TICDSErrorUnderlyingErrorKey;
+extern NSString * const TICDSErrorClassAndMethod;
+extern NSString * const TICDSErrorDomain;
+
+extern NSString * const kTICDSClientDeviceDescription;
+extern NSString * const kTICDSClientDeviceUserInfo;
+extern NSString * const kTICDSLastSyncDate;
+extern NSString * const kTICDSDocumentIdentifier;
+extern NSString * const kTICDSDocumentName;
+extern NSString * const kTICDSDocumentUserInfo;
+extern NSString * const kTICDSOriginalDeviceDescription;
+extern NSString * const kTICDSOriginalDeviceIdentifier;
+
+extern NSString * const kTICDSUtilitiesFileStructureClientDeviceUID;
+extern NSString * const kTICDSUtilitiesFileStructureDocumentUID;
+
+extern NSString * const TICDSClientDevicesDirectoryName;
+extern NSString * const TICDSDocumentsDirectoryName;
+extern NSString * const TICDSWholeStoreDirectoryName;
+extern NSString * const TICDSSyncChangesDirectoryName;
+extern NSString * const TICDSRecentSyncsDirectoryName;
+extern NSString * const TICDSUnappliedChangesDirectoryName;
+extern NSString * const TICDSSyncChangesToPushDirectoryName;
+extern NSString * const TICDSUnsynchronizedSyncChangesStoreName;
+
+extern NSString * const TICDSSyncIDAttributeName;
+extern NSString * const TICDSSyncChangeDataModelName;
+
+extern NSString * const TICDSApplicationSyncManagerDidRegisterSuccessfullyNotification;
+extern NSString * const TICDSDocumentSyncManagerDidRegisterSuccessfullyNotification;
View
6 ...eaders and Constants/TICDSTypesAndEnums.m → ...01 Headers and Constants/TICDSConstants.m
@@ -1,12 +1,12 @@
//
-// TICDSTypesAndEnums.m
+// TICDSStringConstants.m
// ShoppingListMac
//
-// Created by Tim Isted on 21/04/2011.
+// Created by Tim Isted on 23/04/2011.
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSTypesAndEnums.h"
+#import "TICDSConstants.h"
NSString * const TICDSSyncChangeTypeNames[] = {
@"Unknown",
View
36 TICoreDataSync/01 Headers and Constants/TICDSTypesAndEnums.h
@@ -88,39 +88,3 @@ typedef enum _TICDSSyncChangeType {
TICDSSyncChangeTypeAttributeChanged = 3,
TICDSSyncChangeTypeRelationshipChanged = 4,
} TICDSSyncChangeType;
-
-#pragma mark -
-#pragma mark STRING CONSTANTS
-extern NSString * const TICDSSyncChangeTypeNames[];
-
-extern NSString * const TICDSErrorUserInfoKey;
-extern NSString * const TICDSErrorUnderlyingErrorKey;
-extern NSString * const TICDSErrorClassAndMethod;
-extern NSString * const TICDSErrorDomain;
-
-extern NSString * const kTICDSClientDeviceDescription;
-extern NSString * const kTICDSClientDeviceUserInfo;
-extern NSString * const kTICDSLastSyncDate;
-extern NSString * const kTICDSDocumentIdentifier;
-extern NSString * const kTICDSDocumentName;
-extern NSString * const kTICDSDocumentUserInfo;
-extern NSString * const kTICDSOriginalDeviceDescription;
-extern NSString * const kTICDSOriginalDeviceIdentifier;
-
-extern NSString * const kTICDSUtilitiesFileStructureClientDeviceUID;
-extern NSString * const kTICDSUtilitiesFileStructureDocumentUID;
-
-extern NSString * const TICDSClientDevicesDirectoryName;
-extern NSString * const TICDSDocumentsDirectoryName;
-extern NSString * const TICDSWholeStoreDirectoryName;
-extern NSString * const TICDSSyncChangesDirectoryName;
-extern NSString * const TICDSRecentSyncsDirectoryName;
-extern NSString * const TICDSUnappliedChangesDirectoryName;
-extern NSString * const TICDSSyncChangesToPushDirectoryName;
-extern NSString * const TICDSUnsynchronizedSyncChangesStoreName;
-
-extern NSString * const TICDSSyncIDAttributeName;
-extern NSString * const TICDSSyncChangeDataModelName;
-
-extern NSString * const TICDSApplicationSyncManagerDidRegisterSuccessfullyNotification;
-extern NSString * const TICDSDocumentSyncManagerDidRegisterSuccessfullyNotification;
View
1 ...ile Manager-Based Sync/Operations/TICDSFileManagerBasedApplicationRegistrationOperation.m
@@ -6,7 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSFileManagerBasedApplicationRegistrationOperation.h"
#import "TICoreDataSync.h"
@implementation TICDSFileManagerBasedApplicationRegistrationOperation
View
1 ...s/File Manager-Based Sync/Operations/TICDSFileManagerBasedDocumentRegistrationOperation.m
@@ -6,7 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSFileManagerBasedDocumentRegistrationOperation.h"
#import "TICoreDataSync.h"
@implementation TICDSFileManagerBasedDocumentRegistrationOperation
View
1 .../02 Primary Classes/File Manager-Based Sync/TICDSFileManagerBasedApplicationSyncManager.m
@@ -6,7 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSFileManagerBasedApplicationSyncManager.h"
#import "TICoreDataSync.h"
@implementation TICDSFileManagerBasedApplicationSyncManager
View
2 ...ync/02 Primary Classes/File Manager-Based Sync/TICDSFileManagerBasedDocumentSyncManager.m
@@ -6,8 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSFileManagerBasedDocumentSyncManager.h"
-
#import "TICoreDataSync.h"
@implementation TICDSFileManagerBasedDocumentSyncManager
View
1 TICoreDataSync/02 Primary Classes/Generic Operations/TICDSDocumentRegistrationOperation.m
@@ -6,7 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSDocumentRegistrationOperation.h"
#import "TICoreDataSync.h"
@interface TICDSDocumentRegistrationOperation ()
View
1 TICoreDataSync/02 Primary Classes/TICDSDocumentSyncManager.m
@@ -6,7 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSDocumentSyncManager.h"
#import "TICoreDataSync.h"
@interface TICDSDocumentSyncManager ()
View
2 TICoreDataSync/02 Primary Classes/TICDSSynchronizedManagedObjectContext.m
@@ -6,8 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSSynchronizedManagedObjectContext.h"
-
#import "TICoreDataSync.h"
@implementation TICDSSynchronizedManagedObjectContext
View
2 TICoreDataSync/04 Utilities/TICDSError.m
@@ -6,7 +6,7 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSError.h"
+#import "TICoreDataSync.h"
NSString *gTICDSErrorStrings[] = {
@"No error",
View
2 TICoreDataSync/04 Utilities/TICDSLog.m
@@ -6,7 +6,7 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSLog.h"
+#import "TICoreDataSync.h"
NSInteger gTICDSLogVerbosity = 0;
View
1 TICoreDataSync/04 Utilities/TICDSUtilities.m
@@ -6,7 +6,6 @@
// Copyright 2011 Tim Isted. All rights reserved.
//
-#import "TICDSUtilities.h"
#import "TICoreDataSync.h"
@implementation TICDSUtilities
View
3 TICoreDataSync/TICoreDataSync.h
@@ -8,4 +8,5 @@
#import "TICDSClassesAndProtocols.h"
#import "TICDSAllClassHeaders.h"
-#import "TICDSTypesAndEnums.h"
+#import "TICDSTypesAndEnums.h"
+#import "TICDSConstants.h"

0 comments on commit e0205eb

Please sign in to comment.
Something went wrong with that request. Please try again.