-
Notifications
You must be signed in to change notification settings - Fork 0
/
BPImportOrchestrator.h
33 lines (21 loc) · 1.23 KB
/
BPImportOrchestrator.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
//
// BPImportOrchestrator.h
// BPTracker
//
// Created by Robert Saccone on 12/27/12.
// Copyright (c) 2017 Robert Saccone. All rights reserved.
//
#import <Foundation/Foundation.h>
@class BPImportOrchestrator;
@protocol BPImportOrchestratorDelegate <NSObject>
- (void)importOrchestrator:(BPImportOrchestrator *)importOrch numRecordsImported:(NSUInteger)importCount numRecordsUpdated:(NSUInteger)updateCount;
- (void)importOrchestrator:(BPImportOrchestrator *)importOrch failedWithError:(NSError *)error totalRecordsImported:(NSUInteger)recordsImported totalRecordsUpdated:(NSUInteger)recordsUpdated;
- (void)importOrchestrator:(BPImportOrchestrator *)importOrch totalRecordsImported:(NSUInteger)recordsImported totalRecordsUpdated:(NSUInteger)recordsUpdated wasCanceled:(BOOL)canceled;
@end
@interface BPImportOrchestrator : NSObject
- (id)initWithCSVFile:(NSString *)filename parentManagedObjectContext:(NSManagedObjectContext *) parentManagedObjectContext notificationDelegate:(id<BPImportOrchestratorDelegate>)delegate error:(NSError **)anError;
- (void)beginImport;
- (void)cancelImportRequest;
@property(atomic, assign, readonly) NSUInteger numRecordsImported;
@property(atomic, assign, readonly) NSUInteger numRecordsUpdated;
@end