Reorganize source file hierarchy:

* Rename unity files
* Move some modules to new subdirectories
* Remove obsolete Visual Studio project files
* Remove obsolete coding style and TODO list
This commit is contained in:
Vinnie Falco
2014-06-03 14:48:34 -07:00
parent 39a387b54c
commit 4f1d1d2a8a
774 changed files with 6924 additions and 10355 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beast", "..\..\src\beast\Builds\VisualStudio2013\beast.vcxproj", "{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}"
EndProject
Global
@@ -15,11 +13,6 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.ActiveCfg = Debug|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|x64.ActiveCfg = Debug|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|Win32.ActiveCfg = Release|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|x64.ActiveCfg = Release|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|x64.Build.0 = Release|x64
{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}.Debug|Win32.ActiveCfg = debug|x64
{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}.Debug|x64.ActiveCfg = debug|x64
{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}.Debug|x64.Build.0 = debug|x64

View File

@@ -180,22 +180,6 @@ def files(base):
yield os.path.normpath(path)
return list(_iter(base))
def category(ext):
if ext in ['.c', '.cc', '.cpp']:
return 'compiled'
return 'none'
def unity_category(f):
base, fullname = os.path.split(f)
name, ext = os.path.splitext(fullname)
if os.path.splitext(name)[1] == '.unity':
return category(ext)
return 'none'
def categorize(groups, func, sources):
for f in sources:
groups.setdefault(func(f), []).append(f)
def print_coms(target, source, env):
'''Display command line exemplars for an environment'''
print ('Target: ' + Beast.yellow(str(target[0])))
@@ -439,6 +423,14 @@ def config_env(toolchain, variant, env):
#-------------------------------------------------------------------------------
def addSource(path, env, variant_dirs, CPPPATH=[]):
if CPPPATH:
env = env.Clone()
env.Prepend(CPPPATH=CPPPATH)
return env.Object(Beast.variantFile(path, variant_dirs))
#-------------------------------------------------------------------------------
# Configure the base construction environment
root_dir = Dir('#').srcnode().get_abspath() # Path to this SConstruct file
build_dir = os.path.join('build')
@@ -496,35 +488,14 @@ else:
default_variant = 'debug'
default_target = None
# Collect sources from recursive directory iteration
groups = collections.defaultdict(list)
categorize(groups, unity_category,
files('src/ripple')
+ files('src/ripple_app')
+ files('src/ripple_basics')
+ files('src/ripple_core')
+ files('src/ripple_data')
+ files('src/ripple_hyperleveldb')
+ files('src/ripple_leveldb')
+ files('src/ripple_net')
+ files('src/ripple_overlay')
+ files('src/ripple_rpc')
+ files('src/ripple_websocket')
+ files('src/snappy')
)
groups['protoc'].append (
os.path.join('src', 'ripple', 'proto', 'ripple.proto'))
for source in groups['protoc']:
outputs = base.Protoc([],
for source in [
'src/ripple/proto/ripple.proto',
]:
base.Protoc([],
source,
PROTOCPROTOPATH=[os.path.dirname(source)],
PROTOCOUTDIR=os.path.join(build_dir, 'proto'),
PROTOCPYTHONOUTDIR=None)
groups['none'].extend(outputs)
if Beast.system.osx:
mm = os.path.join('src', 'ripple', 'beast', 'ripple_beastobjc.unity.mm')
groups['compiled'].append(mm)
# Declare the targets
aliases = collections.defaultdict(list)
@@ -544,15 +515,53 @@ for toolchain in toolchains:
}
for dest, source in variant_dirs.iteritems():
env.VariantDir(dest, source, duplicate=0)
objects = [env.Object(x) for x in Beast.variantFiles(
groups['compiled'], variant_dirs)]
objects = []
objects.append(addSource('src/ripple/unity/app.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app1.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app2.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app3.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app4.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app5.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app6.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app7.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app8.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/app9.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/basics.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/beast.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/beastc.c', env, variant_dirs))
objects.append(addSource('src/ripple/unity/common.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/core.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/data.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/http.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/hyperleveldb.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/json.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/net.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/overlay.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/rpcx.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/websocket.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/peerfinder.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/protobuf.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/ripple.proto.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/radmap.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/resource.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/rocksdb.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/sitefiles.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/snappy.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/sslutil.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/testoverlay.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/types.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/validators.cpp', env, variant_dirs))
objects.append(addSource('src/ripple/unity/leveldb.cpp', env, variant_dirs))
if Beast.system.osx:
objects.append(addSource('src/ripple/unity/beastobjc.mm', env, variant_dirs))
target = env.Program(
target = os.path.join(variant_dir, 'rippled'),
source = objects
)
# This causes 'msvc.debug' (e.g.) to show up in the node tree...
#print_action = env.Command(variant_name, [], Action(print_coms, ''))
#env.Depends(objects, print_action)
if toolchain == default_toolchain and variant == default_variant:
default_target = target
install_target = env.Install (build_dir, source = default_target)
@@ -573,6 +582,6 @@ for key, value in aliases.iteritems():
vcxproj = base.VSProject(
os.path.join('Builds', 'VisualStudio2013', 'RippleD'),
source = [],
VSPROJECT_ROOT_DIRS = ['.'],
VSPROJECT_ROOT_DIRS = ['src/beast', 'src', '.'],
VSPROJECT_CONFIGS = msvc_configs)
base.Alias('vcxproj', vcxproj)

2
src/.gitignore vendored
View File

@@ -1,2 +0,0 @@
# boost subtree
/boost

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<RepoDir>$(ProjectDir)\..\..\</RepoDir>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>BEAST_INCLUDE_BEASTCONFIG=0;_CRTDBG_MAP_ALLOC;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalIncludeDirectories>$(RepoDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="RepoDir">
<Value>$(RepoDir)</Value>
</BuildMacro>
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,228 +0,0 @@
Write code in a clear, self-documenting style but use comments where necessary.
Use Test Driven Development. It encourages designing interfaces first, before implementation.
Don't Repeat Yourself, <20>D.R.Y.<2E>. Put redundant code in a class so it can be re-used and unit tested.
Expose as little of a class as possible. Prefer private over protected. Prefer protected over public. The smaller the interface footprint, the easier it is to write unit tests and comprehend the operation of the class. This is the Interface Segregation Principle.
Use language constants (enum or static const) with descriptive names instead of hard-coded <20>magic numbers.<2E>
Make classes depend on as few external classes or routines as possible. Ideally, no dependencies.
Don't limit flexibility of parameters by forcing the caller to use specific types where general types would work.
--------------------------------------------------------------------------------
# Coding Standards
Coding standards used here are extreme strict and consistent. The style
evolved gradually over the years, incorporating generally acknowledged
best-practice C++ advice, experience, and personal preference.
## Don't Repeat Yourself!
The [Don't Repeat Yourself][1] principle summarises the essence of what it
means to write good code, in all languages, at all levels.
## Formatting
The goal of source code formatting should always be to make things as easy to
read as possible. White space is used to guide the eye so that details are not
overlooked. Blank lines are used to separate code into "paragraphs."
* No tab characters please.
* Tab stops are set to 4 spaces.
* Braces are indented in the [Allman style][2].
* Always place a space before and after all binary operators,
especially assignments (`operator=`).
* The `!` operator should always be followed by a space.
* The `~` operator should be preceded by a space, but not followed by one.
* The `++` and `--` operators should have no spaces between the operator and
the operand.
* A space never appears before a comma, and always appears after a comma.
* Always place a space before an opening parenthesis. One exception is if
the parentheses are empty.
* Don't put spaces after a parenthesis. A typical member function call might
look like this: `foobar (1, 2, 3);`
* In general, leave a blank line before an `if` statement.
* In general, leave a blank line after a closing brace `}`.
* Do not place code or comments on the same line as any opening or
closing brace.
* Do not write `if` statements all-on-one-line. The exception to this is when
you've got a sequence of similar `if` statements, and are aligning them all
vertically to highlight their similarities.
* In an `if-else` statement, if you surround one half of the statement with
braces, you also need to put braces around the other half, to match.
* When writing a pointer type, use this spacing: `SomeObject* myObject`.
Technically, a more correct spacing would be `SomeObject *myObject`, but
it makes more sense for the asterisk to be grouped with the type name,
since being a pointer is part of the type, not the variable name. The only
time that this can lead to any problems is when you're declaring multiple
pointers of the same type in the same statement - which leads on to the next
rule:
* When declaring multiple pointers, never do so in a single statement, e.g.
`SomeObject* p1, *p2;` - instead, always split them out onto separate lines
and write the type name again, to make it quite clear what's going on, and
avoid the danger of missing out any vital asterisks.
* The previous point also applies to references, so always put the `&` next to
the type rather than the variable, e.g. `void foo (Thing const& thing)`. And
don't put a space on both sides of the `*` or `&` - always put a space after
it, but never before it.
* The word `const` should be placed to the right of the thing that it modifies,
for consistency. For example `int const` refers to an int which is const.
`int const*` is a pointer to an int which is const. `int *const` is a const
pointer to an int.
* Always place a space in between the template angle brackets and the type
name. Template code is already hard enough to read!
## Naming conventions
* Member variables and method names are written with camel-case, and never
begin with a capital letter.
* Class names are also written in camel-case, but always begin with a capital
letter.
* For global variables... well, you shouldn't have any, so it doesn't matter.
* Class data members begin with `m_`, static data members begin with `s_`.
Global variables begin with `g_`. This is so the scope of the corresponding
declaration can be easily determined.
* Avoid underscores in your names, especially leading or trailing underscores.
In particular, leading underscores should be avoided, as these are often used
in standard library code, so to use them in your own code looks quite jarring.
* If you really have to write a macro for some reason, then make it all caps,
with underscores to separate the words. And obviously make sure that its name
is unlikely to clash with symbols used in other libraries or 3rd party code.
## Types, const-correctness
* If a method can (and should!) be const, make it const!
* If a method definitely doesn't throw an exception (be careful!), mark it as
`noexcept`
* When returning a temporary object, e.g. a String, the returned object should
be non-const, so that if the class has a C++11 move operator, it can be used.
* If a local variable can be const, then make it const!
* Remember that pointers can be const as well as primitives; For example, if
you have a `char*` whose contents are going to be altered, you may still be
able to make the pointer itself const, e.g. `char* const foobar = getFoobar();`.
* Do not declare all your local variables at the top of a function or method
(i.e. in the old-fashioned C-style). Declare them at the last possible moment,
and give them as small a scope as possible.
* Object parameters should be passed as `const&` wherever possible. Only
pass a parameter as a copy-by-value object if you really need to mutate
a local copy inside the method, and if making a local copy inside the method
would be difficult.
* Use portable `for()` loop variable scoping (i.e. do not have multiple for
loops in the same scope that each re-declare the same variable name, as
this fails on older compilers)
* When you're testing a pointer to see if it's null, never write
`if (myPointer)`. Always avoid that implicit cast-to-bool by writing it more
fully: `if (myPointer != nullptr)`. And likewise, never ever write
`if (! myPointer)`, instead always write `if (myPointer == nullptr)`.
It is more readable that way.
* Avoid C-style casts except when converting between primitive numeric types.
Some people would say "avoid C-style casts altogether", but `static_cast` is
a bit unreadable when you just want to cast an `int` to a `float`. But
whenever a pointer is involved, or a non-primitive object, always use
`static_cast`. And when you're reinterpreting data, always use
`reinterpret_cast`.
* Until C++ gets a universal 64-bit primitive type (part of the C++11
standard), it's best to stick to the `std::int64_t` and `std::uint64_t` typedefs.
## Object lifetime and ownership
* Absolutely do NOT use `delete`, `deleteAndZero`, etc. There are very very few
situations where you can't use a `ScopedPointer` or some other automatic
lifetime management class.
* Do not use `new` unless there's no alternative. Whenever you type `new`, always
treat it as a failure to find a better solution. If a local variable can be
allocated on the stack rather than the heap, then always do so.
* Do not ever use `new` or `malloc` to allocate a C++ array. Always use a
`HeapBlock` instead.
* And just to make it doubly clear: Never use `malloc` or `calloc`.
* If a parent object needs to create and own some kind of child object, always
use composition as your first choice. If that's not possible (e.g. if the
child needs a pointer to the parent for its constructor), then use a
`ScopedPointer`.
* If possible, pass an object as a reference rather than a pointer. If possible,
make it a `const` reference.
* Obviously avoid static and global values. Sometimes there's no alternative,
but if there is an alternative, then use it, no matter how much effort it
involves.
* If allocating a local POD structure (e.g. an operating-system structure in
native code), and you need to initialise it with zeros, use the `= { 0 };`
syntax as your first choice for doing this. If for some reason that's not
appropriate, use the `zerostruct()` function, or in case that isn't suitable,
use `zeromem()`. Don't use `memset()`.
## Classes
* Declare a class's public section first, and put its constructors and
destructor first. Any protected items come next, and then private ones.
* Use the most restrictive access-specifier possible for each member. Prefer
`private` over `protected`, and `protected` over `public`. Don't expose
things unnecessarily.
* Preferred positioning for any inherited classes is to put them to the right
of the class name, vertically aligned, e.g.:
class Thing : public Foo,
private Bar
{
}
* Put a class's member variables (which should almost always be private, of course),
after all the public and protected method declarations.
* Any private methods can go towards the end of the class, after the member
variables.
* If your class does not have copy-by-value semantics, derive the class from
`Uncopyable`.
* If your class is likely to be leaked, then derive your class from
`LeakChecked<>`.
* Constructors that take a single parameter should be default be marked
`explicit`. Obviously there are cases where you do want implicit conversion,
but always think about it carefully before writing a non-explicit constructor.
* Do not use `NULL`, `null`, or 0 for a null-pointer. And especially never use
'0L', which is particulary burdensome. Use `nullptr` instead - this is the
C++2011 standard, so get used to it. There's a fallback definition for `nullptr`
in Beast, so it's always possible to use it even if your compiler isn't yet
C++2011 compliant.
* All the C++ 'guru' books and articles are full of excellent and detailed advice
on when it's best to use inheritance vs composition. If you're not already
familiar with the received wisdom in these matters, then do some reading!
## Miscellaneous
* Constrain the scope of identifiers to the smallest area that needs it. Consider
using nested classes or classes inside functions, if doing so will expose less
interface and implementation overall.
* `goto` statements should not be used at all, even if the alternative is
more verbose code. The only exception is when implementing an algorithm in
a function as a state machine.
* Don't use macros! OK, obviously there are many situations where they're the
right tool for the job, but treat them as a last resort. Certainly don't ever
use a macro just to hold a constant value or to perform any kind of function
that could have been done as a real inline function. And it goes without saying
that you should give them names which aren't going to clash with other code.
And `#undef` them after you've used them, if possible.
* When using the `++` or `--` operators, never use post-increment if
pre-increment could be used instead. Although it doesn't matter for
primitive types, it's good practice to pre-increment since this can be
much more efficient for more complex objects. In particular, if you're
writing a for loop, always use pre-increment,
e.g. `for (int = 0; i < 10; ++i)`
* Never put an "else" statement after a "return"! This is well-explained in the
LLVM coding standards...and a couple of other very good pieces of advice from
the LLVM standards are in there as well.
* When getting a possibly-null pointer and using it only if it's non-null, limit
the scope of the pointer as much as possible - e.g. Do NOT do this:
Foo* f = getFoo ();
if (f != nullptr)
f->doSomething ();
// other code
f->doSomething (); // oops! f may be null!
..instead, prefer to write it like this, which reduces the scope of the
pointer, making it impossible to write code that accidentally uses a null
pointer:
if (Foo* f = getFoo ())
f->doSomethingElse ();
// f is out-of-scope here, so impossible to use it if it's null
(This also results in smaller, cleaner code)
[1]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself
[2]: http://en.wikipedia.org/wiki/Indent_style#Allman_style

View File

@@ -1,44 +0,0 @@
--------------------------------------------------------------------------------
BEAST TODO
--------------------------------------------------------------------------------
- Change sqdb to use exceptions instead of errors
- Use SemanticVersion for beast version numbers to replace BEAST_VERSION
- add support for a __PRETTY_FUNCTION__ equivalent for all environments
- Import secp256k1 from sipa
- Set sqlite thread safety model to '2' in beast_sqlite
- Document and rename all the sqdb files and classes
- Specialize UnsignedInteger<> for peformance in the storage format
- Rename HeapBlock routines to not conflict with _CRTDBG_MAP_ALLOC macros
- Implement beast::Bimap?
- Use Bimap for storage in the DeadlineTimer::Manager, to support
thousands of timers.
- Think about adding a shouldStop bool to InterruptibleThread, along
with a shouldStop () function returning bool, and a stop() method.
- Tidy up CacheLine, MemoryAlignment
- Implement a reasonable substitute for boost's thread_local_storage
- Rename malloc/calloc JUCE members that conflict with the debug CRT from MSVC
- Reformat every Doxygen comment
- Fix Doxygen metatags
- update Beast Doxyfile
- Rename SharedData to SharedState or something?
- Make sure the template BeastConfig.h is included in the Doxyfile
- Implement robust key/value database with bulk write

View File

@@ -22,7 +22,7 @@
#include <beast/crypto/UnsignedInteger.h>
#include <beast/unit_test/suite.h>
#include <modules/beast_core/maths/Random.h>
#include <beast/module/core/maths/Random.h>
#include <cstddef>
#include <string>

View File

@@ -0,0 +1,77 @@
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.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_ASIO_MODULE_H_INCLUDED
#define BEAST_ASIO_MODULE_H_INCLUDED
// Must come before boost includes to fix the bost placeholders.
#include <beast/module/core/core.h>
// This module requires boost and possibly OpenSSL
#include <beast/module/asio/system/BoostIncludes.h>
#include <beast/http/URL.h>
#include <beast/http/ParsedURL.h>
#include <beast/asio/IPAddressConversion.h>
// Order matters
#include <beast/module/asio/async/AsyncObject.h>
#include <beast/module/asio/basics/FixedInputBuffer.h>
#include <beast/module/asio/basics/PeerRole.h>
#include <beast/module/asio/basics/SSLContext.h>
#include <beast/module/asio/basics/SharedArg.h>
#include <beast/module/asio/http/HTTPVersion.h>
#include <beast/module/asio/http/HTTPField.h>
#include <beast/module/asio/http/HTTPHeaders.h>
#include <beast/module/asio/http/HTTPMessage.h>
#include <beast/module/asio/http/HTTPRequest.h>
#include <beast/module/asio/http/HTTPResponse.h>
#include <beast/module/asio/http/HTTPParser.h>
#include <beast/module/asio/http/HTTPRequestParser.h>
#include <beast/module/asio/http/HTTPResponseParser.h>
#include <beast/module/asio/http/HTTPClientType.h>
#include <beast/module/asio/protocol/InputParser.h>
#include <beast/module/asio/protocol/HandshakeDetectLogic.h>
#include <beast/module/asio/protocol/HandshakeDetectLogicPROXY.h>
#include <beast/module/asio/protocol/HandshakeDetectLogicSSL2.h>
#include <beast/module/asio/protocol/HandshakeDetectLogicSSL3.h>
#include <beast/module/asio/protocol/HandshakeDetector.h>
#include <beast/module/asio/protocol/PrefilledReadStream.h>
#include <beast/module/asio/tests/TestPeerBasics.h>
#include <beast/module/asio/tests/TestPeer.h>
#include <beast/module/asio/tests/TestPeerDetails.h>
#include <beast/module/asio/tests/TestPeerLogic.h>
#include <beast/module/asio/tests/TestPeerLogicSyncServer.h>
#include <beast/module/asio/tests/TestPeerLogicSyncClient.h>
#include <beast/module/asio/tests/TestPeerLogicProxyClient.h>
#include <beast/module/asio/tests/TestPeerLogicAsyncServer.h>
#include <beast/module/asio/tests/TestPeerLogicAsyncClient.h>
#include <beast/module/asio/tests/TestPeerType.h>
#include <beast/module/asio/tests/TestPeerDetailsTcp.h>
#include <beast/module/asio/tests/PeerTest.h>
#endif

View File

@@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.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.
*/
//==============================================================================
#if BEAST_INCLUDE_BEASTCONFIG
#include <BeastConfig.h>
#endif
#include <beast/module/asio/system/OpenSSLIncludes.h>
#include <beast/module/asio/asio.h>
#include <beast/http/impl/joyent_parser.h>
#include <beast/module/asio/basics/PeerRole.cpp>
#include <beast/module/asio/basics/SSLContext.cpp>
#include <beast/module/asio/protocol/HandshakeDetectLogicPROXY.cpp>
#include <beast/module/asio/http/HTTPParserImpl.h>
#include <beast/module/asio/http/HTTPClientType.cpp>
#include <beast/module/asio/http/HTTPField.cpp>
#include <beast/module/asio/http/HTTPHeaders.cpp>
#include <beast/module/asio/http/HTTPMessage.cpp>
#include <beast/module/asio/http/HTTPRequest.cpp>
#include <beast/module/asio/http/HTTPResponse.cpp>
#include <beast/module/asio/http/HTTPVersion.cpp>
#include <beast/module/asio/tests/PeerTest.cpp>
#include <beast/module/asio/tests/TestPeerBasics.cpp>
#include <beast/module/asio/tests/TestPeerLogic.cpp>
#include <beast/module/asio/tests/TestPeerLogicProxyClient.cpp>
#include <beast/module/asio/tests/TestPeerLogicSyncServer.cpp>
#include <beast/module/asio/tests/TestPeerLogicSyncClient.cpp>
#include <beast/module/asio/tests/TestPeerLogicAsyncServer.cpp>
#include <beast/module/asio/tests/TestPeerLogicAsyncClient.cpp>
#include <beast/module/asio/tests/TestPeerUnitTests.cpp>
#include <beast/module/asio/http/HTTPParser.cpp>
#include <beast/module/asio/http/HTTPRequestParser.cpp>
#include <beast/module/asio/http/HTTPResponseParser.cpp>

View File

@@ -20,9 +20,9 @@
#ifndef BEAST_ASIO_HTTPHEADERS_H_INCLUDED
#define BEAST_ASIO_HTTPHEADERS_H_INCLUDED
#include <modules/beast_asio/http/HTTPField.h>
#include <beast/module/asio/http/HTTPField.h>
#include <modules/beast_core/text/StringPairArray.h>
#include <beast/module/core/text/StringPairArray.h>
namespace beast {

View File

@@ -20,12 +20,12 @@
#ifndef BEAST_ASIO_HTTPMESSAGE_H_INCLUDED
#define BEAST_ASIO_HTTPMESSAGE_H_INCLUDED
#include <modules/beast_asio/http/HTTPHeaders.h>
#include <modules/beast_asio/http/HTTPVersion.h>
#include <beast/module/asio/http/HTTPHeaders.h>
#include <beast/module/asio/http/HTTPVersion.h>
#include <beast/smart_ptr/SharedObject.h>
#include <beast/net/DynamicBuffer.h>
#include <modules/beast_core/text/StringPairArray.h>
#include <beast/module/core/text/StringPairArray.h>
namespace beast {

View File

@@ -20,8 +20,8 @@
#ifndef BEAST_ASIO_HTTPPARSER_H_INCLUDED
#define BEAST_ASIO_HTTPPARSER_H_INCLUDED
#include <modules/beast_asio/http/HTTPRequest.h>
#include <modules/beast_asio/http/HTTPResponse.h>
#include <beast/module/asio/http/HTTPRequest.h>
#include <beast/module/asio/http/HTTPResponse.h>
namespace beast {

View File

@@ -20,7 +20,7 @@
#ifndef BEAST_ASIO_HTTPREQUEST_H_INCLUDED
#define BEAST_ASIO_HTTPREQUEST_H_INCLUDED
#include <modules/beast_asio/http/HTTPMessage.h>
#include <beast/module/asio/http/HTTPMessage.h>
namespace beast {

View File

@@ -20,7 +20,7 @@
#ifndef BEAST_HTTP_REQUESTPARSER_H_INCLUDED
#define BEAST_HTTP_REQUESTPARSER_H_INCLUDED
#include <modules/beast_asio/http/HTTPParser.h>
#include <beast/module/asio/http/HTTPParser.h>
namespace beast {

View File

@@ -20,7 +20,7 @@
#ifndef BEAST_HTTP_RESPONSEPARSER_H_INCLUDED
#define BEAST_HTTP_RESPONSEPARSER_H_INCLUDED
#include <modules/beast_asio/http/HTTPParser.h>
#include <beast/module/asio/http/HTTPParser.h>
namespace beast {

View File

@@ -20,8 +20,8 @@
#ifndef BEAST_ASIO_HANDSHAKE_HANDSHAKEDETECTLOGICPROXY_H_INCLUDED
#define BEAST_ASIO_HANDSHAKE_HANDSHAKEDETECTLOGICPROXY_H_INCLUDED
#include <modules/beast_asio/protocol/HandshakeDetectLogic.h>
#include <modules/beast_asio/protocol/InputParser.h>
#include <beast/module/asio/protocol/HandshakeDetectLogic.h>
#include <beast/module/asio/protocol/InputParser.h>
namespace beast {
namespace asio {

View File

@@ -20,7 +20,7 @@
#ifndef BEAST_ASIO_HANDSHAKE_INPUTPARSER_H_INCLUDED
#define BEAST_ASIO_HANDSHAKE_INPUTPARSER_H_INCLUDED
#include <modules/beast_asio/basics/FixedInputBuffer.h>
#include <beast/module/asio/basics/FixedInputBuffer.h>
namespace beast {
namespace asio {

View File

@@ -22,7 +22,7 @@
// Make sure we take care of fixing boost::bind oddities first.
#if !defined(BEAST_CORE_H_INCLUDED)
#error beast_core.h must be included before including this file
#error core.h must be included before including this file
#endif
// These should have already been set in your project, but

View File

@@ -24,9 +24,9 @@
#ifndef BEAST_ARRAY_H_INCLUDED
#define BEAST_ARRAY_H_INCLUDED
#include <modules/beast_core/containers/ArrayAllocationBase.h>
#include <modules/beast_core/containers/ElementComparator.h>
#include <modules/beast_core/threads/CriticalSection.h>
#include <beast/module/core/containers/ArrayAllocationBase.h>
#include <beast/module/core/containers/ElementComparator.h>
#include <beast/module/core/threads/CriticalSection.h>
namespace beast {

View File

@@ -28,9 +28,9 @@
#include <beast/Config.h>
#include <beast/config/ContractChecks.h>
#include <modules/beast_core/system/BeforeBoost.h>
#include <modules/beast_core/system/BoostIncludes.h>
#include <modules/beast_core/system/FunctionalIncludes.h>
#include <beast/module/core/system/BeforeBoost.h>
#include <beast/module/core/system/BoostIncludes.h>
#include <beast/module/core/system/FunctionalIncludes.h>
#if BEAST_MSVC
# pragma warning (disable: 4251) // (DLL build warning, must be disabled before pushing the warning state)
@@ -63,7 +63,7 @@
#include <beast/utility/PropertyStream.h>
#include <beast/utility/StaticObject.h>
#include <modules/beast_core/system/StandardIncludes.h>
#include <beast/module/core/system/StandardIncludes.h>
namespace beast
{
@@ -78,13 +78,13 @@ class FileOutputStream;
// Order matters, since headers don't have their own #include lines.
// Add new includes to the bottom.
#include <modules/beast_core/system/Functional.h>
#include <beast/module/core/system/Functional.h>
#include <modules/beast_core/time/AtExitHook.h>
#include <modules/beast_core/time/Time.h>
#include <modules/beast_core/threads/ScopedLock.h>
#include <modules/beast_core/threads/CriticalSection.h>
#include <modules/beast_core/containers/ElementComparator.h>
#include <beast/module/core/time/AtExitHook.h>
#include <beast/module/core/time/Time.h>
#include <beast/module/core/threads/ScopedLock.h>
#include <beast/module/core/threads/CriticalSection.h>
#include <beast/module/core/containers/ElementComparator.h>
// If the MSVC debug heap headers were included, disable
// the macros during the juce include since they conflict.
@@ -116,7 +116,7 @@ class FileOutputStream;
#undef _aligned_offset_recalloc
#undef _aligned_msize
#endif
#include <modules/beast_core/containers/ArrayAllocationBase.h>
#include <beast/module/core/containers/ArrayAllocationBase.h>
#ifdef _CRTDBG_MAP_ALLOC
#pragma pop_macro("_aligned_msize")
#pragma pop_macro("_aligned_offset_recalloc")
@@ -133,49 +133,49 @@ class FileOutputStream;
#pragma pop_macro("calloc")
#endif
#include <modules/beast_core/containers/Array.h>
#include <beast/module/core/containers/Array.h>
#include <modules/beast_core/misc/Result.h>
#include <modules/beast_core/text/StringArray.h>
#include <modules/beast_core/memory/MemoryBlock.h>
#include <modules/beast_core/files/File.h>
#include <beast/module/core/misc/Result.h>
#include <beast/module/core/text/StringArray.h>
#include <beast/module/core/memory/MemoryBlock.h>
#include <beast/module/core/files/File.h>
#include <modules/beast_core/thread/MutexTraits.h>
#include <modules/beast_core/diagnostic/FatalError.h>
#include <modules/beast_core/text/LexicalCast.h>
#include <modules/beast_core/maths/Math.h>
#include <modules/beast_core/logging/Logger.h>
#include <modules/beast_core/containers/LinkedListPointer.h>
#include <modules/beast_core/maths/Random.h>
#include <modules/beast_core/text/StringPairArray.h>
#include <modules/beast_core/containers/ScopedValueSetter.h>
#include <modules/beast_core/maths/Range.h>
#include <modules/beast_core/files/DirectoryIterator.h>
#include <modules/beast_core/streams/InputStream.h>
#include <modules/beast_core/files/FileInputStream.h>
#include <modules/beast_core/streams/InputSource.h>
#include <modules/beast_core/streams/FileInputSource.h>
#include <modules/beast_core/streams/OutputStream.h>
#include <modules/beast_core/files/FileOutputStream.h>
#include <modules/beast_core/files/FileSearchPath.h>
#include <modules/beast_core/files/RandomAccessFile.h>
#include <modules/beast_core/files/TemporaryFile.h>
#include <modules/beast_core/logging/Logger.h>
#include <modules/beast_core/memory/SharedSingleton.h>
#include <modules/beast_core/misc/WindowsRegistry.h>
#include <modules/beast_core/streams/MemoryOutputStream.h>
#include <beast/module/core/thread/MutexTraits.h>
#include <beast/module/core/diagnostic/FatalError.h>
#include <beast/module/core/text/LexicalCast.h>
#include <beast/module/core/maths/Math.h>
#include <beast/module/core/logging/Logger.h>
#include <beast/module/core/containers/LinkedListPointer.h>
#include <beast/module/core/maths/Random.h>
#include <beast/module/core/text/StringPairArray.h>
#include <beast/module/core/containers/ScopedValueSetter.h>
#include <beast/module/core/maths/Range.h>
#include <beast/module/core/files/DirectoryIterator.h>
#include <beast/module/core/streams/InputStream.h>
#include <beast/module/core/files/FileInputStream.h>
#include <beast/module/core/streams/InputSource.h>
#include <beast/module/core/streams/FileInputSource.h>
#include <beast/module/core/streams/OutputStream.h>
#include <beast/module/core/files/FileOutputStream.h>
#include <beast/module/core/files/FileSearchPath.h>
#include <beast/module/core/files/RandomAccessFile.h>
#include <beast/module/core/files/TemporaryFile.h>
#include <beast/module/core/logging/Logger.h>
#include <beast/module/core/memory/SharedSingleton.h>
#include <beast/module/core/misc/WindowsRegistry.h>
#include <beast/module/core/streams/MemoryOutputStream.h>
#include <modules/beast_core/system/SystemStats.h>
#include <modules/beast_core/diagnostic/SemanticVersion.h>
#include <modules/beast_core/threads/DynamicLibrary.h>
#include <modules/beast_core/threads/Process.h>
#include <modules/beast_core/diagnostic/UnitTestUtilities.h>
#include <beast/module/core/system/SystemStats.h>
#include <beast/module/core/diagnostic/SemanticVersion.h>
#include <beast/module/core/threads/DynamicLibrary.h>
#include <beast/module/core/threads/Process.h>
#include <beast/module/core/diagnostic/UnitTestUtilities.h>
#include <modules/beast_core/diagnostic/MeasureFunctionCallTime.h>
#include <beast/module/core/diagnostic/MeasureFunctionCallTime.h>
#include <modules/beast_core/thread/DeadlineTimer.h>
#include <beast/module/core/thread/DeadlineTimer.h>
#include <modules/beast_core/thread/Workers.h>
#include <beast/module/core/thread/Workers.h>
#if BEAST_MSVC
#pragma warning (pop)

View File

@@ -26,8 +26,8 @@
#endif
//==============================================================================
#include <modules/beast_core/native/BasicNativeHeaders.h>
#include <modules/beast_core/beast_core.h>
#include <beast/module/core/native/BasicNativeHeaders.h>
#include <beast/module/core/core.h>
#include <locale>
#include <cctype>
@@ -126,45 +126,45 @@
#undef _aligned_msize
#endif
#include <modules/beast_core/diagnostic/FatalError.cpp>
#include <modules/beast_core/diagnostic/SemanticVersion.cpp>
#include <modules/beast_core/diagnostic/UnitTestUtilities.cpp>
#include <beast/module/core/diagnostic/FatalError.cpp>
#include <beast/module/core/diagnostic/SemanticVersion.cpp>
#include <beast/module/core/diagnostic/UnitTestUtilities.cpp>
#include <modules/beast_core/files/DirectoryIterator.cpp>
#include <modules/beast_core/files/File.cpp>
#include <modules/beast_core/files/FileInputStream.cpp>
#include <modules/beast_core/files/FileOutputStream.cpp>
#include <modules/beast_core/files/FileSearchPath.cpp>
#include <modules/beast_core/files/RandomAccessFile.cpp>
#include <modules/beast_core/files/TemporaryFile.cpp>
#include <beast/module/core/files/DirectoryIterator.cpp>
#include <beast/module/core/files/File.cpp>
#include <beast/module/core/files/FileInputStream.cpp>
#include <beast/module/core/files/FileOutputStream.cpp>
#include <beast/module/core/files/FileSearchPath.cpp>
#include <beast/module/core/files/RandomAccessFile.cpp>
#include <beast/module/core/files/TemporaryFile.cpp>
#include <modules/beast_core/logging/Logger.cpp>
#include <beast/module/core/logging/Logger.cpp>
#include <modules/beast_core/maths/Random.cpp>
#include <beast/module/core/maths/Random.cpp>
#include <modules/beast_core/memory/MemoryBlock.cpp>
#include <beast/module/core/memory/MemoryBlock.cpp>
#include <modules/beast_core/misc/Result.cpp>
#include <beast/module/core/misc/Result.cpp>
#include <modules/beast_core/streams/FileInputSource.cpp>
#include <modules/beast_core/streams/InputStream.cpp>
#include <modules/beast_core/streams/MemoryOutputStream.cpp>
#include <modules/beast_core/streams/OutputStream.cpp>
#include <beast/module/core/streams/FileInputSource.cpp>
#include <beast/module/core/streams/InputStream.cpp>
#include <beast/module/core/streams/MemoryOutputStream.cpp>
#include <beast/module/core/streams/OutputStream.cpp>
#include <modules/beast_core/system/SystemStats.cpp>
#include <beast/module/core/system/SystemStats.cpp>
#include <modules/beast_core/text/LexicalCast.cpp>
#include <modules/beast_core/text/StringArray.cpp>
#include <modules/beast_core/text/StringPairArray.cpp>
#include <beast/module/core/text/LexicalCast.cpp>
#include <beast/module/core/text/StringArray.cpp>
#include <beast/module/core/text/StringPairArray.cpp>
#include <modules/beast_core/thread/DeadlineTimer.cpp>
#include <modules/beast_core/thread/Workers.cpp>
#include <beast/module/core/thread/DeadlineTimer.cpp>
#include <beast/module/core/thread/Workers.cpp>
#include <modules/beast_core/time/AtExitHook.cpp>
#include <modules/beast_core/time/Time.cpp>
#include <beast/module/core/time/AtExitHook.cpp>
#include <beast/module/core/time/Time.cpp>
#if BEAST_MAC || BEAST_IOS
#include <modules/beast_core/native/osx_ObjCHelpers.h>
#include <beast/module/core/native/osx_ObjCHelpers.h>
#endif
#if BEAST_ANDROID
@@ -172,31 +172,31 @@
#endif
#if ! BEAST_WINDOWS
#include <modules/beast_core/native/posix_SharedCode.h>
#include <beast/module/core/native/posix_SharedCode.h>
#endif
#if BEAST_MAC || BEAST_IOS
#include <modules/beast_core/native/mac_Files.mm>
#include <modules/beast_core/native/mac_Strings.mm>
#include <modules/beast_core/native/mac_SystemStats.mm>
#include <modules/beast_core/native/mac_Threads.mm>
#include <beast/module/core/native/mac_Files.mm>
#include <beast/module/core/native/mac_Strings.mm>
#include <beast/module/core/native/mac_SystemStats.mm>
#include <beast/module/core/native/mac_Threads.mm>
#elif BEAST_WINDOWS
#include <modules/beast_core/native/win32_ComSmartPtr.h>
#include <modules/beast_core/native/win32_Files.cpp>
#include <modules/beast_core/native/win32_Registry.cpp>
#include <modules/beast_core/native/win32_SystemStats.cpp>
#include <modules/beast_core/native/win32_Threads.cpp>
#include <beast/module/core/native/win32_ComSmartPtr.h>
#include <beast/module/core/native/win32_Files.cpp>
#include <beast/module/core/native/win32_Registry.cpp>
#include <beast/module/core/native/win32_SystemStats.cpp>
#include <beast/module/core/native/win32_Threads.cpp>
#elif BEAST_LINUX
#include <modules/beast_core/native/linux_Files.cpp>
#include <modules/beast_core/native/linux_SystemStats.cpp>
#include <modules/beast_core/native/linux_Threads.cpp>
#include <beast/module/core/native/linux_Files.cpp>
#include <beast/module/core/native/linux_SystemStats.cpp>
#include <beast/module/core/native/linux_Threads.cpp>
#elif BEAST_BSD
#include <modules/beast_core/native/bsd_Files.cpp>
#include <modules/beast_core/native/bsd_SystemStats.cpp>
#include <modules/beast_core/native/bsd_Threads.cpp>
#include <beast/module/core/native/bsd_Files.cpp>
#include <beast/module/core/native/bsd_SystemStats.cpp>
#include <beast/module/core/native/bsd_Threads.cpp>
#elif BEAST_ANDROID
#include "native/android_Files.cpp"
@@ -234,4 +234,4 @@ void beast_reportFatalError (char const* message, char const* fileName, int line
#endif
// Must be outside the namespace
#include <modules/beast_core/system/BoostPlaceholdersFix.cpp>
#include <beast/module/core/system/BoostPlaceholdersFix.cpp>

View File

@@ -24,12 +24,12 @@
#ifndef BEAST_FILE_H_INCLUDED
#define BEAST_FILE_H_INCLUDED
#include <modules/beast_core/containers/Array.h>
#include <modules/beast_core/memory/MemoryBlock.h>
#include <modules/beast_core/misc/Result.h>
#include <modules/beast_core/time/Time.h>
#include <modules/beast_core/text/StringArray.h>
#include <modules/beast_core/threads/CriticalSection.h>
#include <beast/module/core/containers/Array.h>
#include <beast/module/core/memory/MemoryBlock.h>
#include <beast/module/core/misc/Result.h>
#include <beast/module/core/time/Time.h>
#include <beast/module/core/text/StringArray.h>
#include <beast/module/core/threads/CriticalSection.h>
namespace beast {

Some files were not shown because too many files have changed in this diff Show More