--- libaitio/inc/aitio.h 2012/11/19 21:12:03 1.27 +++ libaitio/inc/aitio.h 2012/12/19 11:03:04 1.28 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.27 2012/11/19 21:12:03 misho Exp $ +* $Id: aitio.h,v 1.28 2012/12/19 11:03:04 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -960,6 +960,30 @@ int io_MakeAV(const char * __restrict csArgs, const ch */ int io_MakeAV2(char * __restrict psArgs, const char *csDelim, char ** __restrict psAttr, char ** __restrict psValue); +/* + * io_AV2Path() - Attribute/Value pair store to file + * + * @csPath = Directory + * @csAttr = Attribute + * @csVal = Value + * @update = Update if a/v exists + * @perm = File permissions, if =0 set default perm=0600 + * return: -1 error or >-1 written bytes + */ +int io_AV2Path(const char *csPath, const char *csAttr, const char *csVal, + int update, int perm); +/* + * io_Path2AV() - Get stored Attribute/Value + * + * @csPath = Directory + * @csAttr = Attribute + * @psVal = Value + * @valLen = Value length + * @del = Delete a/v pair after read + * return: -1 error or >-1 readed bytes + */ +int io_Path2AV(const char *csPath, const char *csAttr, char *psVal, int valLen, + int del); /* * io_sarrInit() - Create and initialize dynamic split-order array