Public Member Functions | Public Attributes

Binary Struct Reference

#include <xmlrpc.h>

Collaboration diagram for 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 180 of file xmlrpc.h.


Constructor & Destructor Documentation

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

Definition at line 150 of file xmlrpc.cpp.

References _buffer.

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

Definition at line 157 of file xmlrpc.cpp.

References _buffer, _len, and base64_decode().

{
    _buffer = base64_decode(base64, _len);
}

Here is the call graph for this function:

Binary::Binary ( const Binary other )

Definition at line 162 of file xmlrpc.cpp.

References _buffer, and _len.

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

Definition at line 185 of file xmlrpc.h.

{free(_buffer);}

Member Function Documentation

string Binary::str (  ) const

Definition at line 169 of file xmlrpc.cpp.

References _buffer, _len, and base64_encode().

Referenced by client_test(), XMLRPCCall::operator%(), server_test(), and 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 189 of file xmlrpc.h.

Referenced by Binary(), and str().

size_t Binary::_len

Definition at line 190 of file xmlrpc.h.

Referenced by Binary(), and str().


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