LLServiceBuilder Class Reference

This class builds urls for us to use when making web service calls. More...

#include <llservicebuilder.h>

Collaboration diagram for LLServiceBuilder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLServiceBuilder (void)
 ~LLServiceBuilder (void)
void loadServiceDefinitionsFromFile (const std::string &service_filename)
 Initialize this object with the service definitions.
std::string buildServiceURI (const std::string &service_name)
 Build a service url if the url needs no construction parameters.
std::string buildServiceURI (const std::string &service_name, const LLSD &option_map)
 Build a service url if the url with construction parameters.
void createServiceDefinition (const std::string &service_name, LLSD &service_url)
 Helper method which builds construction state for a service.

Protected Attributes

std::map< std::string, std::string > mServiceMap

Private Member Functions

 LOG_CLASS (LLServiceBuilder)

Detailed Description

This class builds urls for us to use when making web service calls.

Definition at line 46 of file llservicebuilder.h.


Constructor & Destructor Documentation

LLServiceBuilder::LLServiceBuilder ( void   )  [inline]

Definition at line 50 of file llservicebuilder.h.

LLServiceBuilder::~LLServiceBuilder ( void   )  [inline]

Definition at line 51 of file llservicebuilder.h.


Member Function Documentation

std::string LLServiceBuilder::buildServiceURI ( const std::string &  service_name,
const LLSD option_map 
)

Build a service url if the url with construction parameters.

The parameter substitution supports string substituition from RUSS: [[Recursive_URL_Substitution_Syntax]]

Parameters:
service_name The name of the service you want to call.
option_map The parameters in a map of name:value for the service.

Definition at line 110 of file llservicebuilder.cpp.

References LLSD::beginMap(), buildServiceURI(), LLSD::endMap(), LLSD::isMap(), llendl, llwarns, and LLURI::mapToQueryString().

std::string LLServiceBuilder::buildServiceURI ( const std::string &  service_name  ) 

Build a service url if the url needs no construction parameters.

Parameters:
service_name The name of the service you want to call.

Definition at line 88 of file llservicebuilder.cpp.

References LLSD::asString(), LLApp::getOption(), LLApp::instance(), llendl, llwarns, and mServiceMap.

Referenced by buildServiceURI().

void LLServiceBuilder::createServiceDefinition ( const std::string &  service_name,
LLSD service_url 
)

Helper method which builds construction state for a service.

This method should probably be protected, but we need to test this method.

Definition at line 66 of file llservicebuilder.cpp.

References LLSD::asString(), LLSD::beginMap(), LLSD::endMap(), LLSD::isMap(), LLSD::isString(), and mServiceMap.

Referenced by loadServiceDefinitionsFromFile().

void LLServiceBuilder::loadServiceDefinitionsFromFile ( const std::string &  service_filename  ) 

Initialize this object with the service definitions.

Parameters:
service_filename The services definition files -- services.xml.

Definition at line 39 of file llservicebuilder.cpp.

References LLSD::beginArray(), createServiceDefinition(), LLSD::endArray(), LLSDSerialize::fromXML(), llendl, llifstream, llinfos, and llwarns.

LLServiceBuilder::LOG_CLASS ( LLServiceBuilder   )  [private]


Member Data Documentation

std::map<std::string, std::string> LLServiceBuilder::mServiceMap [protected]

Definition at line 91 of file llservicebuilder.h.

Referenced by buildServiceURI(), and createServiceDefinition().


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