diff --git a/Builds/VisualStudio2012/RippleD.vcxproj b/Builds/VisualStudio2012/RippleD.vcxproj index d436dc276a..ecf7767f0c 100644 --- a/Builds/VisualStudio2012/RippleD.vcxproj +++ b/Builds/VisualStudio2012/RippleD.vcxproj @@ -31,6 +31,18 @@ true true + + true + true + true + true + + + true + true + true + true + true true @@ -671,18 +683,6 @@ true true - - true - true - true - true - - - true - true - true - true - true @@ -1379,6 +1379,8 @@ + + @@ -1479,11 +1481,7 @@ - - - - diff --git a/Builds/VisualStudio2012/RippleD.vcxproj.filters b/Builds/VisualStudio2012/RippleD.vcxproj.filters index 94e9ddf1d2..5cf4f6ab53 100644 --- a/Builds/VisualStudio2012/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2012/RippleD.vcxproj.filters @@ -157,12 +157,12 @@ {a8c5d8be-1e90-4e9c-be7f-d2da53920cd4} - - {f4e4fbf0-3dd2-4413-8318-9d6bc15ada57} - {625992a9-7333-4782-8ee3-6ed072d02fe5} + + {8476f6e8-7411-460f-bdef-68e3166078eb} + @@ -882,15 +882,15 @@ [1] Ripple\ripple_asio - - [1] Ripple\ripple_asio\boost - - - [1] Ripple\ripple_asio\boost - [1] Ripple\ripple_asio\sockets + + [1] Ripple\ripple_app\boost + + + [1] Ripple\ripple_app\boost + @@ -1670,18 +1670,6 @@ [1] Ripple\ripple_asio - - [1] Ripple\ripple_asio - - - [1] Ripple\ripple_asio - - - [1] Ripple\ripple_asio\boost - - - [1] Ripple\ripple_asio\boost - [1] Ripple\ripple_asio\sockets @@ -1694,6 +1682,12 @@ [1] Ripple\ripple_asio\sockets + + [1] Ripple\ripple_app\boost + + + [1] Ripple\ripple_app\boost + diff --git a/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj b/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj index 0e1234873b..d640a10e5b 100644 --- a/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj +++ b/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj @@ -83,7 +83,6 @@ - diff --git a/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj.filters b/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj.filters index 6ae621f34a..a782b727c5 100644 --- a/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj.filters +++ b/Subtrees/beast/Builds/VisualStudio2012/beast.vcxproj.filters @@ -785,9 +785,6 @@ beast_asio\tests - - beast_asio\sockets - beast_asio\tests diff --git a/Subtrees/beast/modules/beast_asio/beast_asio.h b/Subtrees/beast/modules/beast_asio/beast_asio.h index e797f6567f..8b5ab9dc8b 100644 --- a/Subtrees/beast/modules/beast_asio/beast_asio.h +++ b/Subtrees/beast/modules/beast_asio/beast_asio.h @@ -57,7 +57,6 @@ namespace beast #include "sockets/beast_SocketBase.h" #include "sockets/beast_Socket.h" #include "sockets/beast_SocketInterface.h" -#include "sockets/beast_SocketWrapperBasics.h" #include "sockets/beast_SocketWrapper.h" #include "sockets/beast_SharedSocket.h" #include "sockets/beast_SslContext.h" diff --git a/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapper.h b/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapper.h index 1fb1d4c16e..a4c06a05de 100644 --- a/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapper.h +++ b/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapper.h @@ -119,8 +119,7 @@ namespace SocketWrapperMemberChecks template class SocketWrapper - : public virtual Socket - , public SocketWrapperBasics + : public Socket , public Uncopyable { private: diff --git a/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapperBasics.h b/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapperBasics.h deleted file mode 100644 index ab06f719c3..0000000000 --- a/Subtrees/beast/modules/beast_asio/sockets/beast_SocketWrapperBasics.h +++ /dev/null @@ -1,136 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_SOCKETWRAPPERBASICS_H_INCLUDED -#define BEAST_SOCKETWRAPPERBASICS_H_INCLUDED - -/** Some utilities for SocketWrapper and others. -*/ -class SocketWrapperBasics -{ -public: -#if 0 - /** Template specialization to determine available interfaces. */ - template - struct InterfacesOf - { - /** Intrusive tag support. - - To use this, add a struct called SocketInterfaces to your - class and derive it from the interfaces that you support. - For example: - - @code - - struct MyHandshakingStream - { - struct SocketInterfaces - : SocketInterface::Stream - , SocketInterface::Handshake - { - }; - } - - @endcode - */ - typedef typename Object::SocketInterfaces type; - typedef type value; - }; - - // Specialization for boost::asio::basic_socket_acceptor - template - struct InterfacesOf > - { - struct value : SocketInterface::Acceptor { }; - typedef value type; - }; - - // Specialization for boost::asio::basic_socket - template - struct InterfacesOf > - { - struct value : SocketInterface::Socket { }; - typedef value type; - }; - - // Specialization for boost::asio::basic_stream_socket - template - struct InterfacesOf > - { - struct value : SocketInterface::Socket, SocketInterface::Stream { }; - typedef value type; - }; - - // Specialization for boost::asio::buffered_stream - template - struct InterfacesOf > - { - struct value : SocketInterface::Stream { }; - typedef value type; - }; - - // Specialization for boost::asio::buffered_read_stream - template - struct InterfacesOf > - { - struct value : SocketInterface::Stream { }; - typedef value type; - }; - - // Specialization for boost::asio::buffered_write_stream - template - struct InterfacesOf > - { - struct value : SocketInterface::Stream { }; - typedef value type; - }; - - // Specialization for boost::asio::ssl::stream - template - struct InterfacesOf > - { - struct value : SocketInterface::Stream , SocketInterface::Handshake { }; - typedef value type; - }; - -#if 1 - // Less elegant, but works. - // Determines if Object supports the specified Interface - template - struct HasInterface : boost::false_type { }; - - template - struct HasInterface ::type> >::type > - : boost::true_type { }; -#else - // This should work, but doesn't. - // K-ballo from #boost suggested it. - // - // Determines if Object supports the specified Interface - template - struct HasInterface : boost::is_base_of > - { - }; -#endif -#endif -}; - -#endif diff --git a/modules/ripple_asio/boost/ripple_IoService.cpp b/modules/ripple_app/boost/ripple_IoService.cpp similarity index 100% rename from modules/ripple_asio/boost/ripple_IoService.cpp rename to modules/ripple_app/boost/ripple_IoService.cpp diff --git a/modules/ripple_asio/boost/ripple_IoService.h b/modules/ripple_app/boost/ripple_IoService.h similarity index 100% rename from modules/ripple_asio/boost/ripple_IoService.h rename to modules/ripple_app/boost/ripple_IoService.h diff --git a/modules/ripple_asio/boost/ripple_SslContext.cpp b/modules/ripple_app/boost/ripple_SslContext.cpp similarity index 100% rename from modules/ripple_asio/boost/ripple_SslContext.cpp rename to modules/ripple_app/boost/ripple_SslContext.cpp diff --git a/modules/ripple_asio/boost/ripple_SslContext.h b/modules/ripple_app/boost/ripple_SslContext.h similarity index 100% rename from modules/ripple_asio/boost/ripple_SslContext.h rename to modules/ripple_app/boost/ripple_SslContext.h diff --git a/modules/ripple_app/ripple_app.cpp b/modules/ripple_app/ripple_app.cpp index 3f656e7063..f28a02e57d 100644 --- a/modules/ripple_app/ripple_app.cpp +++ b/modules/ripple_app/ripple_app.cpp @@ -157,6 +157,8 @@ namespace ripple #include "tx/TransactionMaster.h" #include "main/ripple_LocalCredentials.h" #include "network/WSDoor.h" + #include "boost/ripple_IoService.h" + #include "boost/ripple_SslContext.h" #include "main/ripple_Application.h" #include "rpc/RPCHandler.h" #include "tx/TransactionQueue.h" @@ -295,6 +297,9 @@ static const uint64 tenTo17m1 = tenTo17 - 1; #include "data/ripple_SqliteDatabase.cpp" #include "data/ripple_DBInit.cpp" +#include "boost/ripple_IoService.cpp" +#include "boost/ripple_SslContext.cpp" + #endif //------------------------------------------------------------------------------ diff --git a/modules/ripple_app/ripple_app.h b/modules/ripple_app/ripple_app.h index 2939f97582..904382cc9d 100644 --- a/modules/ripple_app/ripple_app.h +++ b/modules/ripple_app/ripple_app.h @@ -22,6 +22,4 @@ #include "modules/ripple_basics/ripple_basics.h" -#include "modules/ripple_asio/ripple_asio.h" - #endif diff --git a/modules/ripple_asio/ripple_asio.cpp b/modules/ripple_asio/ripple_asio.cpp index 128363f8c6..682226a5d3 100644 --- a/modules/ripple_asio/ripple_asio.cpp +++ b/modules/ripple_asio/ripple_asio.cpp @@ -14,18 +14,29 @@ #include "BeastConfig.h" +// Must come before +#include "beast/modules/beast_core/beast_core.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include // for unit test +#include +#include + #include "beast/modules/beast_basics/beast_basics.h" +#include "beast/modules/beast_asio/beast_asio.h" #include "ripple_asio.h" -#include "ripple_asio_impl.h" - namespace ripple { -#include "boost/ripple_IoService.cpp" -#include "boost/ripple_SslContext.cpp" - # include "sockets/ripple_RippleTlsContext.h" # include "sockets/ripple_MultiSocket.h" #include "sockets/ripple_MultiSocketType.h" diff --git a/modules/ripple_asio/ripple_asio.h b/modules/ripple_asio/ripple_asio.h index 55918ebcb1..bc143f5095 100644 --- a/modules/ripple_asio/ripple_asio.h +++ b/modules/ripple_asio/ripple_asio.h @@ -7,29 +7,13 @@ #ifndef RIPPLE_ASIO_H_INCLUDED #define RIPPLE_ASIO_H_INCLUDED -#include "beast/modules/beast_core/beast_core.h" -#include "beast/modules/beast_asio/beast_asio.h" - -// Must be outside the namespace - -#include "ripple_asio_fwdecl.h" - -/** Abstractions for boost::asio - - This is the first step to removing the dependency on boost::asio. - These classes are designed to move boost::asio header material out of - the majority of include paths. - - @ingroup ripple_asio - @file ripple_asio.h -*/ namespace ripple { using namespace beast; -#include "boost/ripple_IoService.h" -#include "boost/ripple_SslContext.h" +//#include "sockets/ripple_TlsContext.h" +//#include "sockets/ripple_MultiSocket.h" } diff --git a/modules/ripple_asio/ripple_asio_fwdecl.h b/modules/ripple_asio/ripple_asio_fwdecl.h deleted file mode 100644 index 232d34107b..0000000000 --- a/modules/ripple_asio/ripple_asio_fwdecl.h +++ /dev/null @@ -1,32 +0,0 @@ -//------------------------------------------------------------------------------ -/* - Copyright (c) 2011-2013, OpenCoin, Inc. -*/ -//============================================================================== - -#ifndef RIPPLE_ASIO_FWDECL_H_INCLUDED -#define RIPPLE_ASIO_FWDECL_H_INCLUDED - -/** Forward declarations for boost::asio. - - These allow the header material for boost::asio to be omitted for - most translation units. -*/ - -namespace boost { - -namespace asio { - -class io_service; - -namespace ssl { - -class context; - -} - -} - -} - -#endif diff --git a/modules/ripple_asio/ripple_asio_impl.h b/modules/ripple_asio/ripple_asio_impl.h deleted file mode 100644 index da4371d61b..0000000000 --- a/modules/ripple_asio/ripple_asio_impl.h +++ /dev/null @@ -1,35 +0,0 @@ -//------------------------------------------------------------------------------ -/* - Copyright (c) 2011-2013, OpenCoin, Inc. -*/ -//============================================================================== - -#ifndef RIPPLE_ASIO_IMPL_H_INCLUDED -#define RIPPLE_ASIO_IMPL_H_INCLUDED - -#include - -// Once everything is converted, these can be moved to ripple_asio.cpp -#include -#include - -#include -#include -#include -#include -#include -#include // for unit test -#include -#include - -/** Implementations for boost::asio abstractions. - - These require boost::asio header material to be included. -*/ - -namespace ripple -{ - -} - -#endif diff --git a/modules/ripple_asio/sockets/ripple_MultiSocket.cpp b/modules/ripple_asio/sockets/ripple_MultiSocket.cpp index e8c5dbbdc8..11f661cefb 100644 --- a/modules/ripple_asio/sockets/ripple_MultiSocket.cpp +++ b/modules/ripple_asio/sockets/ripple_MultiSocket.cpp @@ -182,7 +182,7 @@ public: { check_precondition (! MultiSocket::Flag (extraClientFlags).any_set (MultiSocket::Flag::client_role | MultiSocket::Flag::server_role)); -#if 1 +#if 0 run (MultiSocket::Flag::client_role | extraClientFlags, MultiSocket::Flag::server_role | extraServerFlags); #else run_async (MultiSocket::Flag::client_role | extraClientFlags, MultiSocket::Flag::server_role | extraServerFlags); @@ -192,7 +192,7 @@ public: template void testProtocol () { -#if 1 +#if 0 // These should pass. run (0, 0); run (MultiSocket::Flag::client_role, 0); @@ -204,8 +204,8 @@ public: // These should pass testFlags (MultiSocket::Flag::ssl, MultiSocket::Flag::ssl_required); testFlags (0, MultiSocket::Flag::ssl); - testFlags (MultiSocket::Flag::ssl, MultiSocket::Flag::ssl); #endif + testFlags (MultiSocket::Flag::ssl, MultiSocket::Flag::ssl); } void runTest () diff --git a/modules/ripple_asio/sockets/ripple_MultiSocketType.h b/modules/ripple_asio/sockets/ripple_MultiSocketType.h index 12347d253a..b51bc7f2c2 100644 --- a/modules/ripple_asio/sockets/ripple_MultiSocketType.h +++ b/modules/ripple_asio/sockets/ripple_MultiSocketType.h @@ -18,12 +18,6 @@ private: typedef typename boost::remove_reference ::type stream_type; public: -#if 0 - struct SocketInterfaces - : SocketInterface::Handshake - { }; -#endif - template ssl_detector (Arg& arg) : m_next_layer (arg) @@ -108,7 +102,6 @@ private: template class MultiSocketType : public MultiSocket - , protected SocketWrapperBasics { public: typedef typename boost::remove_reference ::type next_layer_type; diff --git a/modules/ripple_net/ripple_net.cpp b/modules/ripple_net/ripple_net.cpp index ebf7e351b3..a2ed5d8037 100644 --- a/modules/ripple_net/ripple_net.cpp +++ b/modules/ripple_net/ripple_net.cpp @@ -17,8 +17,6 @@ // VFALCO TODO Remove this dependency on theConfig #include "../modules/ripple_core/ripple_core.h" // theConfig for HttpsClient -#include "beast/modules/beast_asio/beast_asio.h" - namespace ripple { diff --git a/modules/ripple_websocket/autosocket/ripple_AutoSocket.h b/modules/ripple_websocket/autosocket/ripple_AutoSocket.h index 200a9df998..c1b218c97b 100644 --- a/modules/ripple_websocket/autosocket/ripple_AutoSocket.h +++ b/modules/ripple_websocket/autosocket/ripple_AutoSocket.h @@ -24,13 +24,6 @@ public: typedef boost::function callback; public: -#if 0 - struct SocketInterfaces - : beast::SocketInterface::AsyncStream - , beast::SocketInterface::AsyncHandshake - , beast::SocketInterface::LowestLayer { }; -#endif - AutoSocket (boost::asio::io_service& s, boost::asio::ssl::context& c) : mSecure (false) , mBuffer (4) diff --git a/modules/ripple_websocket/ripple_websocket.h b/modules/ripple_websocket/ripple_websocket.h index 7640ced66b..f9d4a2ac47 100644 --- a/modules/ripple_websocket/ripple_websocket.h +++ b/modules/ripple_websocket/ripple_websocket.h @@ -34,9 +34,6 @@ // #include "../modules/ripple_basics/ripple_basics.h" -// This should be in the .cpp -#include "beast/modules/beast_asio/beast_asio.h" - //------------------------------------------------------------------------------ #include "websocket/src/common.hpp"