head 1.10; access; symbols LMTP2NNTP_1_4_1:1.10 LMTP2NNTP_1_4_0:1.10 VAL_0_9_4:1.10 VAL_0_9_3:1.9 LMTP2NNTP_1_3_0:1.9 LMTP2NNTP_1_3b2:1.9 LMTP2NNTP_1_3b1:1.9 LMTP2NNTP_1_3a3:1.9 LMTP2NNTP_1_3a2:1.9 LMTP2NNTP_1_3a1:1.9 VAL_0_9_2:1.9 VAL_0_9_1:1.8 LMTP2NNTP_1_2_0:1.8 LMTP2NNTP_1_2b4:1.8 LMTP2NNTP_1_2b3:1.8 LMTP2NNTP_1_2b2:1.8 LMTP2NNTP_1_2b1:1.8 LMTP2NNTP_1_2a8:1.8 LMTP2NNTP_1_2a7:1.8 LMTP2NNTP_1_2a6:1.7 LMTP2NNTP_1_2a5:1.7 VAL_0_9_0:1.7 LMTP2NNTP_1_2a4:1.7 LMTP2NNTP_1_2a3:1.6; locks; strict; comment @ * @; 1.10 date 2005.10.03.07.22.13; author rse; state Exp; branches; next 1.9; 1.9 date 2004.04.04.10.40.50; author rse; state Exp; branches; next 1.8; 1.8 date 2003.02.02.14.22.43; author rse; state Exp; branches; next 1.7; 1.7 date 2002.03.13.18.35.58; author rse; state Exp; branches; next 1.6; 1.6 date 2002.01.30.18.55.23; author rse; state Exp; branches; next 1.5; 1.5 date 2002.01.17.12.19.09; author rse; state Exp; branches; next 1.4; 1.4 date 2002.01.16.20.32.23; author rse; state Exp; branches; next 1.3; 1.3 date 2002.01.16.20.24.10; author rse; state Exp; branches; next 1.2; 1.2 date 2002.01.16.14.17.56; author rse; state Exp; branches; next 1.1; 1.1 date 2002.01.09.10.44.28; author rse; state Exp; branches; next ; desc @@ 1.10 log @Bumped year in copyright messages for new year 2005 @ text @/* ** OSSP val - Value Access ** Copyright (c) 2002-2005 Ralf S. Engelschall ** Copyright (c) 2002-2005 The OSSP Project ** Copyright (c) 2002-2005 Cable & Wireless ** ** This file is part of OSSP val, a value access library which ** can be found at http://www.ossp.org/pkg/lib/val/. ** ** Permission to use, copy, modify, and distribute this software for ** any purpose with or without fee is hereby granted, provided that ** the above copyright notice and this permission notice appear in all ** copies. ** ** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ** SUCH DAMAGE. ** ** val.h: library API */ #ifndef __VAL_H__ #define __VAL_H__ #include /* maximum length of a structured value name */ #define VAL_MAXNAME 1024 /* the set of distinct value types */ enum { VAL_TYPE_VAL = 1<<0, VAL_TYPE_PTR = 1<<1, VAL_TYPE_CHAR = 1<<2, VAL_TYPE_SHORT = 1<<3, VAL_TYPE_INT = 1<<4, VAL_TYPE_LONG = 1<<5, VAL_TYPE_FLOAT = 1<<6, VAL_TYPE_DOUBLE = 1<<7 }; /* the set of return codes */ typedef enum { VAL_OK, /* everything ok */ VAL_ERR_ARG, /* error: invalid argument */ VAL_ERR_USE, /* error: invalid use */ VAL_ERR_MEM, /* error: no more memory */ VAL_ERR_HSH, /* error: hash table problem */ VAL_ERR_INT, /* error: internal error */ VAL_ERR_SYS /* error: system error (see errno) */ } val_rc_t; /* the opaque data structure and type */ struct val_s; typedef struct val_s val_t; /* function type for use with val_apply() */ typedef val_rc_t (*val_cb_t)(void *, const char *, int, const char *, void *); /* unique library identifier */ extern const char val_id[]; /* set of API functions */ val_rc_t val_create (val_t **); val_rc_t val_destroy (val_t *); val_rc_t val_reg (val_t *, const char *, int, const char *, void *); val_rc_t val_unreg (val_t *, const char *); val_rc_t val_query (val_t *, const char *, int *, char **, void **); val_rc_t val_set (val_t *, const char *, ...); val_rc_t val_get (val_t *, const char *, ...); val_rc_t val_vset (val_t *, const char *, va_list); val_rc_t val_vget (val_t *, const char *, va_list); val_rc_t val_apply (val_t *, const char *, int, val_cb_t, void *); #endif /* __VAL_H__ */ @ 1.9 log @adjust copyrights @ text @d3 3 a5 3 ** Copyright (c) 2002-2004 Ralf S. Engelschall ** Copyright (c) 2002-2004 The OSSP Project ** Copyright (c) 2002-2004 Cable & Wireless @ 1.8 log @bump year in copyright messages @ text @d3 3 a5 3 ** Copyright (c) 2002-2003 Ralf S. Engelschall ** Copyright (c) 2002-2003 The OSSP Project ** Copyright (c) 2002-2003 Cable & Wireless Deutschland @ 1.7 log @fix naming and URLs @ text @d3 3 a5 3 ** Copyright (c) 2002 Ralf S. Engelschall ** Copyright (c) 2002 The OSSP Project ** Copyright (c) 2002 Cable & Wireless Deutschland @ 1.6 log @add optional OSSP ex based exception handling support @ text @d2 1 a2 1 ** val - OSSP Value Library d7 2 a8 2 ** This file is part of OSSP val, a Value library which ** can be found at http://www.ossp.org/pkg/val/. @ 1.5 log @add val_unreg() function @ text @d69 3 @ 1.4 log @add general query function which can be used to get back all things which were stored on val_reg() and especially allows to query just the existance of the value. @ text @d73 1 @ 1.3 log @- fully document the source code - lots of additional cosmetic cleanups @ text @d73 1 @ 1.2 log @move val+lh code from OSSP lmtp2nntp to its dedicated source tree @ text @d36 4 d51 1 d53 7 a59 5 VAL_OK, VAL_ERR_ARG, VAL_ERR_USE, VAL_ERR_MEM, VAL_ERR_SYS d62 1 d66 1 d69 1 @ 1.1 log @Create a fresh build environment for new born child OSSP val. This soon to be written library will provide a user-land val with O(1) time complexity and fixed size memory usage. @ text @d34 35 @