35 lines
1.1 KiB
Objective-C
35 lines
1.1 KiB
Objective-C
#ifndef RNFirebaseDatabaseReference_h
|
|
#define RNFirebaseDatabaseReference_h
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#if __has_include(<FirebaseDatabase/FIRDatabase.h>)
|
|
#import <FirebaseDatabase/FIRDatabase.h>
|
|
#import "RNFirebaseDatabase.h"
|
|
#import "RNFirebaseEvents.h"
|
|
#import "RNFirebaseUtil.h"
|
|
#import <React/RCTEventEmitter.h>
|
|
|
|
@interface RNFirebaseDatabaseReference : NSObject
|
|
@property RCTEventEmitter *emitter;
|
|
@property FIRDatabaseQuery *query;
|
|
@property NSString *app;
|
|
@property NSString *key;
|
|
@property NSString *path;
|
|
@property NSMutableDictionary *listeners;
|
|
|
|
- (id)initWithPathAndModifiers:(RCTEventEmitter *)emitter app:(NSString *)app key:(NSString *)key refPath:(NSString *)refPath modifiers:(NSArray *)modifiers;
|
|
- (void)on:(NSString *) eventName registration:(NSDictionary *) registration;
|
|
- (void)once:(NSString *) eventType resolver:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject;
|
|
- (void)removeEventListener:(NSString *)eventRegistrationKey;
|
|
- (BOOL)hasListeners;
|
|
+ (NSDictionary *)snapshotToDict:(FIRDataSnapshot *)dataSnapshot;
|
|
@end
|
|
|
|
#else
|
|
|
|
@interface RNFirebaseDatabaseReference : NSObject
|
|
@end
|
|
#endif
|
|
|
|
#endif
|