diff --git a/builtin/client_data/client_data.cpp b/builtin/client_data/client_data.cpp index 486f515..eb415f8 100644 --- a/builtin/client_data/client_data.cpp +++ b/builtin/client_data/client_data.cpp @@ -3,8 +3,8 @@ #include "interface/server.h" #include "interface/event.h" #include "interface/fs.h" -#include "client_file/include/api.h" -#include "network/include/api.h" +#include "client_file/api.h" +#include "network/api.h" #include #include #include diff --git a/builtin/client_file/include/api.h b/builtin/client_file/api.h similarity index 94% rename from builtin/client_file/include/api.h rename to builtin/client_file/api.h index a42843a..b823c2f 100644 --- a/builtin/client_file/include/api.h +++ b/builtin/client_file/api.h @@ -1,6 +1,6 @@ #pragma once #include "interface/event.h" -#include "network/include/api.h" +#include "network/api.h" namespace client_file { diff --git a/builtin/client_file/client_file.cpp b/builtin/client_file/client_file.cpp index b7d6b30..00634ac 100644 --- a/builtin/client_file/client_file.cpp +++ b/builtin/client_file/client_file.cpp @@ -3,8 +3,8 @@ #include "interface/server.h" #include "interface/event.h" #include "interface/sha1.h" -#include "client_file/include/api.h" -#include "network/include/api.h" +#include "client_file/api.h" +#include "network/api.h" #include #include #include diff --git a/builtin/client_lua/client_lua.cpp b/builtin/client_lua/client_lua.cpp index a39b134..0144be5 100644 --- a/builtin/client_lua/client_lua.cpp +++ b/builtin/client_lua/client_lua.cpp @@ -3,8 +3,8 @@ #include "interface/server.h" #include "interface/event.h" #include "interface/fs.h" -#include "client_file/include/api.h" -#include "network/include/api.h" +#include "client_file/api.h" +#include "network/api.h" #include #include #include diff --git a/builtin/network/include/api.h b/builtin/network/api.h similarity index 100% rename from builtin/network/include/api.h rename to builtin/network/api.h diff --git a/builtin/network/network.cpp b/builtin/network/network.cpp index b592c81..79eff8b 100644 --- a/builtin/network/network.cpp +++ b/builtin/network/network.cpp @@ -3,7 +3,7 @@ #include "interface/event.h" #include "interface/tcpsocket.h" #include "interface/packet_stream.h" -#include "network/include/api.h" +#include "network/api.h" #include "core/log.h" //#include //#include diff --git a/design.txt b/design.txt index 11cd055..0dfc712 100644 --- a/design.txt +++ b/design.txt @@ -23,8 +23,7 @@ Module structure module |-- deps.txt << Module and extension dependencies |-- .cpp << Server-side code -|-- include -| `-- api.h << Structures for interfacing between modules +|-- api.h << Structures for interfacing between modules |-- client_lua | `-- init.lua << Client-side code (by convention) `-- client_data diff --git a/test/testmodules/test1/include/api.h b/test/testmodules/test1/api.h similarity index 100% rename from test/testmodules/test1/include/api.h rename to test/testmodules/test1/api.h diff --git a/test/testmodules/test1/test1.cpp b/test/testmodules/test1/test1.cpp index 4f6ac3a..343b6a7 100644 --- a/test/testmodules/test1/test1.cpp +++ b/test/testmodules/test1/test1.cpp @@ -1,10 +1,10 @@ #include "interface/module.h" #include "interface/server.h" #include "interface/event.h" -#include "test1/include/api.h" -//#include "client_lua/include/api.h" -#include "client_file/include/api.h" -#include "network/include/api.h" +#include "test1/api.h" +//#include "client_lua/api.h" +#include "client_file/api.h" +#include "network/api.h" #include "core/log.h" using interface::Event; diff --git a/test/testmodules/test2/test2.cpp b/test/testmodules/test2/test2.cpp index 6473396..7e2709a 100644 --- a/test/testmodules/test2/test2.cpp +++ b/test/testmodules/test2/test2.cpp @@ -1,7 +1,7 @@ #include "interface/module.h" #include "interface/server.h" #include "interface/event.h" -#include "test1/include/api.h" +#include "test1/api.h" #include "core/log.h" using interface::Event; diff --git a/todo.txt b/todo.txt index 35f33f0..c9a5fc9 100644 --- a/todo.txt +++ b/todo.txt @@ -9,7 +9,6 @@ Buildat TODO - Modules should be run in threads. - Network should leave socket fds in m_server when destructing, and pick them up on core:continue. -- Move module/include/api.h to module/api.h - Implement file modification tracking in client_lua or client_file, or somehow otherwise make newly connected clients get new file contents diff --git a/util/codestyle.sh b/util/codestyle.sh index 965ab9a..27b4c2b 100755 --- a/util/codestyle.sh +++ b/util/codestyle.sh @@ -5,7 +5,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" header_files="$script_dir"/../src/*/*.h cpp_files="$script_dir"/../src/*/*.cpp -header_files+=" ""$script_dir"/../test/testmodules/*/*/*.h +header_files+=" ""$script_dir"/../test/testmodules/*/*.h cpp_files+=" ""$script_dir"/../test/testmodules/*/*.cpp header_files+=" "$(find "$script_dir"/../builtin -name '*.h')