2017-09-28 12:48:28 +00:00
|
|
|
#ifndef RNFirebaseFirestoreCollectionReference_h
|
|
|
|
#define RNFirebaseFirestoreCollectionReference_h
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2017-10-03 16:23:28 +00:00
|
|
|
#if __has_include(<FirebaseFirestore/FirebaseFirestore.h>)
|
2017-09-28 12:48:28 +00:00
|
|
|
|
2017-10-03 16:23:28 +00:00
|
|
|
#import <FirebaseFirestore/FirebaseFirestore.h>
|
2017-10-03 09:12:25 +00:00
|
|
|
#import <React/RCTEventEmitter.h>
|
|
|
|
#import "RNFirebaseEvents.h"
|
2017-09-28 12:48:28 +00:00
|
|
|
#import "RNFirebaseFirestore.h"
|
|
|
|
#import "RNFirebaseFirestoreDocumentReference.h"
|
2017-10-26 10:55:07 +00:00
|
|
|
#import "RNFirebaseUtil.h"
|
2017-09-28 12:48:28 +00:00
|
|
|
|
|
|
|
@interface RNFirebaseFirestoreCollectionReference : NSObject
|
2017-10-03 09:12:25 +00:00
|
|
|
@property RCTEventEmitter *emitter;
|
2018-01-03 20:00:38 +00:00
|
|
|
@property NSString *appDisplayName;
|
2017-09-28 12:48:28 +00:00
|
|
|
@property NSString *path;
|
|
|
|
@property NSArray *filters;
|
|
|
|
@property NSArray *orders;
|
|
|
|
@property NSDictionary *options;
|
|
|
|
@property FIRQuery *query;
|
|
|
|
|
2018-01-03 20:00:38 +00:00
|
|
|
- (id)initWithPathAndModifiers:(RCTEventEmitter *)emitter appDisplayName:(NSString *)appDisplayName path:(NSString *)path filters:(NSArray *)filters orders:(NSArray *)orders options:(NSDictionary *)options;
|
2017-09-28 12:48:28 +00:00
|
|
|
- (void)get:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject;
|
2017-10-03 09:12:25 +00:00
|
|
|
+ (void)offSnapshot:(NSString *)listenerId;
|
2017-10-06 11:00:40 +00:00
|
|
|
- (void)onSnapshot:(NSString *)listenerId queryListenOptions:(NSDictionary *) queryListenOptions;
|
2017-09-28 12:48:28 +00:00
|
|
|
+ (NSDictionary *)snapshotToDictionary:(FIRQuerySnapshot *)querySnapshot;
|
|
|
|
@end
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
@interface RNFirebaseFirestoreCollectionReference : NSObject
|
|
|
|
@end
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|