[React Native] RCT_EXPORT lvl.2

This commit is contained in:
Alex Akers
2015-04-08 08:52:48 -07:00
parent 341d1a12bf
commit 8a57c4e980
29 changed files with 370 additions and 326 deletions

View File

@@ -188,10 +188,9 @@ RCT_EXPORT_MODULE()
#pragma mark - Exported JS Functions
- (void)multiGet:(NSArray *)keys callback:(RCTResponseSenderBlock)callback
RCT_EXPORT_METHOD(multiGet:(NSArray *)keys
callback:(RCTResponseSenderBlock)callback)
{
RCT_EXPORT();
if (!callback) {
RCTLogError(@"Called getItem without a callback.");
return;
@@ -214,10 +213,9 @@ RCT_EXPORT_MODULE()
});
}
- (void)multiSet:(NSArray *)kvPairs callback:(RCTResponseSenderBlock)callback
RCT_EXPORT_METHOD(multiSet:(NSArray *)kvPairs
callback:(RCTResponseSenderBlock)callback)
{
RCT_EXPORT();
dispatch_async(RCTFileQueue(), ^{
id errorOut = [self _ensureSetup];
if (errorOut) {
@@ -236,10 +234,9 @@ RCT_EXPORT_MODULE()
});
}
- (void)multiRemove:(NSArray *)keys callback:(RCTResponseSenderBlock)callback
RCT_EXPORT_METHOD(multiRemove:(NSArray *)keys
callback:(RCTResponseSenderBlock)callback)
{
RCT_EXPORT();
dispatch_async(RCTFileQueue(), ^{
id errorOut = [self _ensureSetup];
if (errorOut) {
@@ -263,10 +260,8 @@ RCT_EXPORT_MODULE()
});
}
- (void)clear:(RCTResponseSenderBlock)callback
RCT_EXPORT_METHOD(clear:(RCTResponseSenderBlock)callback)
{
RCT_EXPORT();
dispatch_async(RCTFileQueue(), ^{
id errorOut = [self _ensureSetup];
if (!errorOut) {
@@ -284,10 +279,8 @@ RCT_EXPORT_MODULE()
});
}
- (void)getAllKeys:(RCTResponseSenderBlock)callback
RCT_EXPORT_METHOD(getAllKeys:(RCTResponseSenderBlock)callback)
{
RCT_EXPORT();
dispatch_async(RCTFileQueue(), ^{
id errorOut = [self _ensureSetup];
if (errorOut) {