Back to index

webcit  8.12-dfsg
paramhandling.h
Go to the documentation of this file.
00001 /* URL / Mime Post parsing -> paramhandling.c */
00002 void upload_handler(char *name, char *filename, char *partnum, char *disp,
00003                   void *content, char *cbtype, char *cbcharset,
00004                   size_t length, char *encoding, char *cbid, void *userdata);
00005 
00006 void ParseURLParams(StrBuf *url);
00007 
00008 
00009 /* These may return NULL if not foud */
00010 #define sbstr(a) SBstr(a, sizeof(a) - 1)
00011 const StrBuf *SBSTR(const char *key);
00012 const StrBuf *SBstr(const char *key, size_t keylen);
00013 
00014 #define xbstr(a, b) (char*) XBstr(a, sizeof(a) - 1, b)
00015 const char *XBstr(const char *key, size_t keylen, size_t *len);
00016 const char *XBSTR(const char *key, size_t *len);
00017 
00018 #define lbstr(a) LBstr(a, sizeof(a) - 1)
00019 long LBstr(const char *key, size_t keylen);
00020 long LBSTR(const char *key);
00021 
00022 #define ibstr(a) IBstr(a, sizeof(a) - 1)
00023 #define ibcstr(a) IBstr(a.Key, a.len)
00024 int IBstr(const char *key, size_t keylen);
00025 int IBSTR(const char *key);
00026 
00027 #define havebstr(a) HaveBstr(a, sizeof(a) - 1)
00028 int HaveBstr(const char *key, size_t keylen);
00029 int HAVEBSTR(const char *key);
00030 
00031 #define yesbstr(a) YesBstr(a, sizeof(a) - 1)
00032 int YesBstr(const char *key, size_t keylen);
00033 int YESBSTR(const char *key);
00034 
00035 /* TODO: get rid of the non-const-typecast */
00036 #define bstr(a) (char*) Bstr(a, sizeof(a) - 1)
00037 const char *BSTR(const char *key);
00038 const char *Bstr(const char *key, size_t keylen);
00039 /* if you want to ease some parts by just parametring yourself... */
00040 #define putbstr(a, b) PutBstr(a, sizeof(a) - 1, b)
00041 void PutBstr(const char *key, long keylen, StrBuf *Value);
00042