summaryrefslogtreecommitdiff
path: root/bufferevent-internal.h
diff options
context:
space:
mode:
authorAzat Khuzhin <a3at.mail@gmail.com>2017-03-12 20:50:35 +0300
committerAzat Khuzhin <a3at.mail@gmail.com>2017-03-13 12:57:22 +0300
commit9081b66c9c1446b11c0052bade799fafb460efed (patch)
tree5a736bdd8a074e93dc79c2faece3e4a67df1c203 /bufferevent-internal.h
parent83b1584700ec453e89017b5f12cf338a50b101b4 (diff)
downloadlibevent-9081b66c9c1446b11c0052bade799fafb460efed.tar.gz
Export symbols for -fvisibility=hidden (under cmake)
Fixes: #442
Diffstat (limited to 'bufferevent-internal.h')
-rw-r--r--bufferevent-internal.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/bufferevent-internal.h b/bufferevent-internal.h
index 9960aefa..b448eead 100644
--- a/bufferevent-internal.h
+++ b/bufferevent-internal.h
@@ -314,13 +314,16 @@ extern const struct bufferevent_ops bufferevent_ops_async;
#endif
/** Initialize the shared parts of a bufferevent. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_init_common_(struct bufferevent_private *, struct event_base *, const struct bufferevent_ops *, enum bufferevent_options options);
/** For internal use: temporarily stop all reads on bufev, until the conditions
* in 'what' are over. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
/** For internal use: clear the conditions 'what' on bufev, and re-enable
* reading if there are no conditions left. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
/** For internal use: temporarily stop all writes on bufev, until the conditions
@@ -347,16 +350,19 @@ void bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend
@return 0 if successful, or -1 if an error occurred
@see bufferevent_disable()
*/
+EVENT2_EXPORT_SYMBOL
int bufferevent_disable_hard_(struct bufferevent *bufev, short event);
/** Internal: Set up locking on a bufferevent. If lock is set, use it.
* Otherwise, use a new lock. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_enable_locking_(struct bufferevent *bufev, void *lock);
/** Internal: backwards compat macro for the now public function
* Increment the reference count on bufev. */
#define bufferevent_incref_(bufev) bufferevent_incref(bufev)
/** Internal: Lock bufev and increase its reference count.
* unlocking it otherwise. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_incref_and_lock_(struct bufferevent *bufev);
/** Internal: backwards compat macro for the now public function
* Decrement the reference count on bufev. Returns 1 if it freed
@@ -365,17 +371,21 @@ void bufferevent_incref_and_lock_(struct bufferevent *bufev);
/** Internal: Drop the reference count on bufev, freeing as necessary, and
* unlocking it otherwise. Returns 1 if it freed the bufferevent. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
/** Internal: If callbacks are deferred and we have a read callback, schedule
* a readcb. Otherwise just run the readcb. Ignores watermarks. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_run_readcb_(struct bufferevent *bufev, int options);
/** Internal: If callbacks are deferred and we have a write callback, schedule
* a writecb. Otherwise just run the writecb. Ignores watermarks. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_run_writecb_(struct bufferevent *bufev, int options);
/** Internal: If callbacks are deferred and we have an eventcb, schedule
* it to run with events "what". Otherwise just run the eventcb.
* See bufferevent_trigger_event for meaning of "options". */
+EVENT2_EXPORT_SYMBOL
void bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options);
/** Internal: Run or schedule (if deferred or options contain
@@ -399,6 +409,7 @@ bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options
/** Internal: Add the event 'ev' with timeout tv, unless tv is set to 0, in
* which case add ev with no timeout. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
/* =========
@@ -408,16 +419,21 @@ int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
/** Internal use: Set up the ev_read and ev_write callbacks so that
* the other "generic_timeout" functions will work on it. Call this from
* the constructor function. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_init_generic_timeout_cbs_(struct bufferevent *bev);
/** Internal use: Add or delete the generic timeout events as appropriate.
* (If an event is enabled and a timeout is set, we add the event. Otherwise
* we delete it.) Call this from anything that changes the timeout values,
* that enabled EV_READ or EV_WRITE, or that disables EV_READ or EV_WRITE. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_generic_adj_timeouts_(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
int bufferevent_generic_adj_existing_timeouts_(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
enum bufferevent_options bufferevent_get_options_(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
const struct sockaddr*
bufferevent_socket_get_conn_address_(struct bufferevent *bev);
@@ -465,11 +481,15 @@ bufferevent_socket_get_conn_address_(struct bufferevent *bev);
/* ==== For rate-limiting. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_decrement_write_buckets_(struct bufferevent_private *bev,
ev_ssize_t bytes);
+EVENT2_EXPORT_SYMBOL
int bufferevent_decrement_read_buckets_(struct bufferevent_private *bev,
ev_ssize_t bytes);
+EVENT2_EXPORT_SYMBOL
ev_ssize_t bufferevent_get_read_max_(struct bufferevent_private *bev);
+EVENT2_EXPORT_SYMBOL
ev_ssize_t bufferevent_get_write_max_(struct bufferevent_private *bev);
int bufferevent_ratelim_init_(struct bufferevent_private *bev);