Commit 32a1ef85 authored by Luca Boccassi's avatar Luca Boccassi

Problem: zmq_timers* are not yet stable APIs

Solution: mark them as DRAFT APIs
parent 73896808
......@@ -394,7 +394,6 @@ test_apps = \
tests/test_sockopt_hwm \
tests/test_heartbeats \
tests/test_stream_exceeds_buffer \
tests/test_timers \
tests/test_radio_dish \
tests/test_udp \
tests/test_scatter_gather \
......@@ -597,9 +596,6 @@ tests_test_heartbeats_LDADD = src/libzmq.la
tests_test_stream_exceeds_buffer_SOURCES = tests/test_stream_exceeds_buffer.cpp
tests_test_stream_exceeds_buffer_LDADD = src/libzmq.la
tests_test_timers_SOURCES = tests/test_timers.cpp
tests_test_timers_LDADD = src/libzmq.la
tests_test_radio_dish_SOURCES = tests/test_radio_dish.cpp
tests_test_radio_dish_LDADD = src/libzmq.la
......@@ -731,7 +727,8 @@ endif
if ENABLE_DRAFTS
test_apps += tests/test_poller \
tests/test_client_server \
tests/test_thread_safe
tests/test_thread_safe \
tests/test_timers
tests_test_poller_SOURCES = tests/test_poller.cpp
tests_test_poller_LDADD = src/libzmq.la
......@@ -741,6 +738,9 @@ tests_test_client_server_LDADD = src/libzmq.la
tests_test_thread_safe_SOURCES = tests/test_thread_safe.cpp
tests_test_thread_safe_LDADD = src/libzmq.la
tests_test_timers_SOURCES = tests/test_timers.cpp
tests_test_timers_LDADD = src/libzmq.la
endif
check_PROGRAMS = ${test_apps}
......
......@@ -437,22 +437,6 @@ typedef struct zmq_pollitem_t
ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
/******************************************************************************/
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
typedef void (zmq_timer_fn)(int timer_id, void *arg);
ZMQ_EXPORT void *zmq_timers_new (void);
ZMQ_EXPORT int zmq_timers_destroy (void **timers_p);
ZMQ_EXPORT int zmq_timers_add (void *timers, size_t interval, zmq_timer_fn handler, void *arg);
ZMQ_EXPORT int zmq_timers_cancel (void *timers, int timer_id);
ZMQ_EXPORT int zmq_timers_set_interval (void *timers, int timer_id, size_t interval);
ZMQ_EXPORT int zmq_timers_reset (void *timers, int timer_id);
ZMQ_EXPORT long zmq_timers_timeout (void *timers);
ZMQ_EXPORT int zmq_timers_execute (void *timers);
/******************************************************************************/
/* Message proxying */
/******************************************************************************/
......@@ -583,6 +567,23 @@ ZMQ_EXPORT int zmq_poller_modify_fd (void *poller, int fd, short events);
ZMQ_EXPORT int zmq_poller_remove_fd (void *poller, int fd);
#endif
/******************************************************************************/
/* Scheduling timers */
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
typedef void (zmq_timer_fn)(int timer_id, void *arg);
ZMQ_EXPORT void *zmq_timers_new (void);
ZMQ_EXPORT int zmq_timers_destroy (void **timers_p);
ZMQ_EXPORT int zmq_timers_add (void *timers, size_t interval, zmq_timer_fn handler, void *arg);
ZMQ_EXPORT int zmq_timers_cancel (void *timers, int timer_id);
ZMQ_EXPORT int zmq_timers_set_interval (void *timers, int timer_id, size_t interval);
ZMQ_EXPORT int zmq_timers_reset (void *timers, int timer_id);
ZMQ_EXPORT long zmq_timers_timeout (void *timers);
ZMQ_EXPORT int zmq_timers_execute (void *timers);
#endif // ZMQ_BUILD_DRAFT_API
......
......@@ -195,6 +195,23 @@ int zmq_poller_modify_fd (void *poller, int fd, short events);
int zmq_poller_remove_fd (void *poller, int fd);
#endif
/******************************************************************************/
/* Scheduling timers */
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
typedef void (zmq_timer_fn)(int timer_id, void *arg);
void *zmq_timers_new (void);
int zmq_timers_destroy (void **timers_p);
int zmq_timers_add (void *timers, size_t interval, zmq_timer_fn handler, void *arg);
int zmq_timers_cancel (void *timers, int timer_id);
int zmq_timers_set_interval (void *timers, int timer_id, size_t interval);
int zmq_timers_reset (void *timers, int timer_id);
long zmq_timers_timeout (void *timers);
int zmq_timers_execute (void *timers);
#endif // ZMQ_BUILD_DRAFT_API
#endif //ifndef __ZMQ_PRECOMPILED_HPP_INCLUDED__
......@@ -64,7 +64,6 @@ set(tests
test_stream_timeout
test_xpub_manual
test_xpub_welcome_msg
test_timers
test_radio_dish
test_udp
test_scatter_gather
......@@ -120,6 +119,7 @@ IF (ENABLE_DRAFTS)
test_poller
test_thread_safe
test_client_server
test_timers
)
ENDIF (ENABLE_DRAFTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment