Restructured error,debug anf log API

Renamed functions clicon->clixon, replaced global variables w access functions
Unified clicon_netconf_error with clixon_err()
This commit is contained in:
Olof hagsand 2023-11-13 10:12:52 +01:00
parent 261469be16
commit 24a4991ec8
199 changed files with 4668 additions and 4158 deletions

View file

@ -53,7 +53,7 @@
* @param[in] arg Extra argument provided in stream_ss_add
* @see stream_ss_add
*/
typedef int (*stream_fn_t)(clicon_handle h, int op, cxobj *event, void *arg);
typedef int (*stream_fn_t)(clixon_handle h, int op, cxobj *event, void *arg);
struct stream_subscription{
qelem_t ss_q; /* queue header */
@ -89,30 +89,30 @@ typedef struct event_stream event_stream_t;
/*
* Prototypes
*/
event_stream_t *stream_find(clicon_handle h, const char *name);
int stream_add(clicon_handle h, const char *name, const char *description, int replay_enabled, struct timeval *retention);
int stream_delete_all(clicon_handle h, int force);
int stream_get_xml(clicon_handle h, int access, cbuf *cb);
event_stream_t *stream_find(clixon_handle h, const char *name);
int stream_add(clixon_handle h, const char *name, const char *description, int replay_enabled, struct timeval *retention);
int stream_delete_all(clixon_handle h, int force);
int stream_get_xml(clixon_handle h, int access, cbuf *cb);
int stream_timer_setup(int fd, void *arg);
/* Subscriptions */
struct stream_subscription *stream_ss_add(clicon_handle h, char *stream,
struct stream_subscription *stream_ss_add(clixon_handle h, char *stream,
char *xpath, struct timeval *start, struct timeval *stop,
stream_fn_t fn, void *arg);
int stream_ss_rm(clicon_handle h, event_stream_t *es, struct stream_subscription *ss, int force);
int stream_ss_rm(clixon_handle h, event_stream_t *es, struct stream_subscription *ss, int force);
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);
int stream_ss_delete(clicon_handle h, char *name, stream_fn_t fn, void *arg);
int stream_ss_delete_all(clixon_handle h, stream_fn_t fn, void *arg);
int stream_ss_delete(clixon_handle h, char *name, stream_fn_t fn, void *arg);
int stream_notify_xml(clicon_handle h, char *stream, cxobj *xml);
int stream_notify(clicon_handle h, char *stream, const char *event, ...) __attribute__ ((format (printf, 3, 4)));
int stream_notify_xml(clixon_handle h, char *stream, cxobj *xml);
int stream_notify(clixon_handle h, char *stream, const char *event, ...) __attribute__ ((format (printf, 3, 4)));
/* Replay */
int stream_replay_add(event_stream_t *es, struct timeval *tv, cxobj *xv);
int stream_replay_trigger(clicon_handle h, char *stream, stream_fn_t fn, void *arg);
int stream_replay_trigger(clixon_handle h, char *stream, stream_fn_t fn, void *arg);
/* Experimental publish streams using SSE. CLIXON_PUBLISH_STREAMS should be set */
int stream_publish(clicon_handle h, char *stream);
int stream_publish(clixon_handle h, char *stream);
int stream_publish_init();
int stream_publish_exit();