version 1.2, 2012/03/10 00:26:49
|
version 1.2.2.1, 2012/03/10 15:00:45
|
Line 52 SUCH DAMAGE.
|
Line 52 SUCH DAMAGE.
|
#include <sys/uio.h> |
#include <sys/uio.h> |
|
|
|
|
|
/* URL staff ... */ |
|
|
|
typedef struct _tagURLItem { |
|
int vallen; |
|
char *value; |
|
} url_Item_t; |
|
|
|
struct tagIOURL { |
|
unsigned char url_line[BUFSIZ]; |
|
|
|
url_Item_t url_tech; |
|
url_Item_t url_user; |
|
url_Item_t url_pass; |
|
url_Item_t url_host; |
|
url_Item_t url_port; |
|
url_Item_t url_path; |
|
url_Item_t url_args; |
|
|
|
char *url_reserved; |
|
}; |
|
|
|
struct tagReqXML { |
|
unsigned char xml_line[BUFSIZ]; |
|
|
|
url_Item_t xml_namespace; |
|
union { |
|
url_Item_t container; |
|
url_Item_t path; |
|
} xml_node; |
|
url_Item_t xml_data; |
|
url_Item_t xml_attribute; |
|
url_Item_t xml_value; |
|
}; |
|
|
|
/* CGI variables */ |
|
|
struct tagCGI { |
struct tagCGI { |
char *cgi_name; |
char *cgi_name; |
char *cgi_value; |
char *cgi_value; |
Line 178 inline void www_freeAttributes(cgi_t ** __restrict att
|
Line 214 inline void www_freeAttributes(cgi_t ** __restrict att
|
* return: NULL not found or !=NULL attribute value |
* return: NULL not found or !=NULL attribute value |
*/ |
*/ |
inline const char *www_getAttribute(cgi_t * __restrict attr, const char *name); |
inline const char *www_getAttribute(cgi_t * __restrict attr, const char *name); |
|
|
|
|
|
/* |
|
* www_URLGet() - Parse and get data from input URL |
|
* |
|
* @csURL = Input URL line |
|
* @url = Output parsed URL |
|
* return: 0 error format not find tech:// and return URL like path; |
|
* -1 error:: can`t read; >0 ok, up bits for known elements |
|
*/ |
|
int www_URLGet(const char *csURL, struct tagIOURL *url); |
|
/* |
|
* www_URLGetFile() - Get file from parsed URL |
|
* |
|
* @url = Input parsed URL |
|
* @psValue = Return filename, if not specified file in url path, replace with / |
|
* @valLen = Size of psValue array |
|
* return: -1 error:: can`t read; 0 ok |
|
*/ |
|
int www_URLGetFile(struct tagIOURL *url, char * __restrict psValue, int valLen); |
|
|
|
/* |
|
* www_Path2File() - Parse and make path/filename pair |
|
* |
|
* @csArgs = Input argument line |
|
* @psPath = Output Path, if ==NULL path not returned |
|
* @pathLen = Size of path array |
|
* @psFile = Output File |
|
* @fileLen = Size of file array |
|
* return: 0 error format; -1 error:: can`t read; >0 ok, number of readed items |
|
*/ |
|
inline int www_Path2File(const char * __restrict csArgs, char * __restrict psPath, |
|
int pathLen, char * __restrict psFile, int fileLen); |
|
|
|
/* |
|
* www_XMLGet() - Parse and get data from input XML request string |
|
* [ns:]container[|attribute[=value]][?data] |
|
* |
|
* @csXML = Input XML request line |
|
* @xml = Output parsed XML request |
|
* return: 0 error format incorrect, -1 error:: can`t read; >0 ok readed elements bits |
|
*/ |
|
int www_XMLGet(const char *csXML, struct tagReqXML *xml); |
|
|
|
|
#endif |
#endif |