Public Member Functions | Protected Attributes

XMLRPCClient Struct Reference

#include <httpclnt.h>

Collaboration diagram for XMLRPCClient:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLRPCClient (LPCTSTR url, LPCTSTR agent="HTTP Post Client")
void enable_extensions (bool flag=true)
string request_post (const string &in)
XMLRPCResult call (LPCTSTR url, XMLRPCCall &call)

Protected Attributes

URL _parsed_url
bool _extensions
AddressList _addr
HTTPConnection _connection

Detailed Description

Definition at line 189 of file httpclnt.h.


Constructor & Destructor Documentation

XMLRPCClient::XMLRPCClient ( LPCTSTR  url,
LPCTSTR  agent = "HTTP Post Client" 
)

Definition at line 42 of file httpclnt.cpp.

References _addr, URL::_hostname, _parsed_url, URL::_port, and AddressList::resolve().

 :  _extensions(false),
    _parsed_url(url),
#ifdef USE_WININET
    _inet_lib(agent),
    _connection(_inet_lib._hinet, _parsed_url)
#else
    _connection(agent, _parsed_url)
#endif
{
     // resolve the server and service name
    _addr.resolve(_parsed_url._hostname.c_str(), _parsed_url._port.c_str(), 0);
}

Here is the call graph for this function:


Member Function Documentation

XMLRPCResult XMLRPCClient::call ( LPCTSTR  url,
XMLRPCCall call 
)

Definition at line 79 of file xmlrpc_clnt.cpp.

References XMLRPCWriter::flush(), and request_post().

Referenced by client_test().

{
    string xml_str = call.flush();

#ifdef _DEBUG
    cout << xml_str << endl;
#endif

    string out = request_post(xml_str);

#ifdef _DEBUG
    cout << out << endl;
#endif

    return XMLRPCResult(out);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPCClient::enable_extensions ( bool  flag = true ) [inline]

Definition at line 193 of file httpclnt.h.

References _extensions.

    {
        _extensions = flag;
    }
string XMLRPCClient::request_post ( const string &  in )

Definition at line 110 of file httpclnt.cpp.

References _addr, _connection, _extensions, _parsed_url, and HTTPConnection::send_request().

Referenced by call().

{
    return _connection.send_request(_parsed_url, _addr, "POST", in.c_str(), in.length(), !_extensions);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 213 of file httpclnt.h.

Referenced by request_post(), and XMLRPCClient().

Definition at line 214 of file httpclnt.h.

Referenced by request_post().

bool XMLRPCClient::_extensions [protected]

Definition at line 204 of file httpclnt.h.

Referenced by enable_extensions(), and request_post().

Definition at line 203 of file httpclnt.h.

Referenced by request_post(), and XMLRPCClient().


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