Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: components/cronet/ios/cronet_c_for_grpc.h

Issue 1915683002: Export only Cronet API symbols and hide all others. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Defined CRONET_EXPORT Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/ios/Cronet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/cronet_c_for_grpc.h
diff --git a/components/cronet/ios/cronet_c_for_grpc.h b/components/cronet/ios/cronet_c_for_grpc.h
index 7916450701ec9dd262f40f4930a5fc0b813c0aa8..75eef82c816f8c568b2df7c045dca165c8bd3dcd 100644
--- a/components/cronet/ios/cronet_c_for_grpc.h
+++ b/components/cronet/ios/cronet_c_for_grpc.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_
#define COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_
+#define CRONET_EXPORT __attribute__((visibility("default")))
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -126,6 +128,7 @@ typedef struct cronet_bidirectional_stream_callback {
*
* Both |calback| and |engine| must remain valid until stream is destroyed.
*/
+CRONET_EXPORT
cronet_bidirectional_stream* cronet_bidirectional_stream_create(
cronet_engine* engine,
void* annotation,
@@ -137,6 +140,7 @@ cronet_bidirectional_stream* cronet_bidirectional_stream_create(
* network thread, but is posted, so |stream| is valid until calling task is
* complete.
*/
+CRONET_EXPORT
int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream);
/* Start the stream by sending request to |url| using |method| and |headers|. If
@@ -144,6 +148,7 @@ int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream);
* is HTTP verb, with PUT having a special meaning to mark idempotent request,
* which could use QUIC 0-RTT.
*/
+CRONET_EXPORT
int cronet_bidirectional_stream_start(
cronet_bidirectional_stream* stream,
const char* url,
@@ -161,6 +166,7 @@ int cronet_bidirectional_stream_start(
* there's an error. The callback's on_succeeded() method is also invoked if
* there is no more data to read and |end_of_stream| was previously sent.
*/
+CRONET_EXPORT
int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream,
char* buffer,
int capacity);
@@ -174,6 +180,7 @@ int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream,
* The callback's on_succeeded() method is also invoked if |end_of_stream| is
* set and all response data has been read.
*/
+CRONET_EXPORT
int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream,
const char* buffer,
int buffer_length,
@@ -188,12 +195,14 @@ int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream,
* be invoked. At most one callback method may be invoked after
* cronet_bidirectional_stream_cancel() has completed.
*/
+CRONET_EXPORT
int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream);
/* Returns true if the |stream| was successfully started and is now done
* (succeeded, canceled, or failed).
* Returns false if the |stream| stream is not yet started or is in progress.
*/
+CRONET_EXPORT
bool cronet_bidirectional_stream_is_done(cronet_bidirectional_stream* stream);
#ifdef __cplusplus
« no previous file with comments | « components/cronet/ios/Cronet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698