diff --git a/sound/input.h b/sound/input.h index d27de97a6..f61a029ff 100644 --- a/sound/input.h +++ b/sound/input.h @@ -4,7 +4,7 @@ #include #include -#include "../stream/input.h" +#include "../stream/stream.h" namespace Mangle { namespace Sound { @@ -73,7 +73,7 @@ class InputManager virtual InputSource *load(const std::string &file) = 0; /// Load a sound input source from stream (if canLoadStream is true) - virtual InputSource *load(Stream::InputStream *input) = 0; + virtual InputSource *load(Stream::Stream *input) = 0; /// Virtual destructor virtual ~InputManager() {} diff --git a/sound/imp/.gitignore b/sound/servers/.gitignore similarity index 100% rename from sound/imp/.gitignore rename to sound/servers/.gitignore diff --git a/sound/imp/audiere_imp.cpp b/sound/servers/audiere_imp.cpp similarity index 100% rename from sound/imp/audiere_imp.cpp rename to sound/servers/audiere_imp.cpp diff --git a/sound/imp/audiere_imp.h b/sound/servers/audiere_imp.h similarity index 95% rename from sound/imp/audiere_imp.h rename to sound/servers/audiere_imp.h index 480611ce3..5ebb812bd 100644 --- a/sound/imp/audiere_imp.h +++ b/sound/servers/audiere_imp.h @@ -20,7 +20,7 @@ class AudiereManager : public Manager virtual Sound *load(const std::string &file, bool stream=false); /// not implemented yet - virtual Sound *load(Stream::InputStream *input, bool stream=false) + virtual Sound *load(Stream::Stream *input, bool stream=false) { assert(0); } /// disabled diff --git a/sound/imp/input_audiere.cpp b/sound/servers/input_audiere.cpp similarity index 94% rename from sound/imp/input_audiere.cpp rename to sound/servers/input_audiere.cpp index b7a38ffd1..c48f45013 100644 --- a/sound/imp/input_audiere.cpp +++ b/sound/servers/input_audiere.cpp @@ -1,7 +1,7 @@ #include "input_audiere.h" #include -#include "../../stream/imp_client/audiere_file.h" +#include "../../stream/clients/audiere_file.h" // Exception handling class Audiere_Exception : public std::exception @@ -33,7 +33,7 @@ AudiereInput::AudiereInput() InputSource *AudiereInput::load(const std::string &file) { return new AudiereSource(file); } -InputSource *AudiereInput::load(Stream::InputStream *input) +InputSource *AudiereInput::load(Stream::Stream *input) { return new AudiereSource(input); } // --- InputSource --- @@ -47,7 +47,7 @@ AudiereSource::AudiereSource(const std::string &file) buf = CreateSampleBuffer(sample); } -AudiereSource::AudiereSource(Stream::InputStream *input) +AudiereSource::AudiereSource(Stream::Stream *input) { SampleSourcePtr sample = OpenSampleSource (new Stream::AudiereFile(input)); diff --git a/sound/imp/input_audiere.h b/sound/servers/input_audiere.h similarity index 92% rename from sound/imp/input_audiere.h rename to sound/servers/input_audiere.h index 4bc42cbc6..e753b0174 100644 --- a/sound/imp/input_audiere.h +++ b/sound/servers/input_audiere.h @@ -18,7 +18,7 @@ class AudiereInput : public InputManager InputSource *load(const std::string &file); /// Load a source from a stream - virtual InputSource *load(Stream::InputStream *input); + virtual InputSource *load(Stream::Stream *input); }; /// Audiere InputSource implementation @@ -28,7 +28,7 @@ class AudiereSource : public InputSource public: AudiereSource(const std::string &file); - AudiereSource(Stream::InputStream *input); + AudiereSource(Stream::Stream *input); InputStream *getStream(); void drop() { delete this; } }; diff --git a/sound/imp/input_ffmpeg.cpp b/sound/servers/input_ffmpeg.cpp similarity index 100% rename from sound/imp/input_ffmpeg.cpp rename to sound/servers/input_ffmpeg.cpp diff --git a/sound/imp/input_ffmpeg.h b/sound/servers/input_ffmpeg.h similarity index 95% rename from sound/imp/input_ffmpeg.h rename to sound/servers/input_ffmpeg.h index ae25732b5..b744a7585 100644 --- a/sound/imp/input_ffmpeg.h +++ b/sound/servers/input_ffmpeg.h @@ -37,7 +37,7 @@ class FFM_InputManager : public InputManager virtual InputSource *load(const std::string &file); /// not supported - virtual InputSource *load(Stream::InputStream *input) { assert(0); } + virtual InputSource *load(Stream::Stream *input) { assert(0); } }; /// FFMpeg implementation of InputSource diff --git a/sound/imp/input_filter.h b/sound/servers/input_filter.h similarity index 96% rename from sound/imp/input_filter.h rename to sound/servers/input_filter.h index 4fcae320c..455a60e14 100644 --- a/sound/imp/input_filter.h +++ b/sound/servers/input_filter.h @@ -63,7 +63,7 @@ class InputFilter : public Manager virtual Sound *load(const std::string &file, bool stream=false) { return load(inp->load(file), stream); } - virtual Sound *load(Stream::InputStream *input, bool stream=false) + virtual Sound *load(Stream::Stream *input, bool stream=false) { return load(inp->load(input), stream); } virtual Sound *load(InputSource *input, bool stream=false) diff --git a/sound/imp/openal_audiere.h b/sound/servers/openal_audiere.h similarity index 100% rename from sound/imp/openal_audiere.h rename to sound/servers/openal_audiere.h diff --git a/sound/imp/openal_ffmpeg.h b/sound/servers/openal_ffmpeg.h similarity index 100% rename from sound/imp/openal_ffmpeg.h rename to sound/servers/openal_ffmpeg.h diff --git a/sound/imp/output_openal.cpp b/sound/servers/output_openal.cpp similarity index 99% rename from sound/imp/output_openal.cpp rename to sound/servers/output_openal.cpp index e36981836..06a8edca8 100644 --- a/sound/imp/output_openal.cpp +++ b/sound/servers/output_openal.cpp @@ -98,7 +98,7 @@ OpenAL_Manager::~OpenAL_Manager() Sound *OpenAL_Manager::load(const std::string &file, bool stream) { assert(0 && "OpenAL cannot decode files"); } -Sound *OpenAL_Manager::load(Stream::InputStream*,bool) +Sound *OpenAL_Manager::load(Stream::Stream*,bool) { assert(0 && "OpenAL cannot decode streams"); } Sound *OpenAL_Manager::load(InputSource *source, bool stream) diff --git a/sound/imp/output_openal.h b/sound/servers/output_openal.h similarity index 97% rename from sound/imp/output_openal.h rename to sound/servers/output_openal.h index bf92197df..53226c32f 100644 --- a/sound/imp/output_openal.h +++ b/sound/servers/output_openal.h @@ -26,7 +26,7 @@ public: void remove_stream(LST::iterator); virtual Sound *load(const std::string &file, bool stream=false); - virtual Sound *load(Stream::InputStream *input, bool stream=false); + virtual Sound *load(Stream::Stream *input, bool stream=false); virtual Sound *load(InputSource* input, bool stream=false); virtual void update(); virtual void setListenerPos(float x, float y, float z, diff --git a/sound/sound.h b/sound/sound.h index 90407141e..0a51e9f93 100644 --- a/sound/sound.h +++ b/sound/sound.h @@ -4,7 +4,7 @@ #include #include "input.h" -#include "../stream/input.h" +#include "../stream/stream.h" namespace Mangle { namespace Sound { @@ -145,7 +145,7 @@ class Manager @param stream true if the file should be streamed @see load(InputSource*,bool) */ - virtual Sound *load(Stream::InputStream *input, bool stream=false) = 0; + virtual Sound *load(Stream::Stream *input, bool stream=false) = 0; /** @brief Load a sound directly from file. Only valid if canLoadFile diff --git a/sound/tests/Makefile b/sound/tests/Makefile index 5d38b4d1d..8a9c74812 100644 --- a/sound/tests/Makefile +++ b/sound/tests/Makefile @@ -1,4 +1,4 @@ -GCC=g++ -I../ -I../imp/ +GCC=g++ -I../ all: audiere_test ffmpeg_openal_test openal_audiere_test @@ -6,13 +6,13 @@ L_FFMPEG=$(shell pkg-config --libs libavcodec libavformat) L_OPENAL=$(shell pkg-config --libs openal) L_AUDIERE=-laudiere -ffmpeg_openal_test: ffmpeg_openal_test.cpp ../imp/input_ffmpeg.cpp ../imp/output_openal.cpp +ffmpeg_openal_test: ffmpeg_openal_test.cpp ../servers/input_ffmpeg.cpp ../servers/output_openal.cpp $(GCC) $^ -o $@ $(L_FFMPEG) $(L_OPENAL) -openal_audiere_test: openal_audiere_test.cpp ../imp/input_audiere.cpp ../imp/output_openal.cpp ../../stream/imp_client/audiere_file.cpp +openal_audiere_test: openal_audiere_test.cpp ../servers/input_audiere.cpp ../servers/output_openal.cpp ../../stream/clients/audiere_file.cpp $(GCC) $^ -o $@ $(L_AUDIERE) $(L_OPENAL) -audiere_test: audiere_test.cpp ../imp/audiere_imp.cpp +audiere_test: audiere_test.cpp ../servers/audiere_imp.cpp $(GCC) $^ -o $@ $(L_AUDIERE) clean: diff --git a/sound/tests/common.cpp b/sound/tests/common.cpp index 28c470536..818d1645f 100644 --- a/sound/tests/common.cpp +++ b/sound/tests/common.cpp @@ -6,7 +6,7 @@ using namespace std; -class TestStream : public Mangle::Stream::InputStream +class TestStream : public Mangle::Stream::Stream { ifstream io; diff --git a/stream/imp_client/audiere_file.cpp b/stream/clients/audiere_file.cpp similarity index 100% rename from stream/imp_client/audiere_file.cpp rename to stream/clients/audiere_file.cpp diff --git a/stream/imp_client/audiere_file.h b/stream/clients/audiere_file.h similarity index 88% rename from stream/imp_client/audiere_file.h rename to stream/clients/audiere_file.h index a1910d274..87833e6b3 100644 --- a/stream/imp_client/audiere_file.h +++ b/stream/clients/audiere_file.h @@ -13,11 +13,11 @@ namespace Stream { This lets Audiere read sound files from any generic archive or file manager that supports Mangle streams. */ -class AudiereFile : public audiere::RefImplementation, _IWrapper +class AudiereFile : public audiere::RefImplementation, _SWrapper { public: - AudiereFile(InputStream *inp, bool autoDel=false) - : _IWrapper(inp, autoDel) {} + AudiereFile(Stream *inp, bool autoDel=false) + : _SWrapper(inp, autoDel) {} /// Read 'count' bytes, return bytes successfully read int read(void *buf, int count) diff --git a/stream/imp_client/iwrapper.h b/stream/clients/iwrapper.h similarity index 58% rename from stream/imp_client/iwrapper.h rename to stream/clients/iwrapper.h index ba2d1fb1f..cc12d5b7e 100644 --- a/stream/imp_client/iwrapper.h +++ b/stream/clients/iwrapper.h @@ -1,29 +1,29 @@ #ifndef MANGLE_STREAM_IWRAPPER_H #define MANGLE_STREAM_IWRAPPER_H -#include "../input.h" +#include "../stream.h" #include namespace Mangle { namespace Stream { -/** A generic wrapper class for a Stream::Input object. +/** A generic wrapper class for a Stream::Stream object. This is used by other implementations. */ -class _IWrapper +class _SWrapper { private: bool autoDel; protected: - InputStream *inp; + Stream *inp; public: - _IWrapper(InputStream *_inp, bool _autoDel = false) + _SWrapper(Stream *_inp, bool _autoDel = false) : inp(_inp), autoDel(_autoDel) { assert(inp != NULL); } - virtual ~_IWrapper() { if(autoDel) delete inp; } + virtual ~_SWrapper() { if(autoDel) delete inp; } }; }} // namespaces diff --git a/stream/imp_client/ogre_datastream.h b/stream/clients/ogre_datastream.h similarity index 78% rename from stream/imp_client/ogre_datastream.h rename to stream/clients/ogre_datastream.h index 63ca66e20..6d0979930 100644 --- a/stream/imp_client/ogre_datastream.h +++ b/stream/clients/ogre_datastream.h @@ -14,7 +14,7 @@ namespace Stream { to make your own modifications if you're working with newer (or older) versions. */ -class MangleDataStream : public Ogre::DataStream, _IWrapper +class MangleDataStream : public Ogre::DataStream, _SWrapper { void init() { @@ -25,12 +25,12 @@ class MangleDataStream : public Ogre::DataStream, _IWrapper public: /// Constructor without name - MangleDataStream(InputStream *inp, bool autoDel=false) - : _IWrapper(inp, autoDel) { init(); } + MangleDataStream(Stream *inp, bool autoDel=false) + : _SWrapper(inp, autoDel) { init(); } /// Constructor for a named data stream - MangleDataStream(const Ogre::String &name, InputStream *inp, bool autoDel=false) - : _IWrapper(inp, autoDel), Ogre::DataStream(name) { init(); } + MangleDataStream(const Ogre::String &name, Stream *inp, bool autoDel=false) + : _SWrapper(inp, autoDel), Ogre::DataStream(name) { init(); } // Only implement the DataStream functions we have to implement diff --git a/stream/imp_server/ogre_datastream.h b/stream/servers/ogre_datastream.h similarity index 95% rename from stream/imp_server/ogre_datastream.h rename to stream/servers/ogre_datastream.h index ef922fa7f..184fa1668 100644 --- a/stream/imp_server/ogre_datastream.h +++ b/stream/servers/ogre_datastream.h @@ -12,7 +12,7 @@ namespace Stream { to make your own modifications if you're working with newer (or older) versions. */ -class OgreStream : public InputStream +class OgreStream : public Stream { Ogre::DataStreamPtr inp; diff --git a/stream/imp_server/phys_stream.h b/stream/servers/phys_stream.h similarity index 95% rename from stream/imp_server/phys_stream.h rename to stream/servers/phys_stream.h index 956619436..3660391fd 100644 --- a/stream/imp_server/phys_stream.h +++ b/stream/servers/phys_stream.h @@ -7,7 +7,7 @@ namespace Mangle { namespace Stream { /// A Stream wrapping a PHYSFS_file stream from the PhysFS library. -class PhysFile : public InputStream +class PhysFile : public Stream { PHYSFS_file *file; diff --git a/stream/input.h b/stream/stream.h similarity index 96% rename from stream/input.h rename to stream/stream.h index 0a178d8fc..7116b8e2a 100644 --- a/stream/input.h +++ b/stream/stream.h @@ -7,7 +7,7 @@ namespace Mangle { namespace Stream { /// An abstract interface for a stream data. -class InputStream +class Stream { public: // Feature options. These should be set in the constructor. @@ -22,7 +22,7 @@ class InputStream bool hasSize; /// Virtual destructor - virtual ~InputStream() {} + virtual ~Stream() {} /** Read a given number of bytes from the stream. Returns the actual number read. If the return value is less than count, then the diff --git a/stream/tests/Makefile b/stream/tests/Makefile index 3d2a730b8..84ec228cf 100644 --- a/stream/tests/Makefile +++ b/stream/tests/Makefile @@ -1,4 +1,4 @@ -GCC=g++ -I../ -I../imp_client/ +GCC=g++ -I../ all: ogre_client_test dummy_test audiere_client_test @@ -6,13 +6,13 @@ I_OGRE=$(shell pkg-config --cflags OGRE) L_OGRE=$(shell pkg-config --libs OGRE) L_AUDIERE=-laudiere -ogre_client_test: ogre_client_test.cpp dummy_input.cpp ../input.h ../imp_client/iwrapper.h ../imp_client/ogre_datastream.h +ogre_client_test: ogre_client_test.cpp dummy_input.cpp ../stream.h ../clients/iwrapper.h ../clients/ogre_datastream.h $(GCC) $< -o $@ $(I_OGRE) $(L_OGRE) -audiere_client_test: audiere_client_test.cpp dummy_input.cpp ../input.h ../imp_client/iwrapper.h ../imp_client/audiere_file.h ../imp_client/audiere_file.cpp - $(GCC) $< -o $@ ../imp_client/audiere_file.cpp $(L_AUDIERE) +audiere_client_test: audiere_client_test.cpp dummy_input.cpp ../stream.h ../clients/iwrapper.h ../clients/audiere_file.h ../clients/audiere_file.cpp + $(GCC) $< -o $@ ../clients/audiere_file.cpp $(L_AUDIERE) -dummy_test: dummy_test.cpp dummy_input.cpp ../input.h +dummy_test: dummy_test.cpp dummy_input.cpp ../stream.h $(GCC) $< -o $@ clean: diff --git a/stream/tests/audiere_client_test.cpp b/stream/tests/audiere_client_test.cpp index 7a5b5afc2..f64de0649 100644 --- a/stream/tests/audiere_client_test.cpp +++ b/stream/tests/audiere_client_test.cpp @@ -1,5 +1,5 @@ #include "dummy_input.cpp" -#include "../imp_client/audiere_file.h" +#include "../clients/audiere_file.h" #include #include @@ -10,7 +10,7 @@ int main() { char str[12]; memset(str, 0, 12); - InputStream *inp = new DummyInput(); + Stream *inp = new DummyInput(); FilePtr p(new AudiereFile(inp, true)); cout << "pos=" << p->tell() << endl; p->read(str, 2); diff --git a/stream/tests/dummy_input.cpp b/stream/tests/dummy_input.cpp index 0bfe5ad52..c93f42160 100644 --- a/stream/tests/dummy_input.cpp +++ b/stream/tests/dummy_input.cpp @@ -1,5 +1,5 @@ // This file is shared between several test programs -#include "../input.h" +#include "../stream.h" #include #include @@ -8,7 +8,7 @@ using namespace Mangle::Stream; // A simple dummy stream const char _data[12] = "hello world"; -class DummyInput : public InputStream +class DummyInput : public Stream { private: int pos; diff --git a/stream/tests/dummy_test.cpp b/stream/tests/dummy_test.cpp index 64dd8f19b..cd8f64e3c 100644 --- a/stream/tests/dummy_test.cpp +++ b/stream/tests/dummy_test.cpp @@ -7,7 +7,7 @@ using namespace std; int main() { - InputStream *inp = new DummyInput(); + Stream *inp = new DummyInput(); cout << "Size: " << inp->size() << endl; cout << "Pos: " << inp->tell() << "\nSeeking...\n"; diff --git a/stream/tests/ogre_client_test.cpp b/stream/tests/ogre_client_test.cpp index b6a46ad3b..a2bae1c8e 100644 --- a/stream/tests/ogre_client_test.cpp +++ b/stream/tests/ogre_client_test.cpp @@ -7,7 +7,7 @@ using namespace std; int main() { - InputStream *inp = new DummyInput(); + Stream *inp = new DummyInput(); DataStreamPtr p(new MangleDataStream("hello", inp, true)); cout << "Name: " << p->getName() << endl; cout << "As string: " << p->getAsString() << endl; diff --git a/tests/Makefile b/tests/Makefile index 6aeaa5eb5..ed680f3db 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,7 +7,7 @@ L_OGRE=$(shell pkg-config --libs OGRE) L_OPENAL=$(shell pkg-config --libs openal) L_AUDIERE=-laudiere -ogrevfs_audiere_openal_test: ogrevfs_audiere_openal_test.cpp ../vfs/imp_server/ogre_vfs.cpp ../sound/imp/input_audiere.cpp ../sound/imp/output_openal.cpp ../stream/imp_client/audiere_file.cpp +ogrevfs_audiere_openal_test: ogrevfs_audiere_openal_test.cpp ../vfs/servers/ogre_vfs.cpp ../sound/servers/input_audiere.cpp ../sound/servers/output_openal.cpp ../stream/clients/audiere_file.cpp $(GCC) $^ -o $@ $(I_OGRE) $(L_OGRE) $(L_OPENAL) $(L_AUDIERE) clean: diff --git a/tests/ogrevfs_audiere_openal_test.cpp b/tests/ogrevfs_audiere_openal_test.cpp index 7bc6131da..810fd635e 100644 --- a/tests/ogrevfs_audiere_openal_test.cpp +++ b/tests/ogrevfs_audiere_openal_test.cpp @@ -7,8 +7,8 @@ */ -#include "sound/imp/openal_audiere.h" -#include "vfs/imp_server/ogre_vfs.h" +#include "sound/servers/openal_audiere.h" +#include "vfs/servers/ogre_vfs.h" #include #include diff --git a/vfs/imp_client/ogre_archive.cpp b/vfs/clients/ogre_archive.cpp similarity index 97% rename from vfs/imp_client/ogre_archive.cpp rename to vfs/clients/ogre_archive.cpp index d7adaa07d..936eda9b6 100644 --- a/vfs/imp_client/ogre_archive.cpp +++ b/vfs/clients/ogre_archive.cpp @@ -1,6 +1,6 @@ #include "ogre_archive.h" -#include "../../stream/imp_client/ogre_datastream.h" +#include "../../stream/clients/ogre_datastream.h" using namespace Mangle::VFS; using namespace Mangle::Stream; diff --git a/vfs/imp_client/ogre_archive.h b/vfs/clients/ogre_archive.h similarity index 100% rename from vfs/imp_client/ogre_archive.h rename to vfs/clients/ogre_archive.h diff --git a/vfs/imp_client/wrapper.h b/vfs/clients/wrapper.h similarity index 100% rename from vfs/imp_client/wrapper.h rename to vfs/clients/wrapper.h diff --git a/vfs/imp_server/ogre_vfs.cpp b/vfs/servers/ogre_vfs.cpp similarity index 91% rename from vfs/imp_server/ogre_vfs.cpp rename to vfs/servers/ogre_vfs.cpp index 9ca1c4b8c..af1f7c963 100644 --- a/vfs/imp_server/ogre_vfs.cpp +++ b/vfs/servers/ogre_vfs.cpp @@ -1,5 +1,5 @@ #include "ogre_vfs.h" -#include "../../stream/imp_server/ogre_datastream.h" +#include "../../stream/servers/ogre_datastream.h" using namespace Mangle::VFS; @@ -18,7 +18,7 @@ OgreVFS::OgreVFS(const std::string &_group) group = gm->getWorldResourceGroupName(); } -Mangle::Stream::InputStream *OgreVFS::open(const std::string &name) +Mangle::Stream::Stream *OgreVFS::open(const std::string &name) { Ogre::DataStreamPtr data = gm->openResource(name, group); return new Stream::OgreStream(data); diff --git a/vfs/imp_server/ogre_vfs.h b/vfs/servers/ogre_vfs.h similarity index 97% rename from vfs/imp_server/ogre_vfs.h rename to vfs/servers/ogre_vfs.h index 9a01c1786..8fe2cca1c 100644 --- a/vfs/imp_server/ogre_vfs.h +++ b/vfs/servers/ogre_vfs.h @@ -36,7 +36,7 @@ class OgreVFS : public VFS /// Open a new data stream. Deleting the object should be enough to /// close it. - virtual Stream::InputStream *open(const std::string &name); + virtual Stream::Stream *open(const std::string &name); /// Check for the existence of a file virtual bool isFile(const std::string &name) const diff --git a/vfs/imp_server/physfs_vfs.h b/vfs/servers/physfs_vfs.h similarity index 93% rename from vfs/imp_server/physfs_vfs.h rename to vfs/servers/physfs_vfs.h index ace3d84c9..c25a0035c 100644 --- a/vfs/imp_server/physfs_vfs.h +++ b/vfs/servers/physfs_vfs.h @@ -2,7 +2,7 @@ #define MANGLE_VFS_PHYSFS_SERVER_H #include "../vfs.h" -#include "../../stream/imp_server/phys_stream.h" +#include "../../stream/servers/phys_stream.h" #include #include @@ -26,7 +26,7 @@ class PhysVFS : public VFS /// Open a new data stream. Deleting the object should be enough to /// close it. - virtual Stream::InputStream *open(const std::string &name) + virtual Stream::Stream *open(const std::string &name) { return new Stream::PhysFile(PHYSFS_openRead(name.c_str())); } /// Check for the existence of a file diff --git a/vfs/tests/Makefile b/vfs/tests/Makefile index 2cf722550..4595c82ea 100644 --- a/vfs/tests/Makefile +++ b/vfs/tests/Makefile @@ -6,16 +6,16 @@ I_OGRE=$(shell pkg-config --cflags OGRE) L_OGRE=$(shell pkg-config --libs OGRE) L_PHYSFS=-lphysfs -ogre_client_test: ogre_client_test.cpp dummy_vfs.cpp ../vfs.h ../imp_client/wrapper.h ../imp_client/ogre_archive.h ../imp_client/ogre_archive.cpp - $(GCC) $< ../imp_client/ogre_archive.cpp -o $@ $(I_OGRE) $(L_OGRE) +ogre_client_test: ogre_client_test.cpp dummy_vfs.cpp ../vfs.h ../clients/wrapper.h ../clients/ogre_archive.h ../clients/ogre_archive.cpp + $(GCC) $< ../clients/ogre_archive.cpp -o $@ $(I_OGRE) $(L_OGRE) ogre_resource_test: ogre_resource_test.cpp $(GCC) $< -o $@ $(I_OGRE) $(L_OGRE) -ogre_server_test: ogre_server_test.cpp ../vfs.h ../imp_server/ogre_vfs.h ../imp_server/ogre_vfs.cpp - $(GCC) $< -o $@ $(I_OGRE) $(L_OGRE) ../imp_server/ogre_vfs.cpp +ogre_server_test: ogre_server_test.cpp ../vfs.h ../servers/ogre_vfs.h ../servers/ogre_vfs.cpp + $(GCC) $< -o $@ $(I_OGRE) $(L_OGRE) ../servers/ogre_vfs.cpp -physfs_server_test: physfs_server_test.cpp ../vfs.h ../imp_server/physfs_vfs.h +physfs_server_test: physfs_server_test.cpp ../vfs.h ../servers/physfs_vfs.h $(GCC) $< -o $@ $(L_PHYSFS) dummy_test: dummy_test.cpp dummy_vfs.cpp ../vfs.h diff --git a/vfs/tests/dummy_test.cpp b/vfs/tests/dummy_test.cpp index e5659d62f..b65f38335 100644 --- a/vfs/tests/dummy_test.cpp +++ b/vfs/tests/dummy_test.cpp @@ -33,7 +33,7 @@ int main() cout << endl; print(vfs.stat("dir")); - InputStream *inp = vfs.open("file1"); + Stream *inp = vfs.open("file1"); cout << "filesize: " << inp->size() << endl; return 0; diff --git a/vfs/tests/dummy_vfs.cpp b/vfs/tests/dummy_vfs.cpp index d8b259f28..e7c77a753 100644 --- a/vfs/tests/dummy_vfs.cpp +++ b/vfs/tests/dummy_vfs.cpp @@ -17,7 +17,7 @@ public: } // We only support opening 'file1' at the moment. - Mangle::Stream::InputStream *open(const std::string &name) + Mangle::Stream::Stream *open(const std::string &name) { assert(name == "file1"); return new DummyInput(); diff --git a/vfs/tests/ogre_client_test.cpp b/vfs/tests/ogre_client_test.cpp index a236c28f0..d38add4da 100644 --- a/vfs/tests/ogre_client_test.cpp +++ b/vfs/tests/ogre_client_test.cpp @@ -1,5 +1,5 @@ #include "dummy_vfs.cpp" -#include "../imp_client/ogre_archive.h" +#include "../clients/ogre_archive.h" #include using namespace Ogre; diff --git a/vfs/tests/ogre_server_test.cpp b/vfs/tests/ogre_server_test.cpp index 3e0fcbef4..cb4624894 100644 --- a/vfs/tests/ogre_server_test.cpp +++ b/vfs/tests/ogre_server_test.cpp @@ -1,4 +1,4 @@ -#include "../imp_server/ogre_vfs.h" +#include "../servers/ogre_vfs.h" #include diff --git a/vfs/tests/physfs_server_test.cpp b/vfs/tests/physfs_server_test.cpp index 282566dd1..ae42083fd 100644 --- a/vfs/tests/physfs_server_test.cpp +++ b/vfs/tests/physfs_server_test.cpp @@ -1,4 +1,4 @@ -#include "../imp_server/physfs_vfs.h" +#include "../servers/physfs_vfs.h" #include "server_common.cpp" diff --git a/vfs/tests/server_common.cpp b/vfs/tests/server_common.cpp index ddb85b0c3..ff16ac7f2 100644 --- a/vfs/tests/server_common.cpp +++ b/vfs/tests/server_common.cpp @@ -14,7 +14,7 @@ void find(VFS &vfs, const std::string &file) return; } - InputStream *data = vfs.open(file); + Stream *data = vfs.open(file); cout << "Size: " << data->size() << endl; diff --git a/vfs/vfs.h b/vfs/vfs.h index a9ffb6b62..4054c6069 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -1,7 +1,7 @@ #ifndef MANGLE_VFS_H #define MANGLE_VFS_H -#include "../stream/input.h" +#include "../stream/stream.h" #include #include @@ -51,7 +51,7 @@ class VFS /// Open a new data stream. Deleting the object should be enough to /// close it. - virtual Stream::InputStream *open(const std::string &name) = 0; + virtual Stream::Stream *open(const std::string &name) = 0; /// Check for the existence of a file virtual bool isFile(const std::string &name) const = 0;