-
Notifications
You must be signed in to change notification settings - Fork 9
/
ActiveManager.h
84 lines (66 loc) · 3.56 KB
/
ActiveManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//
// ActiveManager.h
// Shopify_Mobile
//
// Created by Matthew Newberry on 8/2/10.
// Copyright 2010 Shopify. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ActiveConnection.h"
@interface ActiveManager : NSObject {
NSManagedObjectContext *_managedObjectContext;
NSManagedObjectModel *_managedObjectModel;
NSPersistentStoreCoordinator *_persistentStoreCoordinator;
BOOL _modelCreated;
BOOL _resetModel;
NSDateFormatter *_defaultDateParser;
NSNumberFormatter *_defaultNumberFormatter;
NSMutableDictionary *_entityDescriptions;
NSMutableDictionary *_modelProperties;
NSMutableDictionary *_modelRelationships;
NSMutableDictionary *_modelAttributes;
int _logLevel;
id _connectionClass;
id _parsingClass;
id _fixtureParsingClass;
NSString *_baseRemoteURL;
NSString *_remoteContentType;
NSString *_remoteContentFormat;
}
@property (nonatomic, retain) NSString *remoteContentFormat;
@property (nonatomic, retain) NSString *remoteContentType;
@property (nonatomic, assign) id parsingClass;
@property (nonatomic, assign) id fixtureParsingClass;
@property (nonatomic, retain) NSString *baseRemoteURL;
@property (nonatomic, assign) id connectionClass;
@property (nonatomic, assign) int logLevel;
@property (nonatomic, retain) NSDateFormatter *defaultDateParser;
@property (nonatomic, retain) NSNumberFormatter *defaultNumberFormatter;
@property (nonatomic, retain) NSMutableDictionary *entityDescriptions;
@property (nonatomic, retain) NSMutableDictionary *modelProperties;
@property (nonatomic, retain) NSMutableDictionary *modelRelationships;
@property (nonatomic, retain) NSMutableDictionary *modelAttributes;
@property (nonatomic, retain) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain) NSPersistentStoreCoordinator *persistentStoreCoordinator;
+ (ActiveManager *) shared;
- (void) addRequest:(ActiveRequest *) request;
- (void) addRequest:(ActiveRequest *) request delegate:(id) delegate didParseObjectSelector:(SEL)didParseObjectSelector didFinishSelector:(SEL)didFinishSelector didFailSelector:(SEL)didFailSelector;
- (void) addRequest:(ActiveRequest *) request didParseObjectBlock:(ActiveConnectionDidParseObjectBlock)didParseObjectBlock didFinishBlock:(ActiveConnectionBlock)didFinishBlock didFailBlock:(ActiveConnectionBlock)didFailBlock;
- (void) addRequest:(ActiveRequest *) request toQueue:(dispatch_queue_t)queue didParseObjectBlock:(ActiveConnectionDidParseObjectBlock)didParseObjectBlock didFinishBlock:(ActiveConnectionBlock)didFinishBlock didFailBlock:(ActiveConnectionBlock)didFailBlock;
- (ActiveResult *) addSyncronousRequest:(ActiveRequest *)request;
- (void) addSyncronousRequest:(ActiveRequest *)request delegate:(id) delegate didFinishSelector:(SEL)didFinishSelector didFailSelector:(SEL)didFailSelector;
- (void) addSyncronousRequest:(ActiveRequest *)request didFinishBlock:(ActiveConnectionBlock)didFinishBlock didFailBlock:(ActiveConnectionBlock)didFailBlock;
- (NSData *) serializeObject:(id) object;
- (id) parseString:(NSString *) content;
- (id) parseFixture:(NSString *) content;
- (NSManagedObjectContext *) newManagedObjectContext;
- (NSManagedObjectContext *) managedObjectContext;
- (NSManagedObjectModel *) managedObjectModel;
- (NSPersistentStoreCoordinator *) persistentStoreCoordinator;
- (NSString *) applicationDocumentsDirectory;
+ (NSArray *) seedFiles;
- (BOOL) loadAllSeedFiles;
- (BOOL) loadSeedFilesForGroupName:(NSString *) groupName;
- (BOOL) loadSeedFiles:(NSArray *) files groupName:(NSString *) groupName;
@end