Skip to content

Instantly share code, notes, and snippets.

@jleach
Created Sep 1, 2015
Embed
What would you like to do?
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

mikey0000 commented Sep 3, 2015

Yeah looks good.

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