Public Member Functions | Public Attributes

XMLRPC::Binary Struct Reference

#include <xmlrpc.h>

Collaboration diagram for XMLRPC::Binary:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Binary (const void *buffer, size_t len)
 Binary (const char *base64)
 Binary (const Binary &other)
 ~Binary ()
string str () const

Public Attributes

void * _buffer
size_t _len

Detailed Description

Definition at line 183 of file xmlrpc.h.


Constructor & Destructor Documentation

XMLRPC::Binary::Binary ( const void *  buffer,
size_t  len 
)

Definition at line 153 of file xmlrpc.cpp.

References _buffer.

 :  _buffer(malloc(len)),
    _len(len)
{
    memcpy(_buffer, buffer, len);
}
XMLRPC::Binary::Binary ( const char *  base64 )

Definition at line 160 of file xmlrpc.cpp.

References _buffer, _len, and XMLRPC::base64_decode().

{
    _buffer = base64_decode(base64, _len);
}

Here is the call graph for this function:

XMLRPC::Binary::Binary ( const Binary other )

Definition at line 165 of file xmlrpc.cpp.

References _buffer, and _len.

 :  _buffer(malloc(other._len)),
    _len(other._len)
{
    memcpy(_buffer, other._buffer, other._len);
}
XMLRPC::Binary::~Binary (  ) [inline]

Definition at line 188 of file xmlrpc.h.

{free(_buffer);}

Member Function Documentation

string XMLRPC::Binary::str (  ) const

Definition at line 172 of file xmlrpc.cpp.

References _buffer, _len, and XMLRPC::base64_encode().

Referenced by XMLRPC::XMLRPCCall::operator%(), and XMLRPC::XMLRPCResponse::set_binary().

{
    char* s = base64_encode(_buffer, _len);
    string ret = s;
    free(s);

    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 192 of file xmlrpc.h.

Referenced by Binary(), and str().

Definition at line 193 of file xmlrpc.h.

Referenced by Binary(), and str().


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