diff --git a/mobile/library/objective-c/EnvoyEngine.h b/mobile/library/objective-c/EnvoyEngine.h index e24eb537f4b6..56338f5890ac 100644 --- a/mobile/library/objective-c/EnvoyEngine.h +++ b/mobile/library/objective-c/EnvoyEngine.h @@ -4,25 +4,8 @@ NS_ASSUME_NONNULL_BEGIN -/// Wrapper layer to simplify calling into Envoy's C/++ API. -@interface EnvoyEngine : NSObject - -/** - Run the Envoy engine with the provided config and log level. - - @param config The configuration file with which to start Envoy. - @return A status indicating if the action was successful. - */ -+ (EnvoyStatus)runWithConfig:(NSString *)config; - -/** - Run the Envoy engine with the provided config and log level. - - @param config The configuration file with which to start Envoy. - @param logLevel The log level to use when starting Envoy. - @return A status indicating if the action was successful. - */ -+ (EnvoyStatus)runWithConfig:(NSString *)config logLevel:(NSString *)logLevel; +/// Protocol interface for streaming with the Envoy engine. +@protocol EnvoyEngineStreamInterface /** Open an underlying HTTP stream. @@ -88,6 +71,28 @@ NS_ASSUME_NONNULL_BEGIN */ + (EnvoyStatus)resetStream:(EnvoyStream *)stream; +@end + +/// Wrapper layer for calling into Envoy's C/++ API. +@interface EnvoyEngine : NSObject + +/** + Run the Envoy engine with the provided config and log level. + + @param config The configuration file with which to start Envoy. + @return A status indicating if the action was successful. + */ ++ (EnvoyStatus)runWithConfig:(NSString *)config; + +/** + Run the Envoy engine with the provided config and log level. + + @param config The configuration file with which to start Envoy. + @param logLevel The log level to use when starting Envoy. + @return A status indicating if the action was successful. + */ ++ (EnvoyStatus)runWithConfig:(NSString *)config logLevel:(NSString *)logLevel; + /// Performs necessary setup after Envoy has initialized and started running. /// TODO: create a post-initialization callback from Envoy to handle this automatically. + (void)setupEnvoy;