Tidy up rpc module:

* Move directory up to ripple/module/rpc
* Use C++11 idioms and best practices
This commit is contained in:
Tom Ritchford
2014-06-16 17:20:29 -04:00
committed by Vinnie Falco
parent 27a4f44de5
commit a23013abc1
90 changed files with 1166 additions and 986 deletions

View File

@@ -20,13 +20,13 @@
namespace ripple {
Json::Value RPCHandler::doPrint (Json::Value params, Resource::Charge& loadType, Application::ScopedLockType& masterLockHolder)
Json::Value doPrint (RPC::Context& context)
{
masterLockHolder.unlock ();
context.lock_.unlock ();
JsonPropertyStream stream;
if (params.isObject() && params["params"].isArray() && params["params"][0u].isString ())
getApp().write (stream, params["params"][0u].asString());
if (context.params_.isObject() && context.params_["params"].isArray() && context.params_["params"][0u].isString ())
getApp().write (stream, context.params_["params"][0u].asString());
else
getApp().write (stream);