Diff for /libaitwww/inc/aitwww.h between versions 1.5 and 1.6

version 1.5, 2012/09/20 14:19:45 version 1.6, 2013/05/30 09:25:35
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 50  SUCH DAMAGE. Line 50  SUCH DAMAGE.
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/queue.h>  #include <sys/queue.h>
 #include <sys/uio.h>  #include <sys/uio.h>
#include <aitio.h>#include <elwix.h>
   
   
 /* URL staff ... */  /* URL staff ... */
Line 116  typedef int (*list_cb_t)(struct tagCGI *, void *); Line 116  typedef int (*list_cb_t)(struct tagCGI *, void *);
   
   
 // www_GetErrno() Get error code of last operation  // www_GetErrno() Get error code of last operation
inline int www_GetErrno();int www_GetErrno();
 // www_GetError() Get error text of last operation  // www_GetError() Get error text of last operation
inline const char *www_GetError();const char *www_GetError();
   
   
 /*  /*
Line 158  cgi_t *www_parseMultiPart(const char *str, int ctlen,  Line 158  cgi_t *www_parseMultiPart(const char *str, int ctlen, 
  * @name = Name of cgi variable   * @name = Name of cgi variable
  * return: NULL not found or !=NULL value   * return: NULL not found or !=NULL value
  */   */
inline const char *www_getValue(cgi_t * __restrict cgi, const char *name);const char *www_getValue(cgi_t * __restrict cgi, const char *name);
 /*  /*
  * www_addValue() - Add new or update if exists CGI variable   * www_addValue() - Add new or update if exists CGI variable
  *   *
Line 184  int www_delPair(cgi_t * __restrict cgi, const char *na Line 184  int www_delPair(cgi_t * __restrict cgi, const char *na
  * @arg = Optional argument pass through callback   * @arg = Optional argument pass through callback
  * return: -1 error or >-1 number of elements   * return: -1 error or >-1 number of elements
  */   */
inline int www_listPairs(cgi_t * __restrict cgi, list_cb_t func, void *arg);int www_listPairs(cgi_t * __restrict cgi, list_cb_t func, void *arg);
   
 /*  /*
  * www_header() - Output initial html header   * www_header() - Output initial html header
Line 192  inline int www_listPairs(cgi_t * __restrict cgi, list_ Line 192  inline int www_listPairs(cgi_t * __restrict cgi, list_
  * @output = file handle   * @output = file handle
  * return: <1 error or >0 writed bytes   * return: <1 error or >0 writed bytes
  */   */
inline int www_header(FILE *output);int www_header(FILE *output);
   
 /*  /*
  * www_parseAttributes() - Parse attributes   * www_parseAttributes() - Parse attributes
Line 200  inline int www_header(FILE *output); Line 200  inline int www_header(FILE *output);
  * @ct = Content type   * @ct = Content type
  * return: NULL error or !=NULL attributes   * return: NULL error or !=NULL attributes
  */   */
inline cgi_t *www_parseAttributes(const char **ct);cgi_t *www_parseAttributes(const char **ct);
 /*  /*
  * www_getAttribute() - Get Attribute from attribute session   * www_getAttribute() - Get Attribute from attribute session
  *   *
Line 208  inline cgi_t *www_parseAttributes(const char **ct); Line 208  inline cgi_t *www_parseAttributes(const char **ct);
  * @name = Name of attribute variable   * @name = Name of attribute variable
  * return: NULL not found or !=NULL value   * return: NULL not found or !=NULL value
  */   */
inline ait_val_t *www_getAttribute(cgi_t * __restrict cgi, const char *name);ait_val_t *www_getAttribute(cgi_t * __restrict cgi, const char *name);
   
   
 /*  /*
Line 232  int www_cmptype(const char *ct, const char *type); Line 232  int www_cmptype(const char *ct, const char *type);
  *   *
  * @str = query string   * @str = query string
  * @delim = delimiter   * @delim = delimiter
 * return: NULL error or AV pair, must be io_free() after use! * return: NULL error or AV pair, must be e_free() after use!
  */   */
 ait_val_t *www_getpair(char ** __restrict str, const char *delim);  ait_val_t *www_getpair(char ** __restrict str, const char *delim);
 /*  /*
Line 241  ait_val_t *www_getpair(char ** __restrict str, const c Line 241  ait_val_t *www_getpair(char ** __restrict str, const c
  * @str = string   * @str = string
  * return: digit   * return: digit
  */   */
inline char www_x2c(const char *str);char www_x2c(const char *str);
 /*  /*
  * www_unescape() - Unescape/decode WWW query string to host string   * www_unescape() - Unescape/decode WWW query string to host string
  *   *
  * @str = string   * @str = string
  * return: none   * return: none
  */   */
inline void www_unescape(char * __restrict str);void www_unescape(char * __restrict str);
 /*  /*
  * www_undot() - Undotted and clean WWW query filename   * www_undot() - Undotted and clean WWW query filename
  *   *
  * @pname = query filename   * @pname = query filename
 * return: =NULL error or !=NULL allocated valid filename, after use you must call io_freeVar() * return: =NULL error or !=NULL allocated valid filename, after use you must call ait_freeVar()
  */   */
 ait_val_t *www_undot(const char * __restrict pname);  ait_val_t *www_undot(const char * __restrict pname);
   
Line 264  ait_val_t *www_undot(const char * __restrict pname); Line 264  ait_val_t *www_undot(const char * __restrict pname);
  * @url = Input URL   * @url = Input URL
  * return: -1 error or 0 ok   * return: -1 error or 0 ok
  */   */
inline int www_URLInit(struct tagIOURL * __restrict url);int www_URLInit(struct tagIOURL * __restrict url);
 /*  /*
  * www_URLFree() - URL free structure   * www_URLFree() - URL free structure
  *   *
  * @url = Input parsed URL   * @url = Input parsed URL
  * return: none   * return: none
  */   */
inline void www_URLFree(struct tagIOURL * __restrict url);void www_URLFree(struct tagIOURL * __restrict url);
 /*  /*
  * www_URLGet() - Parse and get data from input URL   * www_URLGet() - Parse and get data from input URL
  *   *
Line 304  int www_XMLGet(const char *csXML, struct tagReqXML *xm Line 304  int www_XMLGet(const char *csXML, struct tagReqXML *xm
  * www_b64encode() - Base64 encode function   * www_b64encode() - Base64 encode function
  *   *
  * @src = source data   * @src = source data
 * return: NULL error or !=NULL encoded variable, after use call io_freeVar() * return: NULL error or !=NULL encoded variable, after use call ait_freeVar()
  */   */
 ait_val_t *www_b64encode(ait_val_t * __restrict src);  ait_val_t *www_b64encode(ait_val_t * __restrict src);
 /*  /*
  * www_b64decode() - Base64 decode function   * www_b64decode() - Base64 decode function
  *   *
  * @src = source encoded data   * @src = source encoded data
 * return: NULL error or !=NULL decoded variable, after use call io_freeVar() * return: NULL error or !=NULL decoded variable, after use call ait_freeVar()
  */   */
 ait_val_t *www_b64decode(ait_val_t * __restrict src);  ait_val_t *www_b64decode(ait_val_t * __restrict src);
   

Removed from v.1.5  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>