From 30ff139a297f46c4ef7b22f9109b345f0aba53ba Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 4 Oct 2013 21:28:36 -0700 Subject: [PATCH] Add ErrorCode and boost library --- .../Builds/VisualStudio2012/beast.vcxproj | 3 ++ .../VisualStudio2012/beast.vcxproj.filters | 12 +++++++ src/beast/beast/Boost.h | 31 ++++++++++++++++ src/beast/beast/boost/Boost.cpp | 22 ++++++++++++ src/beast/beast/boost/ErrorCode.h | 35 +++++++++++++++++++ src/ripple/beast/ripple_beast.cpp | 1 + 6 files changed, 104 insertions(+) create mode 100644 src/beast/beast/Boost.h create mode 100644 src/beast/beast/boost/Boost.cpp create mode 100644 src/beast/beast/boost/ErrorCode.h diff --git a/src/beast/Builds/VisualStudio2012/beast.vcxproj b/src/beast/Builds/VisualStudio2012/beast.vcxproj index 59ea617207..51c503376a 100644 --- a/src/beast/Builds/VisualStudio2012/beast.vcxproj +++ b/src/beast/Builds/VisualStudio2012/beast.vcxproj @@ -83,6 +83,8 @@ + + @@ -397,6 +399,7 @@ + true diff --git a/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters b/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters index 8775b85938..e6f5ed48b3 100644 --- a/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters +++ b/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters @@ -294,6 +294,9 @@ {b116764e-1ad5-4854-a549-73c5beb5ae37} + + {d7ec873a-d1e7-4341-9d20-a1be8f8ddd88} + @@ -1236,6 +1239,12 @@ beast\threads\detail + + beast\boost + + + beast + @@ -1781,6 +1790,9 @@ beast\threads\impl + + beast\boost + diff --git a/src/beast/beast/Boost.h b/src/beast/beast/Boost.h new file mode 100644 index 0000000000..295eca5a58 --- /dev/null +++ b/src/beast/beast/Boost.h @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +/* + This file is part of Beast: https://github.com/vinniefalco/Beast + Copyright 2013, Vinnie Falco + + Portions of this file are from JUCE. + Copyright (c) 2013 - Raw Material Software Ltd. + Please visit http://www.juce.com + + 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_BOOST_H_INCLUDED +#define BEAST_BOOST_H_INCLUDED + +// These classes require boost in order to be used. + +#include "boost/ErrorCode.h" + +#endif diff --git a/src/beast/beast/boost/Boost.cpp b/src/beast/beast/boost/Boost.cpp new file mode 100644 index 0000000000..7e26631060 --- /dev/null +++ b/src/beast/beast/boost/Boost.cpp @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +/* + 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. +*/ +//============================================================================== + +#include "BeastConfig.h" + +#include "ErrorCode.h" diff --git a/src/beast/beast/boost/ErrorCode.h b/src/beast/beast/boost/ErrorCode.h new file mode 100644 index 0000000000..ea2fb8436b --- /dev/null +++ b/src/beast/beast/boost/ErrorCode.h @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +/* + 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_BOOST_ERRORCODE_H_INCLUDED +#define BEAST_BOOST_ERRORCODE_H_INCLUDED + +#include + +namespace beast { + +// Lift this into our namespace. For now we will +// use boost, and then switch to std::error_code when +// it is available on all our supported platforms. +// +typedef boost::system::error_code ErrorCode; + +} + +#endif diff --git a/src/ripple/beast/ripple_beast.cpp b/src/ripple/beast/ripple_beast.cpp index 8766494671..9cf2e4adaf 100644 --- a/src/ripple/beast/ripple_beast.cpp +++ b/src/ripple/beast/ripple_beast.cpp @@ -38,6 +38,7 @@ #include "../beast/modules/beast_db/beast_db.cpp" #include "../beast/modules/beast_sqdb/beast_sqdb.cpp" +#include "../beast/beast/boost/Boost.cpp" #include "../beast/beast/chrono/Chrono.cpp" #include "../beast/beast/crypto/Crypto.cpp" #include "../beast/beast/http/HTTP.cpp"