Skip to content

Instantly share code, notes, and snippets.

@jleach
Created September 1, 2015 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jleach/03053aa74f519c936bd1 to your computer and use it in GitHub Desktop.
Save jleach/03053aa74f519c936bd1 to your computer and use it in GitHub Desktop.
Proposed ObjectiveDDP Data Management Protocol
//
// Created by Jason Leach on 2015-08-27.
//
@import Foundation;
@class MeteorClient;
@protocol MeteorClientDataProtocol <NSObject>
@required
// add
- (void)meteorClient:(MeteorClient *)client didAddObjectWithId:(NSString *)objectId collectionName:(NSString *)name fields:(NSDictionary *)fields;
- (void)meteorClient:(MeteorClient *)client didAddObjectWithId:(NSString *)objectId beforeObjectWithId:(NSString *)objectId collectionName:(NSString *)name fields:(NSDictionary *)fields;
// remove
- (void)meteorClient:(MeteorClient *)client didRemoveObjectWithId:(NSString *)objectId collectionName:(NSString *)name;
// change
- (void)meteorClient:(MeteorClient *)client didChangeObjectWithId:(NSString *)objectId collectionName:(NSString *)name fields:(NSDictionary *)fields;
@optional
// move
- (void)meteorClient:(MeteorClient *)client didMoveObjectWithId:(NSString *)objectId beforeObjectWithId:(NSString *)objectId collectionName:(NSString *)name;
@end
@mikey0000
Copy link

Yeah looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment