Stream debug and tests
This commit is contained in:
parent
e4adec413a
commit
fa9b9c7e2e
8 changed files with 295 additions and 121 deletions
|
|
@ -41,11 +41,12 @@
|
|||
*/
|
||||
/* Subscription callback
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] op Operation: 0 OK, 1 Close
|
||||
* @param[in] event Event as XML
|
||||
* @param[in] arg Extra argument provided in stream_ss_add
|
||||
* @see stream_ss_add
|
||||
*/
|
||||
typedef int (*stream_fn_t)(clicon_handle h, cxobj *event, void *arg);
|
||||
typedef int (*stream_fn_t)(clicon_handle h, int op, cxobj *event, void *arg);
|
||||
|
||||
struct stream_subscription{
|
||||
qelem_t ss_q; /* queue header */
|
||||
|
|
@ -90,7 +91,7 @@ int stream_timer_setup(int fd, void *arg);
|
|||
struct stream_subscription *stream_ss_add(clicon_handle h, char *stream,
|
||||
char *xpath, struct timeval *start, struct timeval *stop,
|
||||
stream_fn_t fn, void *arg);
|
||||
int stream_ss_rm(event_stream_t *es, struct stream_subscription *ss);
|
||||
int stream_ss_rm(clicon_handle h, event_stream_t *es, struct stream_subscription *ss);
|
||||
struct stream_subscription *stream_ss_find(event_stream_t *es,
|
||||
stream_fn_t fn, void *arg);
|
||||
int stream_ss_delete_all(clicon_handle h, stream_fn_t fn, void *arg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue