react-native-firebase/ios/RNFirebase/database/RNFirebaseDatabaseReference.h

32 lines
1.0 KiB
C
Raw Normal View History

#ifndef RNFirebaseDatabaseReference_h
#define RNFirebaseDatabaseReference_h
2017-08-11 15:07:32 +00:00
#import <Foundation/Foundation.h>
#if __has_include(<FirebaseDatabase/FIRDatabase.h>)
2017-08-11 15:07:32 +00:00
#import "RNFirebaseEvents.h"
#import <React/RCTEventEmitter.h>
#import "Firebase.h"
@interface RNFirebaseDatabaseReference : NSObject
@property RCTEventEmitter *emitter;
@property FIRDatabaseQuery *query;
@property NSNumber *refId;
@property NSString *path;
@property NSMutableDictionary *listeners;
- (id)initWithPathAndModifiers:(RCTEventEmitter *)emitter database:(FIRDatabase *)database refId:(NSNumber *)refId path:(NSString *)path modifiers:(NSArray *)modifiers;
- (void)addEventHandler:(NSNumber *)listenerId eventName:(NSString *)eventName;
- (void)addSingleEventHandler:(NSString *)eventName callback:(RCTResponseSenderBlock)callback;
- (void)removeEventHandler:(NSNumber *)listenerId eventName:(NSString *)eventName;
- (BOOL)hasListeners;
+ (NSDictionary *)snapshotToDict:(FIRDataSnapshot *)snapshot;
@end
#else
@interface RNFirebaseDatabaseReference : NSObject
@end
#endif
#endif