all clixon event functions prepended with clixon_

Replaced fcgi getparam code with clixon-data parameters
This commit is contained in:
Olof hagsand 2020-06-05 16:19:03 +02:00
parent a455b15f03
commit 14b03f63a3
34 changed files with 567 additions and 877 deletions

View file

@ -2,7 +2,9 @@
*
***** BEGIN LICENSE BLOCK *****
Copyright (C) 2009-2019 Olof Hagsand and Benny Holmgren
Copyright (C) 2009-2016 Olof Hagsand and Benny Holmgren
Copyright (C) 2017-2019 Olof Hagsand
Copyright (C) 2020 Olof Hagsand and Rubicon Communications, LLC(Netgate)
This file is part of CLIXON.
@ -35,6 +37,7 @@
* Access functions for clixon data.
* Free-typed values for runtime getting and setting.
* Accessed with clicon_data(h).
* @see clixon_option.[ch] for clixon options
*/
#ifndef _CLIXON_DATA_H_
@ -52,6 +55,10 @@ typedef struct {
/*
* Prototypes
*/
int clicon_data_get(clicon_handle h, char *id, char **val);
int clicon_data_set(clicon_handle h, char *id, char *val);
int clicon_data_del(clicon_handle h, char *name);
yang_stmt * clicon_dbspec_yang(clicon_handle h);
int clicon_dbspec_yang_set(clicon_handle h, yang_stmt *ys);

View file

@ -2,7 +2,9 @@
*
***** BEGIN LICENSE BLOCK *****
Copyright (C) 2009-2019 Olof Hagsand and Benny Holmgren
Copyright (C) 2009-2016 Olof Hagsand and Benny Holmgren
Copyright (C) 2017-2019 Olof Hagsand
Copyright (C) 2020 Olof Hagsand and Rubicon Communications, LLC(Netgate)
This file is part of CLIXON.
@ -47,19 +49,19 @@ int clicon_exit_reset(void);
int clicon_exit_get(void);
int event_reg_fd(int fd, int (*fn)(int, void*), void *arg, char *str);
int clixon_event_reg_fd(int fd, int (*fn)(int, void*), void *arg, char *str);
int event_unreg_fd(int s, int (*fn)(int, void*));
int clixon_event_unreg_fd(int s, int (*fn)(int, void*));
int event_reg_timeout(struct timeval t, int (*fn)(int, void*),
void *arg, char *str);
int clixon_event_reg_timeout(struct timeval t, int (*fn)(int, void*),
void *arg, char *str);
int event_unreg_timeout(int (*fn)(int, void*), void *arg);
int clixon_event_unreg_timeout(int (*fn)(int, void*), void *arg);
int event_poll(int fd);
int clixon_event_poll(int fd);
int event_loop(void);
int clixon_event_loop(void);
int event_exit(void);
int clixon_event_exit(void);
#endif /* _CLIXON_EVENT_H_ */

View file

@ -33,8 +33,10 @@
***** END LICENSE BLOCK *****
*
* Configuration file and Options.
* This file contains access functions for two types of clixon vars:
* - options, ie string based variables from Clixon configuration files.
* Accessed with clicon_options(h).
* @see clixon_data.[ch] for free-type runtime get/set *
*/
#ifndef _CLIXON_OPTIONS_H_

View file

@ -89,6 +89,7 @@ static inline char * strdup4(char *str)
*/
char **clicon_strsep(char *string, char *delim, int *nvec0);
char *clicon_strjoin (int argc, char **argv, char *delim);
int clixon_strsplit(char *nodeid, const int delim, char **prefix, char **id);
int str2cvec(char *string, char delim1, char delim2, cvec **cvp);
#if defined(__GNUC__) && __GNUC__ >= 3
int uri_percent_encode(char **encp, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));