diff --git a/Builds/VisualStudio2013/RippleD.vcxproj b/Builds/VisualStudio2013/RippleD.vcxproj index d19d7a975..2285d716f 100644 --- a/Builds/VisualStudio2013/RippleD.vcxproj +++ b/Builds/VisualStudio2013/RippleD.vcxproj @@ -2267,10 +2267,19 @@ True True + + True + + + True + True True + + True + @@ -2281,12 +2290,27 @@ + + + + True True + + True + + + True + + + True + + + @@ -3116,16 +3140,6 @@ - - True - - - - - True - - - True @@ -3168,11 +3182,6 @@ True - - True - - - True @@ -3180,8 +3189,6 @@ - - @@ -3193,15 +3200,9 @@ True - - True - True - - True - True @@ -3210,9 +3211,6 @@ - - True - True diff --git a/Builds/VisualStudio2013/RippleD.vcxproj.filters b/Builds/VisualStudio2013/RippleD.vcxproj.filters index 0717201e1..0631a09b5 100644 --- a/Builds/VisualStudio2013/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2013/RippleD.vcxproj.filters @@ -3024,9 +3024,18 @@ ripple\json\impl + + ripple\json\impl + + + ripple\json\impl + ripple\json\impl + + ripple\json\impl + ripple\json @@ -3042,12 +3051,30 @@ ripple\json + + ripple\json + + + ripple\json + ripple\json\tests + + ripple\json\tests + + + ripple\json\tests + + + ripple\json\tests + ripple\json + + ripple\json + ripple\net @@ -3876,18 +3903,6 @@ ripple\rpc\impl - - ripple\rpc\impl - - - ripple\rpc\impl - - - ripple\rpc\impl - - - ripple\rpc\impl - ripple\rpc\impl @@ -3936,12 +3951,6 @@ ripple\rpc\impl - - ripple\rpc\impl - - - ripple\rpc\impl - ripple\rpc\impl @@ -3951,9 +3960,6 @@ ripple\rpc - - ripple\rpc - ripple\rpc @@ -3969,15 +3975,9 @@ ripple\rpc\tests - - ripple\rpc\tests - ripple\rpc\tests - - ripple\rpc\tests - ripple\rpc\tests @@ -3987,9 +3987,6 @@ ripple\rpc\tests - - ripple\rpc\tests - ripple\rpc\tests diff --git a/src/ripple/app/ledger/LedgerToJson.h b/src/ripple/app/ledger/LedgerToJson.h index 45e9072b1..6ba70d00b 100644 --- a/src/ripple/app/ledger/LedgerToJson.h +++ b/src/ripple/app/ledger/LedgerToJson.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include namespace ripple { @@ -118,7 +118,7 @@ void fillJson (Object& json, LedgerFill const& fill) auto &transactionMap = ledger.peekTransactionMap(); if (transactionMap && (bFull || fill.options & LedgerFill::dumpTxrp)) { - auto&& txns = RPC::setArray (json, jss::transactions); + auto&& txns = Json::setArray (json, jss::transactions); SHAMapTreeNode::TNType type; RPC::CountedYield count ( @@ -163,7 +163,7 @@ void fillJson (Object& json, LedgerFill const& fill) auto& accountStateMap = ledger.peekAccountStateMap(); if (accountStateMap && (bFull || fill.options & LedgerFill::dumpState)) { - auto&& array = RPC::setArray (json, jss::accountState); + auto&& array = Json::setArray (json, jss::accountState); RPC::CountedYield count ( fill.yieldStrategy.accountYieldCount, fill.yield); if (bFull || bExpand) @@ -191,7 +191,7 @@ void fillJson (Object& json, LedgerFill const& fill) template void addJson (Object& json, LedgerFill const& fill) { - auto&& object = RPC::addObject (json, jss::ledger); + auto&& object = Json::addObject (json, jss::ledger); fillJson (object, fill); } diff --git a/src/ripple/rpc/impl/JsonObject.h b/src/ripple/json/Object.h similarity index 99% rename from src/ripple/rpc/impl/JsonObject.h rename to src/ripple/json/Object.h index afad6cf00..5aa9057c6 100644 --- a/src/ripple/rpc/impl/JsonObject.h +++ b/src/ripple/json/Object.h @@ -20,10 +20,10 @@ #ifndef RIPPLE_RPC_JSONOBJECT_H_INCLUDED #define RIPPLE_RPC_JSONOBJECT_H_INCLUDED -#include +#include +#include -namespace ripple { -namespace RPC { +namespace Json { /** Collection is a base class for Array and Object, classes which provide the @@ -489,7 +489,6 @@ Object appendObject (Array& json) return json.appendObject (); } -} // RPC -} // ripple +} // Json #endif diff --git a/src/ripple/rpc/impl/WriteJson.h b/src/ripple/json/Output.h similarity index 77% rename from src/ripple/rpc/impl/WriteJson.h rename to src/ripple/json/Output.h index ec31fd4f2..aa8c400ef 100644 --- a/src/ripple/rpc/impl/WriteJson.h +++ b/src/ripple/json/Output.h @@ -17,27 +17,35 @@ */ //============================================================================== -#ifndef RIPPLE_RPC_WRITEJSON_H_INCLUDED -#define RIPPLE_RPC_WRITEJSON_H_INCLUDED +#ifndef RIPPLE_JSON_OUTPUT_H_INCLUDED +#define RIPPLE_JSON_OUTPUT_H_INCLUDED -namespace ripple { -namespace RPC { +#include + +namespace Json { + +using Output = std::function ; + +inline +Output stringOutput (std::string& s) +{ + return [&](boost::string_ref const& b) { s.append (b.data(), b.size()); }; +} /** Writes a minimal representation of a Json value to an Output in O(n) time. Data is streamed right to the output, so only a marginal amount of memory is used. This can be very important for a very large Json::Value. */ -void writeJson (Json::Value const&, Output const&); +void outputJson (Json::Value const&, Output const&); /** Return the minimal string representation of a Json::Value in O(n) time. This requires a memory allocation for the full size of the output. - If possible, use write(). + If possible, use outputJson(). */ std::string jsonAsString (Json::Value const&); -} // RPC -} // ripple +} // Json #endif diff --git a/src/ripple/rpc/impl/JsonWriter.h b/src/ripple/json/Writer.h similarity index 97% rename from src/ripple/rpc/impl/JsonWriter.h rename to src/ripple/json/Writer.h index d6711246f..ed66af298 100644 --- a/src/ripple/rpc/impl/JsonWriter.h +++ b/src/ripple/json/Writer.h @@ -21,12 +21,12 @@ #define RIPPLE_RPC_JSONWRITER_H_INCLUDED #include +#include #include -#include #include +#include -namespace ripple { -namespace RPC { +namespace Json { /** * Writer implements an O(1)-space, O(1)-granular output JSON writer. @@ -204,11 +204,11 @@ public: template void output (Type t) { - implOutput (to_string (t)); + implOutput (ripple::to_string (t)); } /** Output an error code. */ - void output (error_code_i t) + void output (ripple::error_code_i t) { output (int(t)); } @@ -244,7 +244,6 @@ inline void check (bool condition, std::string const& message) throw JsonException (message); } -} // RPC -} // ripple +} // Json #endif diff --git a/src/ripple/rpc/impl/JsonObject.cpp b/src/ripple/json/impl/Object.cpp similarity index 97% rename from src/ripple/rpc/impl/JsonObject.cpp rename to src/ripple/json/impl/Object.cpp index 59f72b118..74040ffec 100644 --- a/src/ripple/rpc/impl/JsonObject.cpp +++ b/src/ripple/json/impl/Object.cpp @@ -18,10 +18,9 @@ //============================================================================== #include -#include +#include -namespace ripple { -namespace RPC { +namespace Json { Collection::Collection (Collection* parent, Writer* writer) : parent_ (parent), writer_ (writer), enabled_ (true) @@ -157,5 +156,4 @@ WriterObject stringWriterObject (std::string& s) return WriterObject (stringOutput (s)); } -} // RPC -} // ripple +} // Json diff --git a/src/ripple/rpc/impl/WriteJson.cpp b/src/ripple/json/impl/Output.cpp similarity index 85% rename from src/ripple/rpc/impl/WriteJson.cpp rename to src/ripple/json/impl/Output.cpp index 700870b5b..a80b16bdc 100644 --- a/src/ripple/rpc/impl/WriteJson.cpp +++ b/src/ripple/json/impl/Output.cpp @@ -18,15 +18,14 @@ //============================================================================== #include -#include -#include +#include +#include -namespace ripple { -namespace RPC { +namespace Json { namespace { -void writeJson (Json::Value const& value, Writer& writer) +void outputJson (Json::Value const& value, Writer& writer) { switch (value.type()) { @@ -72,7 +71,7 @@ void writeJson (Json::Value const& value, Writer& writer) for (auto const& i: value) { writer.rawAppend(); - writeJson (i, writer); + outputJson (i, writer); } writer.finish(); break; @@ -85,7 +84,7 @@ void writeJson (Json::Value const& value, Writer& writer) for (auto const& tag: members) { writer.rawSet (tag); - writeJson (value[tag], writer); + outputJson (value[tag], writer); } writer.finish(); break; @@ -95,19 +94,18 @@ void writeJson (Json::Value const& value, Writer& writer) } // namespace -void writeJson (Json::Value const& value, Output const& out) +void outputJson (Json::Value const& value, Output const& out) { Writer writer (out); - writeJson (value, writer); + outputJson (value, writer); } std::string jsonAsString (Json::Value const& value) { std::string s; Writer writer (stringOutput (s)); - writeJson (value, writer); + outputJson (value, writer); return s; } -} // RPC -} // ripple +} // Json diff --git a/src/ripple/rpc/impl/JsonWriter.cpp b/src/ripple/json/impl/Writer.cpp similarity index 96% rename from src/ripple/rpc/impl/JsonWriter.cpp rename to src/ripple/json/impl/Writer.cpp index 91ef8cc8f..c69374ce0 100644 --- a/src/ripple/rpc/impl/JsonWriter.cpp +++ b/src/ripple/json/impl/Writer.cpp @@ -18,12 +18,11 @@ //============================================================================== #include -#include -#include +#include +#include #include -namespace ripple { -namespace RPC { +namespace Json { namespace { @@ -244,20 +243,20 @@ void Writer::output (std::string const& s) void Writer::output (Json::Value const& value) { impl_->markStarted(); - writeJson (value, impl_->getOutput()); + outputJson (value, impl_->getOutput()); } template <> void Writer::output (float f) { - auto s = to_string (f); + auto s = ripple::to_string (f); impl_->output ({s.data (), lengthWithoutTrailingZeros (s)}); } template <> void Writer::output (double f) { - auto s = to_string (f); + auto s = ripple::to_string (f); impl_->output ({s.data (), lengthWithoutTrailingZeros (s)}); } @@ -315,5 +314,4 @@ void Writer::finish () impl_->finish (); } -} // RPC -} // ripple +} // Json diff --git a/src/ripple/json/impl/json_writer.cpp b/src/ripple/json/impl/json_writer.cpp index 433e53a01..9cf57f1ba 100644 --- a/src/ripple/json/impl/json_writer.cpp +++ b/src/ripple/json/impl/json_writer.cpp @@ -178,13 +178,6 @@ std::string valueToQuotedString ( const char* value ) return result; } -// Class Writer -// ////////////////////////////////////////////////////////////////// -Writer::~Writer () -{ -} - - // Class FastWriter // ////////////////////////////////////////////////////////////////// diff --git a/src/ripple/json/json_writer.h b/src/ripple/json/json_writer.h index 41c6bd94c..e9ff9746f 100644 --- a/src/ripple/json/json_writer.h +++ b/src/ripple/json/json_writer.h @@ -31,11 +31,10 @@ class Value; /** \brief Abstract class for writers. */ -class Writer +class WriterBase { public: - virtual ~Writer (); - + virtual ~WriterBase () {} virtual std::string write ( const Value& root ) = 0; }; @@ -45,7 +44,8 @@ public: * but may be usefull to support feature such as RPC where bandwith is limited. * \sa Reader, Value */ -class FastWriter : public Writer + +class FastWriter : public WriterBase { public: FastWriter (); @@ -78,7 +78,7 @@ private: * * \sa Reader, Value, Value::setComment() */ -class StyledWriter: public Writer +class StyledWriter: public WriterBase { public: StyledWriter (); diff --git a/src/ripple/rpc/tests/JsonObject.test.cpp b/src/ripple/json/tests/Object.test.cpp similarity index 97% rename from src/ripple/rpc/tests/JsonObject.test.cpp rename to src/ripple/json/tests/Object.test.cpp index 06f791502..5e9f51276 100644 --- a/src/ripple/rpc/tests/JsonObject.test.cpp +++ b/src/ripple/json/tests/Object.test.cpp @@ -18,14 +18,13 @@ //============================================================================== #include -#include +#include #include #include -namespace ripple { -namespace RPC { +namespace Json { -class JsonObject_test : public TestOutputSuite +class JsonObject_test : public ripple::RPC::TestOutputSuite { void setup (std::string const& testName) { @@ -240,5 +239,4 @@ public: BEAST_DEFINE_TESTSUITE(JsonObject, ripple_basics, ripple); -} // RPC -} // ripple +} // Json diff --git a/src/ripple/rpc/tests/WriteJson.test.cpp b/src/ripple/json/tests/Output.test.cpp similarity index 90% rename from src/ripple/rpc/tests/WriteJson.test.cpp rename to src/ripple/json/tests/Output.test.cpp index 2540fde3e..78883e1bb 100644 --- a/src/ripple/rpc/tests/WriteJson.test.cpp +++ b/src/ripple/json/tests/Output.test.cpp @@ -18,13 +18,12 @@ //============================================================================== #include -#include +#include #include -namespace ripple { -namespace RPC { +namespace Json { -struct WriteJson_test : TestOutputSuite +struct Output_test : ripple::RPC::TestOutputSuite { void runTest (std::string const& name, std::string const& valueDesc) { @@ -32,7 +31,7 @@ struct WriteJson_test : TestOutputSuite Json::Value value; expect (Json::Reader().parse (valueDesc, value)); auto out = stringOutput (output_); - writeJson (value, out); + outputJson (value, out); // Compare with the original version. auto expected = Json::FastWriter().write (value); @@ -63,7 +62,6 @@ struct WriteJson_test : TestOutputSuite } }; -BEAST_DEFINE_TESTSUITE(WriteJson, ripple_basics, ripple); +BEAST_DEFINE_TESTSUITE(Output, ripple_basics, ripple); -} // RPC -} // ripple +} // Json diff --git a/src/ripple/rpc/tests/JsonWriter.test.cpp b/src/ripple/json/tests/Writer.test.cpp similarity index 97% rename from src/ripple/rpc/tests/JsonWriter.test.cpp rename to src/ripple/json/tests/Writer.test.cpp index db4900b66..3fb7933cb 100644 --- a/src/ripple/rpc/tests/JsonWriter.test.cpp +++ b/src/ripple/json/tests/Writer.test.cpp @@ -19,14 +19,13 @@ #include #include -#include +#include #include #include -namespace ripple { -namespace RPC { +namespace Json { -class JsonWriter_test : public TestOutputSuite +class JsonWriter_test : public ripple::RPC::TestOutputSuite { public: void testTrivial () @@ -203,5 +202,4 @@ public: BEAST_DEFINE_TESTSUITE(JsonWriter, ripple_basics, ripple); -} // RPC -} // ripple +} // Json diff --git a/src/ripple/rpc/RPCVersion.h b/src/ripple/rpc/RPCVersion.h index f63a7c9d2..52065000c 100644 --- a/src/ripple/rpc/RPCVersion.h +++ b/src/ripple/rpc/RPCVersion.h @@ -22,7 +22,7 @@ #include #include -#include +#include namespace ripple { namespace RPC { diff --git a/src/ripple/rpc/Yield.h b/src/ripple/rpc/Yield.h index 8c4f8c4db..cf61d276d 100644 --- a/src/ripple/rpc/Yield.h +++ b/src/ripple/rpc/Yield.h @@ -20,7 +20,7 @@ #ifndef RIPPLE_RPC_YIELD_H_INCLUDED #define RIPPLE_RPC_YIELD_H_INCLUDED -#include +#include #include #include @@ -49,8 +49,8 @@ using Yield = std::function ; data. This is to avoid the case where you yield after outputting data, but then never send more data. */ -Output chunkedYieldingOutput ( - Output const&, Yield const&, std::size_t chunkSize); +Json::Output chunkedYieldingOutput ( + Json::Output const&, Yield const&, std::size_t chunkSize); /** Yield every yieldCount calls. If yieldCount is 0, never yield. */ class CountedYield diff --git a/src/ripple/rpc/handlers/Ledger.cpp b/src/ripple/rpc/handlers/Ledger.cpp index 8792f6217..b06ca4661 100644 --- a/src/ripple/rpc/handlers/Ledger.cpp +++ b/src/ripple/rpc/handlers/Ledger.cpp @@ -20,9 +20,9 @@ #include #include #include +#include #include #include -#include #include namespace ripple { diff --git a/src/ripple/rpc/handlers/Ledger.h b/src/ripple/rpc/handlers/Ledger.h index ff75b5c37..de9f919c6 100644 --- a/src/ripple/rpc/handlers/Ledger.h +++ b/src/ripple/rpc/handlers/Ledger.h @@ -22,14 +22,16 @@ #include #include -#include +#include #include +namespace Json { +class Object; +} + namespace ripple { namespace RPC { -class Object; - // ledger [id|index|current|closed] [full] // { // ledger: 'current' | 'closed' | | , // optional @@ -77,7 +79,7 @@ void LedgerHandler::writeResult (Object& value) { if (ledger_) { - RPC::copyFrom (value, result_); + Json::copyFrom (value, result_); addJson (value, {*ledger_, options_, context_.yield}); } else @@ -85,11 +87,11 @@ void LedgerHandler::writeResult (Object& value) auto& master = getApp().getLedgerMaster (); auto& yield = context_.yield; { - auto&& closed = RPC::addObject (value, jss::closed); + auto&& closed = Json::addObject (value, jss::closed); addJson (closed, {*master.getClosedLedger(), 0, yield}); } { - auto&& open = RPC::addObject (value, jss::open); + auto&& open = Json::addObject (value, jss::open); addJson (open, {*master.getCurrentLedger(), 0, yield}); } } diff --git a/src/ripple/rpc/handlers/WalletPropose.h b/src/ripple/rpc/handlers/WalletPropose.h index b53042cb3..a3bafc2f5 100644 --- a/src/ripple/rpc/handlers/WalletPropose.h +++ b/src/ripple/rpc/handlers/WalletPropose.h @@ -20,7 +20,7 @@ #ifndef RIPPLED_RIPPLE_RPC_HANDLERS_WALLETPROPOSE_H #define RIPPLED_RIPPLE_RPC_HANDLERS_WALLETPROPOSE_H -#include +#include namespace ripple { diff --git a/src/ripple/rpc/impl/Handler.cpp b/src/ripple/rpc/impl/Handler.cpp index e58bb1a08..1e6ef9b14 100644 --- a/src/ripple/rpc/impl/Handler.cpp +++ b/src/ripple/rpc/impl/Handler.cpp @@ -85,11 +85,11 @@ class HandlerTable { assert (table_.find(HandlerImpl::name()) == table_.end()); Handler h; - h.name_ = HandlerImpl::name(), - h.valueMethod_ = &handle, - h.role_ = HandlerImpl::role(), - h.condition_ = HandlerImpl::condition(), - h.objectMethod_ = &handle; + h.name_ = HandlerImpl::name(); + h.valueMethod_ = &handle; + h.role_ = HandlerImpl::role(); + h.condition_ = HandlerImpl::condition(); + h.objectMethod_ = &handle; table_[HandlerImpl::name()] = h; }; diff --git a/src/ripple/rpc/impl/Handler.h b/src/ripple/rpc/impl/Handler.h index 2f80d494c..62102912b 100644 --- a/src/ripple/rpc/impl/Handler.h +++ b/src/ripple/rpc/impl/Handler.h @@ -24,11 +24,13 @@ #include #include +namespace Json { +class Object; +} + namespace ripple { namespace RPC { -class Object; - // Under what condition can we call this RPC? enum Condition { NO_CONDITION = 0, @@ -46,7 +48,7 @@ struct Handler Method valueMethod_; Role role_; RPC::Condition condition_; - Method objectMethod_; + Method objectMethod_; }; const Handler* getHandler (std::string const&); diff --git a/src/ripple/rpc/impl/RPCHandler.cpp b/src/ripple/rpc/impl/RPCHandler.cpp index d49567da4..0ff773d5b 100644 --- a/src/ripple/rpc/impl/RPCHandler.cpp +++ b/src/ripple/rpc/impl/RPCHandler.cpp @@ -22,12 +22,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -190,7 +190,7 @@ template void getResult ( Context& context, Method method, Object& object, std::string const& name) { - auto&& result = addObject (object, jss::result); + auto&& result = Json::addObject (object, jss::result); if (auto status = callMethod (context, method, name, result)) { WriteLog (lsDEBUG, RPCErr) << "rpcError: " << status.toString(); @@ -228,13 +228,13 @@ void executeRPC ( boost::optional handler; if (auto error = fillHandler (context, handler)) { - auto wo = stringWriterObject (output); - auto&& sub = addObject (*wo, jss::result); + auto wo = Json::stringWriterObject (output); + auto&& sub = Json::addObject (*wo, jss::result); inject_error (error, sub); } else if (auto method = handler->objectMethod_) { - auto wo = stringWriterObject (output); + auto wo = Json::stringWriterObject (output); getResult (context, method, *wo, handler->name_); } else if (auto method = handler->valueMethod_) @@ -250,7 +250,7 @@ void executeRPC ( { // Can't ever get here. assert (false); - throw RPC::JsonException ("RPC handler with no method"); + throw Json::JsonException ("RPC handler with no method"); } } diff --git a/src/ripple/rpc/impl/Yield.cpp b/src/ripple/rpc/impl/Yield.cpp index a462c6da4..9509891ef 100644 --- a/src/ripple/rpc/impl/Yield.cpp +++ b/src/ripple/rpc/impl/Yield.cpp @@ -24,8 +24,8 @@ namespace ripple { namespace RPC { -Output chunkedYieldingOutput ( - Output const& output, Yield const& yield, std::size_t chunkSize) +Json::Output chunkedYieldingOutput ( + Json::Output const& output, Yield const& yield, std::size_t chunkSize) { auto count = std::make_shared (0); return [chunkSize, count, output, yield] (boost::string_ref const& bytes) diff --git a/src/ripple/rpc/tests/Coroutine.test.cpp b/src/ripple/rpc/tests/Coroutine.test.cpp index decb975db..8ba9645fb 100644 --- a/src/ripple/rpc/tests/Coroutine.test.cpp +++ b/src/ripple/rpc/tests/Coroutine.test.cpp @@ -35,7 +35,7 @@ public: setup (name); std::string buffer; - Output output = stringOutput (buffer); + Json::Output output = Json::stringOutput (buffer); auto coroutine = Coroutine ([=] (Yield yield) { diff --git a/src/ripple/rpc/tests/TestOutputSuite.test.h b/src/ripple/rpc/tests/TestOutputSuite.test.h index f8e5137cb..ef4c561ff 100644 --- a/src/ripple/rpc/tests/TestOutputSuite.test.h +++ b/src/ripple/rpc/tests/TestOutputSuite.test.h @@ -20,8 +20,8 @@ #ifndef RIPPLE_RPC_TESTOUTPUTSUITE_H_INCLUDED #define RIPPLE_RPC_TESTOUTPUTSUITE_H_INCLUDED -#include -#include +#include +#include #include namespace ripple { @@ -31,13 +31,14 @@ class TestOutputSuite : public TestSuite { protected: std::string output_; - std::unique_ptr writer_; + std::unique_ptr writer_; void setup (std::string const& testName) { testcase (testName); output_.clear (); - writer_ = std::make_unique (stringOutput (output_)); + writer_ = std::make_unique ( + Json::stringOutput (output_)); } // Test the result and report values. diff --git a/src/ripple/rpc/tests/Yield.test.cpp b/src/ripple/rpc/tests/Yield.test.cpp index b1d117d90..7bb26dc56 100644 --- a/src/ripple/rpc/tests/Yield.test.cpp +++ b/src/ripple/rpc/tests/Yield.test.cpp @@ -32,7 +32,8 @@ struct Yield_test : TestOutputSuite std::string lastYield; auto yield = [&]() { lastYield = output_; }; - auto output = chunkedYieldingOutput (stringOutput (output_), yield, 5); + auto output = chunkedYieldingOutput ( + Json::stringOutput (output_), yield, 5); output ("hello"); expectResult ("hello"); expectEquals (lastYield, ""); diff --git a/src/ripple/server/impl/JSONRPCUtil.cpp b/src/ripple/server/impl/JSONRPCUtil.cpp index af6b83d9b..80e395535 100644 --- a/src/ripple/server/impl/JSONRPCUtil.cpp +++ b/src/ripple/server/impl/JSONRPCUtil.cpp @@ -45,7 +45,7 @@ std::string getHTTPHeaderTimestamp () return std::string (buffer); } -void HTTPReply (int nStatus, std::string const& content, RPC::Output output) +void HTTPReply (int nStatus, std::string const& content, Json::Output output) { if (ShouldLog (lsTRACE, RPC)) { diff --git a/src/ripple/server/impl/JSONRPCUtil.h b/src/ripple/server/impl/JSONRPCUtil.h index 8f167b5af..c6c9d74f2 100644 --- a/src/ripple/server/impl/JSONRPCUtil.h +++ b/src/ripple/server/impl/JSONRPCUtil.h @@ -21,11 +21,11 @@ #define RIPPLE_SERVER_JSONRPCUTIL_H_INCLUDED #include -#include +#include namespace ripple { -void HTTPReply (int nStatus, std::string const& strMsg, RPC::Output); +void HTTPReply (int nStatus, std::string const& strMsg, Json::Output); } // ripple diff --git a/src/ripple/server/impl/ServerHandlerImp.cpp b/src/ripple/server/impl/ServerHandlerImp.cpp index 7e3f5b609..a414e5c61 100644 --- a/src/ripple/server/impl/ServerHandlerImp.cpp +++ b/src/ripple/server/impl/ServerHandlerImp.cpp @@ -148,7 +148,7 @@ ServerHandlerImp::onHandoff (HTTP::Session& session, } static inline -RPC::Output makeOutput (HTTP::Session& session) +Json::Output makeOutput (HTTP::Session& session) { return [&](boost::string_ref const& b) { diff --git a/src/ripple/server/impl/ServerHandlerImp.h b/src/ripple/server/impl/ServerHandlerImp.h index 8ec828957..3906c5f5c 100644 --- a/src/ripple/server/impl/ServerHandlerImp.h +++ b/src/ripple/server/impl/ServerHandlerImp.h @@ -21,9 +21,9 @@ #define RIPPLE_SERVER_SERVERHANDLERIMP_H_INCLUDED #include +#include #include #include -#include #include #include @@ -54,7 +54,7 @@ public: ~ServerHandlerImp(); private: - using Output = RPC::Output; + using Output = Json::Output; using Yield = RPC::Yield; void diff --git a/src/ripple/unity/json.cpp b/src/ripple/unity/json.cpp index 17bae6c43..84eb25925 100644 --- a/src/ripple/unity/json.cpp +++ b/src/ripple/unity/json.cpp @@ -36,6 +36,13 @@ #include #include #include + #include +#include +#include +#include #include +#include +#include +#include diff --git a/src/ripple/unity/rpcx.cpp b/src/ripple/unity/rpcx.cpp index f2bb86abc..71968f462 100644 --- a/src/ripple/unity/rpcx.cpp +++ b/src/ripple/unity/rpcx.cpp @@ -27,9 +27,6 @@ #include #include -#include -#include -#include #include #include #include @@ -107,10 +104,7 @@ #include #include -#include #include -#include #include #include -#include #include