Created
February 10, 2014 12:53
-
-
Save corinnekrych/8915378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AGSyncPipe protocol | |
@protocol AGSyncPipe | |
// to dicuss: conflict callback could also have baseObject for 3 ways merge options | |
-(void) save:(AGSyncObject*) object | |
success:(void (^)(id responseObject))success | |
failure:(void (^)(NSError *error))failure | |
conflict:(void (^)(NSError *error, AGSyncObject* fromObject, AGSyncObject* toObject))conflict; | |
-(void) read:(void (^)(id responseObject))success | |
failure:(void (^)(NSError *error))failure; | |
-(void) read:(id)value | |
success:(void (^)(id responseObject))success | |
failure:(void (^)(NSError *error))failure; | |
-(void) remove:(NSDictionary*) object | |
success:(void (^)(id responseObject))success | |
failure:(void (^)(NSError *error))failure; | |
@end | |
//Our SyncObject with its sync needed metadata | |
@interface AGSyncObject : NSObject | |
@property (nonatomic, readonly) NSString* objectId; | |
@property (nonatomic, readonly) NSString* revision; | |
@property (nonatomic, strong) id content; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment