LLFilterSD2XMLRPCRequest Class Reference

Filter from serialized LLSD to an XMLRPC method call. More...

#include <llfiltersd2xmlrpc.h>

Inheritance diagram for LLFilterSD2XMLRPCRequest:

Inheritance graph
Collaboration diagram for LLFilterSD2XMLRPCRequest:

Collaboration graph
List of all members.

Public Member Functions

 LLFilterSD2XMLRPCRequest ()
 LLFilterSD2XMLRPCRequest (const char *method)
virtual ~LLFilterSD2XMLRPCRequest ()

Protected Member Functions

virtual EStatus process_impl (const LLChannelDescriptors &channels, buffer_ptr_t &buffer, bool &eos, LLSD &context, LLPumpIO *pump)
 Process the data in buffer.

Protected Attributes

std::string mMethod

Detailed Description

Filter from serialized LLSD to an XMLRPC method call.

This class will accept any kind of serialized LLSD object, but you probably want to have an array on the outer boundary since this object will interpret each element in the top level LLSD as a parameter into the xmlrpc spec.

For example, you would represent 3 params as: {'method'='foo', 'parameter':[i200, r3.4, {"foo":"bar"}]} To generate: <?xml version="1.0"?> <methodCall><params>



<struct><member> <name>foo</name>


</member> </struct>


This class will accept 2 different kinds of encodings. The first just an array of params as long as you specify the method in the constructor. It will also accept a structured data in the form: {'method':'$method_name', 'parameter':[...] } In the latter form, the encoded 'method' will be used regardless of the construction of the object, and the 'parameter' will be used as parameter to the call.

Definition at line 146 of file llfiltersd2xmlrpc.h.

Constructor & Destructor Documentation

LLFilterSD2XMLRPCRequest::LLFilterSD2XMLRPCRequest (  ) 


Definition at line 374 of file llfiltersd2xmlrpc.cpp.

LLFilterSD2XMLRPCRequest::LLFilterSD2XMLRPCRequest ( const char *  method  ) 

Definition at line 378 of file llfiltersd2xmlrpc.cpp.

References mMethod.

LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest (  )  [virtual]

Definition at line 386 of file llfiltersd2xmlrpc.cpp.

Member Function Documentation

LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl ( const LLChannelDescriptors channels,
buffer_ptr_t buffer,
bool &  eos,
LLSD context,
LLPumpIO pump 
) [protected, virtual]

Process the data in buffer.

Definition at line 391 of file llfiltersd2xmlrpc.cpp.

References LLSD::beginArray(), DEFAULT_PRECISION, end, LLSD::endArray(), LLSDSerialize::fromNotation(), llendl, llinfos, llwarns, mMethod, PUMP_DEBUG, tut::sd(), LLIOPipe::STATUS_BREAK, LLIOPipe::STATUS_DONE, LLIOPipe::STATUS_ERROR, LLFilterSD2XMLRPC::streamOut(), LLSD::type(), LLSD::TypeArray, LLSD::TypeMap, xml_escape_string(), XML_HEADER, XMLRPC_REQUEST_FOOTER, XMLRPC_REQUEST_HEADER_1, and XMLRPC_REQUEST_HEADER_2.

Member Data Documentation

std::string LLFilterSD2XMLRPCRequest::mMethod [protected]

Definition at line 175 of file llfiltersd2xmlrpc.h.

Referenced by LLFilterSD2XMLRPCRequest(), and process_impl().

The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:16 2010 for Second Life Viewer by  doxygen 1.4.7