47 #ifndef CCXX_CONFIG_H_ 51 #ifndef CCXX_SOCKET_H_ 59 #ifdef CCXX_NAMESPACES 128 const char *agent, *referer, *cookie, *pragma, *user, *password;
129 const char *proxyUser, *proxyPasswd;
140 Authentication proxyAuth;
146 Error getHTTPHeaders();
160 Error sendHTTPHeader(
const char *url,
const char **vars,
size_t bufsize);
177 virtual int aRead(
char *buffer,
size_t len,
timeout_t timer);
187 virtual int aWrite(
char *buffer,
size_t len,
timeout_t timer);
195 virtual void httpHeader(
const char *header,
const char *value);
202 virtual char **extraHeader(
void);
220 URLStream &getline(
char *buffer,
size_t len);
229 Error
get(
const char *url,
size_t buffer = 512);
239 Error
get(
size_t buffer = 512);
250 Error submit(
const char *url,
const char **vars,
size_t buffer = 512);
260 Error post(
const char *url,
const char **vars,
size_t buffer = 512);
279 Error head(
const char *url,
size_t buffer = 512);
291 void setReferer(
const char *str);
339 void setAuthentication(Authentication a,
const char *str = NULL);
355 {proxyPasswd = str;};
363 void setProxyAuthentication(Authentication a,
const char *str = NULL);
379 void setProxy(
const char *host,
tpport_t port);
436 __EXPORT char* urlDecode(
char *source,
char *dest = NULL);
444 __EXPORT char* urlEncode(
const char *source,
char *dest,
size_t size);
456 __EXPORT char* b64Decode(
char *src,
char *dest = NULL);
469 __EXPORT char* b64Encode(
const char *source,
char *dest,
size_t size);
482 __EXPORT size_t b64Encode(
const unsigned char *src,
size_t srcsize,
483 char *dst,
size_t dstsize);
494 __EXPORT size_t b64Decode(
const char *src,
495 unsigned char *dst,
size_t dstsize);
519 __EXPORT String b64Encode(
const unsigned char *src,
size_t srcsize);
531 unsigned char *dst,
size_t dstsize);
534 #ifdef CCXX_NAMESPACES
Method
Type of fetch.
Definition: url.h:108
This is a generic and portable string class.
Definition: string.h:77
void setProxyUser(const char *str)
Set proxy user id for the url.
Definition: url.h:346
#define __EXPORT
Definition: config.h:980
Family
Definition: socket.h:122
void setTimeout(timeout_t to)
Set socket timeout characteristics for processing URL requests.
Definition: url.h:403
void setPassword(const char *str)
Set password for the url.
Definition: url.h:330
unsigned long timeout_t
Definition: thread.h:74
void setCookie(const char *str)
Set the cookie to pass.
Definition: url.h:314
void setFollow(bool enable)
Specify url following.
Definition: url.h:412
void setHost(const char *str)
Set the host for the url.
Definition: url.h:298
void setUser(const char *str)
Set user id for the url.
Definition: url.h:322
MIME document abstractions.
void setLocalInterface(const char *intf)
Specify local interface to use.
Definition: url.h:427
ost::String m_host
Definition: url.h:150
TCP streams are used to represent TCP client connections to a server by TCP protocol servers for acce...
Definition: socket.h:1631
Protocol
http protocol version
Definition: url.h:122
void setAgent(const char *str)
Set the agent.
Definition: url.h:386
Encoding
Encoding used in transfer.
Definition: url.h:100
This object is used to hold the actual and valid internet address of a specific host machine that wil...
Definition: address.h:561
Error
Definition: socket.h:131
A URL processing version of TCPStream.
Definition: url.h:69
Method getMethod(void)
Get url method (and protocol) employed.
Definition: url.h:394
Network addresses and sockets related classes.
unsigned short tpport_t
Transport Protocol Ports.
Definition: address.h:86
This object is used to hold the actual and valid internet address of a specific host machine that wil...
Definition: address.h:948
void setAddress(const char *str)
Set the address for the url.
Definition: url.h:306
void setProtocol(Protocol pro)
Specify http protocol level being used.
Definition: url.h:420
void setPragma(const char *str)
Set the pragmas.
Definition: url.h:370
void setProxyPassword(const char *str)
Set proxy password for the url.
Definition: url.h:354
Authentication
Type of authentication.
Definition: url.h:92