From bfa4856bbeab89b240ac1bffe7e4a88fa32e8172 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 1 Dec 2015 20:36:08 -0800 Subject: [PATCH] Move non-CoreData backed fields out of CoreData objects --- Limelight/Database/App.h | 8 -------- Limelight/Database/App.m | 6 ------ Limelight/Database/Host.h | 10 ---------- Limelight/Database/Host.m | 8 -------- Limelight/Database/TemporaryApp.h | 6 ++++++ Limelight/Database/TemporaryApp.m | 4 ++++ Limelight/Database/TemporaryHost.h | 6 ++++++ Limelight/Database/TemporaryHost.m | 4 ++++ 8 files changed, 20 insertions(+), 32 deletions(-) diff --git a/Limelight/Database/App.h b/Limelight/Database/App.h index ae55976..660dab7 100644 --- a/Limelight/Database/App.h +++ b/Limelight/Database/App.h @@ -11,16 +11,8 @@ @class Host; -NS_ASSUME_NONNULL_BEGIN - @interface App : NSManagedObject -@property BOOL isRunning; - -- (NSComparisonResult)compareName:(App *)other; - @end -NS_ASSUME_NONNULL_END - #import "App+CoreDataProperties.h" diff --git a/Limelight/Database/App.m b/Limelight/Database/App.m index 2ada9a8..edb6355 100644 --- a/Limelight/Database/App.m +++ b/Limelight/Database/App.m @@ -10,10 +10,4 @@ @implementation App -@synthesize isRunning; - -- (NSComparisonResult)compareName:(App *)other { - return [self.name caseInsensitiveCompare:other.name]; -} - @end diff --git a/Limelight/Database/Host.h b/Limelight/Database/Host.h index 89968ac..d2cb19a 100644 --- a/Limelight/Database/Host.h +++ b/Limelight/Database/Host.h @@ -10,18 +10,8 @@ #import #import "Utils.h" -NS_ASSUME_NONNULL_BEGIN - @interface Host : NSManagedObject -@property (nonatomic) BOOL online; -@property (nonatomic) PairState pairState; -@property (nonatomic) NSString * activeAddress; - -- (NSComparisonResult)compareName:(Host *)other; - @end -NS_ASSUME_NONNULL_END - #import "Host+CoreDataProperties.h" diff --git a/Limelight/Database/Host.m b/Limelight/Database/Host.m index d115311..bc71c1c 100644 --- a/Limelight/Database/Host.m +++ b/Limelight/Database/Host.m @@ -10,12 +10,4 @@ @implementation Host -@dynamic pairState; -@synthesize online; -@synthesize activeAddress; - -- (NSComparisonResult)compareName:(Host *)other { - return [self.name caseInsensitiveCompare:other.name]; -} - @end diff --git a/Limelight/Database/TemporaryApp.h b/Limelight/Database/TemporaryApp.h index b49b3cc..b2b6fdf 100644 --- a/Limelight/Database/TemporaryApp.h +++ b/Limelight/Database/TemporaryApp.h @@ -17,4 +17,10 @@ @property (nonatomic) BOOL isRunning; @property (nullable, nonatomic, retain) TemporaryHost *host; +NS_ASSUME_NONNULL_BEGIN + +- (NSComparisonResult)compareName:(TemporaryApp *)other; + +NS_ASSUME_NONNULL_END + @end diff --git a/Limelight/Database/TemporaryApp.m b/Limelight/Database/TemporaryApp.m index 22ca599..13f7818 100644 --- a/Limelight/Database/TemporaryApp.m +++ b/Limelight/Database/TemporaryApp.m @@ -10,4 +10,8 @@ @implementation TemporaryApp +- (NSComparisonResult)compareName:(TemporaryApp *)other { + return [self.name caseInsensitiveCompare:other.name]; +} + @end diff --git a/Limelight/Database/TemporaryHost.h b/Limelight/Database/TemporaryHost.h index 7707edd..be6602c 100644 --- a/Limelight/Database/TemporaryHost.h +++ b/Limelight/Database/TemporaryHost.h @@ -23,4 +23,10 @@ @property (nullable, nonatomic, retain) NSString *uuid; @property (nullable, nonatomic, retain) NSSet *appList; +NS_ASSUME_NONNULL_BEGIN + +- (NSComparisonResult)compareName:(TemporaryHost *)other; + +NS_ASSUME_NONNULL_END + @end diff --git a/Limelight/Database/TemporaryHost.m b/Limelight/Database/TemporaryHost.m index 4f66b52..2c1bd21 100644 --- a/Limelight/Database/TemporaryHost.m +++ b/Limelight/Database/TemporaryHost.m @@ -10,4 +10,8 @@ @implementation TemporaryHost +- (NSComparisonResult)compareName:(TemporaryHost *)other { + return [self.name caseInsensitiveCompare:other.name]; +} + @end