Created
February 10, 2014 11:28
-
-
Save corinnekrych/8914290 to your computer and use it in GitHub Desktop.
This file contains hidden or 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:(AGSyncMetaData*) object | |
| success:(void (^)(id responseObject))success | |
| failure:(void (^)(NSError *error))failure | |
| conflict:(void (^)(NSError *error, AGSyncMetaData* fromObject, AGSyncMetaData* 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 metadata model | |
| @interface AGSyncMetaData : NSObject | |
| @property (nonatomic, readonly) NSString* oid; | |
| @property (nonatomic, readonly) NSString* rev; | |
| @property (nonatomic, strong) id content; | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment