WeHTTP Class Reference

The HTTP processor. More...

#include <weHTTP.h>

Inheritance diagram for WeHTTP:

iweTransport iweOptionsProvider

List of all members.

Public Member Functions

 WeHTTP ()
 Default constructor.
 ~WeHTTP ()
 Destructor.
virtual iweResponseRequest (iweRequest *req, iweResponse *resp=NULL)
 Requests.
virtual iweResponseRequest (string url, iweResponse *resp=NULL)
 Requests.
virtual iweResponseRequest (WeURL &url, iweResponse *resp=NULL)
 Requests.
const CURLMcode & GetLastError (void) const
 Gets the CURLMcode - the last cURL operation status.
const CURLMcode ProcessRequests (void)
 Process pending requests.
virtual string & GetName ()
virtual bool IsOwnProtocol (string &proto)


Detailed Description

The HTTP processor.

Author:
A. Abramov
Date:
29.05.2009
Examples:

httpget.cpp.

Definition at line 198 of file weHTTP.h.


Constructor & Destructor Documentation

WeHTTP::WeHTTP (  ) 

Default constructor.

Exceptions:
WeError if the curl initialization failed

Definition at line 86 of file weHTTP.cpp.

WeHTTP::~WeHTTP (  ) 

Destructor.

Definition at line 101 of file weHTTP.cpp.


Member Function Documentation

const CURLMcode& WeHTTP::GetLastError ( void   )  const [inline]

Gets the CURLMcode - the last cURL operation status.

Definition at line 209 of file weHTTP.h.

virtual string& WeHTTP::GetName (  )  [inline, virtual]

Implements iweTransport.

Definition at line 214 of file weHTTP.h.

virtual bool WeHTTP::IsOwnProtocol ( string &  proto  )  [inline, virtual]

Implements iweTransport.

Definition at line 215 of file weHTTP.h.

const CURLMcode WeHTTP::ProcessRequests ( void   ) 

Process pending requests.

Todo:
Implements accurate busy-loop
Examples:
httpget.cpp.

Definition at line 229 of file weHTTP.cpp.

iweResponse * WeHTTP::Request ( WeURL url,
iweResponse resp = NULL 
) [virtual]

Requests.

Parameters:
url - The url.
resp - If non-null, the resp.
Return values:
null if it fails, pointer to the WeHttpResponse else.
Exceptions:
WeError if given URL is malformed and can't be reconstructed from the WeHttpResponse

Definition at line 216 of file weHTTP.cpp.

iweResponse * WeHTTP::Request ( string  url,
iweResponse resp = NULL 
) [virtual]

Requests.

Parameters:
url - The url.
resp - If non-null, the resp.
Return values:
null if it fails, pointer to the WeHttpResponse else.
Exceptions:
WeError if given URL is malformed and can't be reconstructed from the WeHttpResponse

Implements iweTransport.

Definition at line 188 of file weHTTP.cpp.

iweResponse * WeHTTP::Request ( iweRequest req,
iweResponse resp = NULL 
) [virtual]

Requests.

Parameters:
req - If non-null, the HTTP request.
resp - If non-null, the HTTP response to store results, else - the new WeHttpResponse will be creaded.
Return values:
null if it fails, pointer to the WeHttpResponse else.

Todo:
Add error processing. Throw exception or return NULL

Todo:
may be throw exception&
Examples:
httpget.cpp.

Definition at line 130 of file weHTTP.cpp.


The documentation for this class was generated from the following files:


 
©2009 Positive Technologies
 
Generated on Tue Jul 14 18:27:31 2009 for WebEngine by 
 
 
1.5.7
 
Get wpcObj at SourceForge.net. Fast, secure and Free Open Source software downloads