21#include <pulsar/c/message.h>
22#include <pulsar/c/result.h>
23#include <pulsar/defines.h>
29typedef struct _pulsar_reader pulsar_reader_t;
31typedef void (*pulsar_result_callback)(pulsar_result,
void *);
36PULSAR_PUBLIC
const char *pulsar_reader_get_topic(pulsar_reader_t *reader);
48PULSAR_PUBLIC pulsar_result pulsar_reader_read_next(pulsar_reader_t *reader, pulsar_message_t **msg);
59PULSAR_PUBLIC pulsar_result pulsar_reader_read_next_with_timeout(pulsar_reader_t *reader,
60 pulsar_message_t **msg,
int timeoutMs);
71PULSAR_PUBLIC
void pulsar_reader_seek_async(pulsar_reader_t *reader, pulsar_message_id_t *messageId,
72 pulsar_result_callback callback,
void *ctx);
82PULSAR_PUBLIC pulsar_result pulsar_reader_seek(pulsar_reader_t *reader, pulsar_message_id_t *messageId);
93PULSAR_PUBLIC
void pulsar_reader_seek_by_timestamp_async(pulsar_reader_t *reader, uint64_t timestamp,
94 pulsar_result_callback callback,
void *ctx);
104PULSAR_PUBLIC pulsar_result pulsar_reader_seek_by_timestamp(pulsar_reader_t *reader, uint64_t timestamp);
106PULSAR_PUBLIC pulsar_result pulsar_reader_close(pulsar_reader_t *reader);
108PULSAR_PUBLIC
void pulsar_reader_close_async(pulsar_reader_t *reader, pulsar_result_callback callback,
111PULSAR_PUBLIC
void pulsar_reader_free(pulsar_reader_t *reader);
113PULSAR_PUBLIC pulsar_result pulsar_reader_has_message_available(pulsar_reader_t *reader,
int *available);
115PULSAR_PUBLIC
int pulsar_reader_is_connected(pulsar_reader_t *reader);