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

36 lines
1.0 KiB
C
Raw Normal View History

2017-03-09 15:26:28 +00:00
#ifndef RNFirebaseDatabase_h
#define RNFirebaseDatabase_h
2017-08-11 15:07:32 +00:00
#import <Foundation/Foundation.h>
2017-03-09 15:26:28 +00:00
#if __has_include(<FirebaseDatabase/FIRDatabase.h>)
#import <FirebaseDatabase/FIRDatabase.h>
2017-08-11 15:07:32 +00:00
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
2017-03-09 15:26:28 +00:00
@interface RNFirebaseDatabase : RCTEventEmitter <RCTBridgeModule> {}
2017-03-09 15:26:28 +00:00
@property NSMutableDictionary *dbReferences;
@property NSMutableDictionary *transactions;
@property dispatch_queue_t transactionQueue;
+ (void)handlePromise:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject databaseError:(NSError *)databaseError;
+ (FIRDatabase *)getDatabaseForApp:(NSString *)appDisplayName;
+ (FIRDatabase *)getDatabaseForApp:(NSString *)appDisplayName URL:(NSString *)url;
+ (NSDictionary *)getJSError:(NSError *)nativeError;
+ (NSString *)getMessageWithService:(NSString *)message service:(NSString *)service fullCode:(NSString *)fullCode;
+ (NSString *)getCodeWithService:(NSString *)service code:(NSString *)code;
@end
2017-03-09 15:26:28 +00:00
#else
2017-08-11 15:07:32 +00:00
@interface RNFirebaseDatabase : NSObject
2017-03-09 15:26:28 +00:00
@end
#endif
2017-03-09 15:26:28 +00:00
#endif