X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=uci.h;h=5cd36e0956ce5be777947cb1c32507e64ecb9e57;hp=29cd07d0410e7e8c75d79717b87a402dfb2b844a;hb=8dd3eb50025224bd2aa286c0e5c27d230efb7bde;hpb=53726f5dd57ab09a206c96108a71db25e7517caa diff --git a/uci.h b/uci.h index 29cd07d..5cd36e0 100644 --- a/uci.h +++ b/uci.h @@ -15,6 +15,8 @@ #ifndef __LIBUCI_H #define __LIBUCI_H +#include "uci_config.h" + /* * you can use these defines to enable debugging behavior for * apps compiled against libuci: @@ -24,18 +26,14 @@ * */ -#ifdef DEBUG_ALL -#define UCI_DEBUG -#define UCI_DEBUG_TYPECAST -#endif - #include #include #include #define UCI_CONFDIR "/etc/config" #define UCI_SAVEDIR "/tmp/.uci" -#define UCI_FILEMODE 0600 +#define UCI_DIRMODE 0700 +#define UCI_FILEMODE 0600 enum { @@ -314,6 +312,10 @@ struct uci_backend char **(*list_configs)(struct uci_context *ctx); struct uci_package *(*load)(struct uci_context *ctx, const char *name); void (*commit)(struct uci_context *ctx, struct uci_package **p, bool overwrite); + + /* private: */ + const void *ptr; + void *priv; }; struct uci_context @@ -393,17 +395,6 @@ struct uci_history char *value; }; -#define UCI_BACKEND(_var, _name, ...) \ -struct uci_backend _var = { \ - .e.list = { \ - .next = &_var.e.list, \ - .prev = &_var.e.list, \ - }, \ - .e.name = _name, \ - .e.type = UCI_TYPE_BACKEND, \ - __VA_ARGS__ \ -} - /* linked list handling */ #ifndef offsetof