Chromium Code Reviews| Index: components/cronet/ios/Cronet.h |
| diff --git a/components/cronet/ios/Cronet.h b/components/cronet/ios/Cronet.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fd3f500033a04354a9839898a6bc12581ad5a637 |
| --- /dev/null |
| +++ b/components/cronet/ios/Cronet.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import <Foundation/Foundation.h> |
| + |
| +#include "cronet_c_for_grpc.h" |
| + |
| +// Interface for installing Cronet. |
| +@interface Cronet : NSObject |
| + |
| +// Sets whether HTTP/2 should be supported by CronetEngine. This method only has |
| +// any effect before |start| is called. |
| ++ (void)setHttp2Enabled:(BOOL)http2Enabled; |
| + |
| +// Sets whether QUIC should be supported by CronetEngine. This method only has |
| +// any effect before |start| is called. |
| ++ (void)setQuicEnabled:(BOOL)quicEnabled; |
| + |
| +// Adds hint that host supports QUIC on altPort. This method only has any effect |
| +// before |start| is called. |
| ++ (void)addQuicHint:(NSString*)host port:(int)port altPort:(int)altPort; |
| + |
| +// |userAgent| is expected to be of the form Product/Version. |
| +// Example: Foo/3.0.0.0 |
| +// |
| +// This method only has any effect before |start| is called. |
| ++ (void)setPartialUserAgent:(NSString*)userAgent; |
| + |
| +// Sets SSLKEYLogFileName to export SSL key for Wireshark decryption of packet |
| +// captures. This method only has any effect before |start| is called. |
| ++ (void)setSslKeyLogFileName:(NSString*)sslKeyLogFileName; |
| + |
| +// Starts CronetEngine. |
| ++ (void)start; |
| + |
| +// Starts net-internals logging to a file named |fileName| in the application |
| +// temporary directory. |fileName| must not be empty. Log level is determined |
| +// by |logBytes| - if YES then LOG_ALL otherwise LOG_ALL_BUT_BYTES. If the file |
| +// exists it is truncated before starting. If actively logging the call is |
| +// ignored. |
| ++ (void)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes; |
| + |
| +// Stop net-internals logging and flush file to disk. If a logging session is |
| +// not in progress this call is ignored. |
| ++ (void)stopNetLog; |
| + |
| +// Returns the full user-agent that the stack uses. |
| +// This is the exact string servers will see. |
| ++ (NSString*)getUserAgent; |
|
kapishnikov
2016/04/08 23:54:18
Nit: space between 'NSString' and '*'
mef
2016/04/09 00:52:29
I've used 'git cl format components/cronet', and d
|
| + |
| +// Get a pointer to global instance of cronet_engine for GRPC C API. |
| ++ (cronet_engine*)getGlobalEngine; |
| + |
| +@end |