Skip to content

Commit 9ea9b51

Browse files
DevmateDropRctExportMethod Botfacebook-github-bot
authored andcommitted
xplat/js/react-native-github/packages/react-native/Libraries/Blob/RCTBlobManager.mm
Reviewed By: cortinico Differential Revision: D115005955
1 parent fff4994 commit 9ea9b51

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

packages/react-native/Libraries/Blob/RCTBlobManager.mm

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ - (void)remove:(NSString *)blobId
148148
[_blobs removeObjectForKey:blobId];
149149
}
150150

151-
RCT_EXPORT_METHOD(addNetworkingHandler)
151+
- (void)addNetworkingHandler
152152
{
153153
RCTNetworking *const networking = [_moduleRegistry moduleForName:"Networking"];
154154

@@ -164,32 +164,29 @@ - (void)remove:(NSString *)blobId
164164
});
165165
}
166166

167-
RCT_EXPORT_METHOD(addWebSocketHandler : (double)socketID)
167+
- (void)addWebSocketHandler:(double)socketID
168168
{
169169
dispatch_async(((RCTWebSocketModule *)[_moduleRegistry moduleForName:"WebSocketModule"]).methodQueue, ^{
170-
[[self->_moduleRegistry moduleForName:"WebSocketModule"] setContentHandler:self
171-
forSocketID:[NSNumber numberWithDouble:socketID]];
170+
[[self->_moduleRegistry moduleForName:"WebSocketModule"] setContentHandler:self forSocketID:@(socketID)];
172171
});
173172
}
174173

175-
RCT_EXPORT_METHOD(removeWebSocketHandler : (double)socketID)
174+
- (void)removeWebSocketHandler:(double)socketID
176175
{
177176
dispatch_async(((RCTWebSocketModule *)[_moduleRegistry moduleForName:"WebSocketModule"]).methodQueue, ^{
178-
[[self->_moduleRegistry moduleForName:"WebSocketModule"] setContentHandler:nil
179-
forSocketID:[NSNumber numberWithDouble:socketID]];
177+
[[self->_moduleRegistry moduleForName:"WebSocketModule"] setContentHandler:nil forSocketID:@(socketID)];
180178
});
181179
}
182180

183181
// @lint-ignore FBOBJCUNTYPEDCOLLECTION1
184-
RCT_EXPORT_METHOD(sendOverSocket : (NSDictionary *)blob socketID : (double)socketID)
182+
- (void)sendOverSocket:(NSDictionary *)blob socketID:(double)socketID
185183
{
186184
dispatch_async(((RCTWebSocketModule *)[_moduleRegistry moduleForName:"WebSocketModule"]).methodQueue, ^{
187-
[[self->_moduleRegistry moduleForName:"WebSocketModule"] sendData:[self resolve:blob]
188-
forSocketID:[NSNumber numberWithDouble:socketID]];
185+
[[self->_moduleRegistry moduleForName:"WebSocketModule"] sendData:[self resolve:blob] forSocketID:@(socketID)];
189186
});
190187
}
191188

192-
RCT_EXPORT_METHOD(createFromParts : (NSArray<NSDictionary<NSString *, id> *> *)parts withId : (NSString *)blobId)
189+
- (void)createFromParts:(NSArray<NSDictionary<NSString *, id> *> *)parts withId:(NSString *)blobId
193190
{
194191
NSMutableData *data = [NSMutableData new];
195192
for (NSDictionary<NSString *, id> *part in parts) {
@@ -211,7 +208,7 @@ - (void)remove:(NSString *)blobId
211208
});
212209
}
213210

214-
RCT_EXPORT_METHOD(release : (NSString *)blobId)
211+
- (void)release:(NSString *)blobId
215212
{
216213
dispatch_async(_methodQueue, ^{
217214
[self remove:blobId];

0 commit comments

Comments
 (0)