UNPKG

915 Btext/x-cView Raw
1/*
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#import <Foundation/Foundation.h>
9#import <React/RCTDefines.h>
10
11#if RCT_DEV
12
13@interface RCTBundleStatus : NSObject
14@property (atomic, assign) BOOL isLastBundleDownloadSuccess;
15@property (atomic, assign) NSTimeInterval bundleUpdateTimestamp;
16@end
17
18typedef RCTBundleStatus *(^RCTBundleStatusProvider)(void);
19
20@interface RCTInspectorPackagerConnection : NSObject
21- (instancetype)initWithURL:(NSURL *)url;
22
23- (bool)isConnected;
24- (void)connect;
25- (void)closeQuietly;
26- (void)sendEventToAllConnections:(NSString *)event;
27- (void)setBundleStatusProvider:(RCTBundleStatusProvider)bundleStatusProvider;
28@end
29
30@interface RCTInspectorRemoteConnection : NSObject
31- (void)onMessage:(NSString *)message;
32- (void)onDisconnect;
33@end
34
35#endif