[Scummvm-cvs-logs] SF.net SVN: scummvm: [28649] scummvm/branches/gsoc2007-fsnode

david_corrales at users.sourceforge.net david_corrales at users.sourceforge.net
Sat Aug 18 07:24:18 CEST 2007


Revision: 28649
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28649&view=rev
Author:   david_corrales
Date:     2007-08-17 22:24:18 -0700 (Fri, 17 Aug 2007)

Log Message:
-----------
Merged some of the changes from the trunk patch back in to the GSoC fsnode branch.

Modified Paths:
--------------
    scummvm/branches/gsoc2007-fsnode/backends/factories/abstract-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/gp32/gp32-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/palmos/palmos-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.cpp
    scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.h
    scummvm/branches/gsoc2007-fsnode/backends/file/base-file.cpp
    scummvm/branches/gsoc2007-fsnode/backends/file/base-file.h
    scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.cpp
    scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.h
    scummvm/branches/gsoc2007-fsnode/backends/fs/abstract-fs.h
    scummvm/branches/gsoc2007-fsnode/backends/fs/dc/dc-fs.cpp
    scummvm/branches/gsoc2007-fsnode/backends/fs/posix/posix-fs.cpp
    scummvm/branches/gsoc2007-fsnode/common/file.cpp
    scummvm/branches/gsoc2007-fsnode/common/file.h
    scummvm/branches/gsoc2007-fsnode/common/fs.cpp
    scummvm/branches/gsoc2007-fsnode/common/fs.h

Added Paths:
-----------
    scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.h

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/abstract-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/abstract-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/abstract-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef ABSTRACT_FILESYSTEM_FACTORY_H
 #define ABSTRACT_FILESYSTEM_FACTORY_H
 
@@ -50,7 +74,7 @@
 	 * Creates a base file usable by the Common::File wrapper to implement several
 	 * methods.
 	 */
-	virtual BaseFile *makeBaseFile() const = 0;
+	virtual Common::BaseFile *makeBaseFile() const = 0;
 };
 
 #endif /*ABSTRACT_FILESYSTEM_FACTORY_H*/

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/amigaos4/amigaos4-fs-factory.h"
 #include "backends/fs/amigaos4/amigaos4-fs.cpp"
 #include "backends/file/amigaos4/amigaos4-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/amigaos4/amigaos4-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef AMIGAOS_FILESYSTEM_FACTORY_H
 #define AMIGAOS_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/dc/ronincd-fs-factory.h"
 #include "backends/fs/dc/dc-fs.cpp"
 #include "backends/file/base-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/dc/ronincd-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef RONINCD_FILESYSTEM_FACTORY_H
 #define RONINCD_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/ds/ds-fs-factory.h"
 #include "backends/fs/ds/ds-fs.cpp"
 #include "backends/file/ds/ds-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/ds/ds-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef DS_FILESYSTEM_FACTORY_H
 #define DS_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,113 +1,51 @@
-#include "backends/factories/abstract-fs-factory.h"
-
-/*
- * All the following includes choose, at compile time, which specific backend will be used
- * during the execution of the ScummVM.
- * 
- * It has to be done this way because not all the necessary libraries will be available in
- * all build environments. Additionally, this results in smaller binaries.
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
  */
-#if defined(__amigaos4__)
-	#include "backends/factories/amigaos4/amigaos4-fs-factory.cpp"
-#endif
- 
-#if defined(__DC__)
-	#include "backends/factories/dc/ronincd-fs-factory.cpp"
-#endif
 
-#if defined(__DS__)
-	#include "backends/factories/ds/ds-fs-factory.cpp"
-#endif
+#include "backends/factories/fs-factory-maker.h"
 
-#if defined(__GP32__)
-	#include "backends/factories/gp32/gp32-fs-factory.cpp"
-#endif
-
-#if defined(__MORPHOS__)
-	#include "backends/factories/morphos/abox-fs-factory.cpp"
-#endif
-
-#if defined(PALMOS_MODE)
-	#include "backends/factories/palmos/palmos-fs-factory.cpp"
-#endif
-
-#if defined(__PLAYSTATION2__)
-	#include "backends/factories/ps2/ps2-fs-factory.cpp"
-#endif
-
-#if defined(__PSP__)
-	#include "backends/factories/psp/psp-fs-factory.cpp"
-#endif
-
-#if defined(__SYMBIAN32__)
-	#include "backends/factories/symbian/symbian-fs-factory.cpp"
-#endif
-
-#if defined(UNIX)
-	#include "backends/factories/posix/posix-fs-factory.cpp"
-#endif
-
-#if defined(WIN32)
-	#include "backends/factories/windows/windows-fs-factory.cpp"
-#endif
-
-/**
- * Creates concrete FilesystemFactory and FileFactory objects depending on the current architecture.
- */
-class FilesystemFactoryMaker {
-public:
-
-	/**
-	 * Returns the correct concrete filesystem factory depending on the current build architecture.
-	 */
-	static AbstractFilesystemFactory *makeFactory();
-	
-protected:
-	FilesystemFactoryMaker() {}; // avoid instances of this class
-};
-
 AbstractFilesystemFactory *FilesystemFactoryMaker::makeFactory(){
 	#if defined(__amigaos4__)
 		return &AmigaOSFilesystemFactory::instance();
-	#endif
-	
-	#if defined(__DC__)
+	#elif defined(__DC__)
 		return &RoninCDFilesystemFactory::instance();
-	#endif
-	
-	#if defined(__DS__)
+	#elif defined(__DS__)
 		return &DSFilesystemFactory::instance();
-	#endif
-	
-	#if defined(__GP32__)
+	#elif defined(__GP32__)
 		return &GP32FilesystemFactory::instance();
-	#endif
-	
-	#if defined(__MORPHOS__)
+	#elif defined(__MORPHOS__)
 		return &ABoxFilesystemFactory::instance();
-	#endif
-	
-	#if defined(PALMOS_MODE)
+	#elif defined(PALMOS_MODE)
 		return &PalmOSFilesystemFactory::instance();
-	#endif
-	
-	#if defined(__PLAYSTATION2__)
+	#elif defined(__PLAYSTATION2__)
 		return &Ps2FilesystemFactory::instance();
-	#endif
-	
-	#if defined(__PSP__)
+	#elif defined(__PSP__)
 		return &PSPFilesystemFactory::instance();
-	#endif
-	
-	#if defined(__SYMBIAN32__)
+	#elif defined(__SYMBIAN32__)
 		return &SymbianFilesystemFactory::instance();
-	#endif
-	
-	#if defined(UNIX)
+	#elif defined(UNIX)
 		return &POSIXFilesystemFactory::instance();
-	#endif
-	
-	#if defined(WIN32)
+	#elif defined(WIN32)
 		return &WindowsFilesystemFactory::instance();
 	#endif
 }

Added: scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.h	                        (rev 0)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -0,0 +1,76 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
+#ifndef FS_FACTORY_MAKER_H
+#define FS_FACTORY_MAKER_H
+
+#include "backends/factories/abstract-fs-factory.h"
+
+/*
+ * All the following includes choose, at compile time, which specific backend will be used
+ * during the execution of the ScummVM.
+ * 
+ * It has to be done this way because not all the necessary libraries will be available in
+ * all build environments. Additionally, this results in smaller binaries.
+ */
+#if defined(__amigaos4__)
+	#include "backends/factories/amigaos4/amigaos4-fs-factory.cpp"
+#elif defined(__DC__)
+	#include "backends/factories/dc/ronincd-fs-factory.cpp"
+#elif defined(__DS__)
+	#include "backends/factories/ds/ds-fs-factory.cpp"
+#elif defined(__GP32__)
+	#include "backends/factories/gp32/gp32-fs-factory.cpp"
+#elif defined(__MORPHOS__)
+	#include "backends/factories/morphos/abox-fs-factory.cpp"
+#elif defined(PALMOS_MODE)
+	#include "backends/factories/palmos/palmos-fs-factory.cpp"
+#elif defined(__PLAYSTATION2__)
+	#include "backends/factories/ps2/ps2-fs-factory.cpp"
+#elif defined(__PSP__)
+	#include "backends/factories/psp/psp-fs-factory.cpp"
+#elif defined(__SYMBIAN32__)
+	#include "backends/factories/symbian/symbian-fs-factory.cpp"
+#elif defined(UNIX)
+	#include "backends/factories/posix/posix-fs-factory.cpp"
+#elif defined(WIN32)
+	#include "backends/factories/windows/windows-fs-factory.cpp"
+#endif
+
+/**
+ * Creates concrete FilesystemFactory and FileFactory objects depending on the current architecture.
+ */
+class FilesystemFactoryMaker {
+public:
+
+	/**
+	 * Returns the correct concrete filesystem factory depending on the current build architecture.
+	 */
+	static AbstractFilesystemFactory *makeFactory();
+	
+protected:
+	FilesystemFactoryMaker() {}; // avoid instances of this class
+};
+
+#endif	//FS_FACTORY_MAKER_H


Property changes on: scummvm/branches/gsoc2007-fsnode/backends/factories/fs-factory-maker.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/gp32/gp32-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/gp32/gp32-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/gp32/gp32-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/gp32/gp32-fs-factory.h"
 #include "backends/fs/gp32/gp32-fs.cpp"
 #include "backends/file/base-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/morphos/abox-fs-factory.h"
 #include "backends/fs/morphos/abox-fs.cpp"
 #include "backends/file/base-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/morphos/abox-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef ABOX_FILESYSTEM_FACTORY_H
 #define ABOX_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/palmos/palmos-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/palmos/palmos-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/palmos/palmos-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/palmos/palmos-fs-factory.h"
 #include "backends/fs/palmos/palmos-fs.cpp"
 #include "backends/file/base-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/posix/posix-fs-factory.h"
 #include "backends/fs/posix/posix-fs.cpp"
 #include "backends/file/posix/posix-file.cpp"
@@ -19,6 +43,6 @@
 	return new POSIXFilesystemNode(path, true);
 }
 
-BaseFile *POSIXFilesystemFactory::makeBaseFile() const {
-	return new POSIXFile();
+Common::BaseFile *POSIXFilesystemFactory::makeBaseFile() const {
+	return new Common::POSIXFile();
 }

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/posix/posix-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -16,7 +16,7 @@
 	virtual AbstractFilesystemNode *makeRootFileNode() const;
 	virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
 	virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-	virtual BaseFile *makeBaseFile() const;
+	virtual Common::BaseFile *makeBaseFile() const;
 	
 protected:
 	POSIXFilesystemFactory() {};

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/ps2/ps2-fs-factory.h"
 #include "backends/fs/ps2/ps2-fs.cpp"
 #include "backends/file/ps2/ps2-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/ps2/ps2-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef PS2_FILESYSTEM_FACTORY_H
 #define PS2_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/psp/psp-fs-factory.h"
 #include "backends/fs/psp/psp_fs.cpp"
 #include "backends/file/base-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/psp/psp-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef PSP_FILESYSTEM_FACTORY_H
 #define PSP_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/symbian/symbian-fs-factory.h"
 #include "backends/fs/symbian/symbian-fs.cpp"
 #include "backends/file/symbian/symbian-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/symbian/symbian-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef SYMBIAN_FILESYSTEM_FACTORY_H
 #define SYMBIAN_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #include "backends/factories/windows/windows-fs-factory.h"
 #include "backends/fs/windows/windows-fs.cpp"
 #include "backends/file/base-file.h"

Modified: scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/factories/windows/windows-fs-factory.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,3 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL:  $
+ * $Id:  $
+ */
+
 #ifndef WINDOWS_FILESYSTEM_FACTORY_H
 #define WINDOWS_FILESYSTEM_FACTORY_H
 

Modified: scummvm/branches/gsoc2007-fsnode/backends/file/base-file.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/file/base-file.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/file/base-file.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -37,6 +37,8 @@
 #include "CoreFoundation/CoreFoundation.h"
 #endif
 
+namespace Common {
+
 BaseFile::BaseFile() {
 	_handle = 0;
 	_ioFailed = false;
@@ -224,3 +226,5 @@
 int BaseFile::_fwrite(const void * ptr, size_t obj_size, size_t count, FILE * stream) {
 	return fwrite(ptr, obj_size, count, stream);
 }
+
+}	// End of namespace Common

Modified: scummvm/branches/gsoc2007-fsnode/backends/file/base-file.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/file/base-file.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/file/base-file.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -30,12 +30,14 @@
 #include "common/str.h"
 #include "common/stream.h"
 
-using namespace Common;
+//using namespace Common;
 
+namespace Common {
+
 /**
  * Implements several file related functions used by the Common::File wrapper.
  */
-class BaseFile : public Common::SeekableReadStream {
+class BaseFile : public SeekableReadStream {
 protected:
 	/** File handle to the actual file; 0 if no file is open. */
 	void *_handle;
@@ -177,4 +179,6 @@
 	//uint32 write(const void *dataPtr, uint32 dataSize);	
 };
 
+} // End of namespace Common
+
 #endif	//BACKENDS_BASE_FILE_H

Modified: scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -1,5 +1,7 @@
 #include "backends/file/posix/posix-file.h"
 
+namespace Common {
+
 POSIXFile::POSIXFile() : BaseFile() {
 	//
 }
@@ -39,3 +41,5 @@
 int POSIXFile::_fwrite(const void * ptr, size_t obj_size, size_t count, FILE * stream) {
 	return fwrite(ptr, obj_size, count, stream);
 }
+
+}	// End of namespace Common

Modified: scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/file/posix/posix-file.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -27,6 +27,8 @@
 
 #include "backends/file/base-file.cpp"
 
+namespace Common {
+
 /**
  * Implements several POSIX specific file related functions used by the Common::File wrapper.
  * 
@@ -47,4 +49,6 @@
 	int _fwrite(const void * ptr, size_t obj_size, size_t count, FILE * stream);
 };
 
+}	// End of namespace Common
+
 #endif	//BACKENDS_POSIX_FILE_H

Modified: scummvm/branches/gsoc2007-fsnode/backends/fs/abstract-fs.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/fs/abstract-fs.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/fs/abstract-fs.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -79,7 +79,7 @@
 	virtual ~AbstractFilesystemNode() {}
 	
 	/*
-	 * Indicates whether the object refered by this path exists in the filesystem or not.
+	 * Indicates whether the object referred by this path exists in the filesystem or not.
 	 */
 	virtual bool exists() const = 0;
 
@@ -103,6 +103,18 @@
 	virtual String getDisplayName() const { return getName(); }
 
 	/**
+	 * Returns the last component of a given path.
+	 * 
+	 * Examples:
+	 * 			/foo/bar.txt would return /bar.txt
+	 * 			/foo/bar/    would return /bar/
+	 *  
+	 * @param str String containing the path.
+	 * @return Pointer to the first char of the last component inside str.
+	 */
+	virtual const char *getLastPathComponent(const Common::String &str) const = 0;
+	
+	/**
 	 * Returns a string with an architecture dependent path description.
 	 */
 	virtual String getName() const = 0;
@@ -118,12 +130,28 @@
 	virtual bool isDirectory() const = 0;
 	
 	/**
-	 * Indicates whether this path can be read from or not.
+	 * Indicates whether the object referred by this path can be read from or not.
+	 * 
+	 * If the path refers to a directory, readability implies being able to read 
+	 * and list the directory entries.
+	 * 
+	 * If the path refers to a file, readability implies being able to read the 
+	 * contents of the file.
+	 * 
+	 * @return bool true if the object can be read, false otherwise.
 	 */
 	virtual bool isReadable() const = 0;
 	
 	/**
-	 * Indicates whether this path can be written to or not.
+	 * Indicates whether the object referred by this path can be written to or not.
+	 * 
+	 * If the path refers to a directory, writability implies being able to modify
+	 * the directory entry (i.e. rename the directory, remove it or write files inside of it).
+	 * 
+	 * If the path refers to a file, writability implies being able to write data
+	 * to the file.
+	 * 
+	 * @return bool true if the object can be written to, false otherwise.
 	 */
 	virtual bool isWritable() const = 0;
 
@@ -132,4 +160,4 @@
 	*/
 };
 
-#endif
+#endif //BACKENDS_ABSTRACT_FS_H

Modified: scummvm/branches/gsoc2007-fsnode/backends/fs/dc/dc-fs.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/fs/dc/dc-fs.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/fs/dc/dc-fs.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -32,7 +32,7 @@
 #include <unistd.h>
 
 /**
- * Implementation of the ScummVM file system API based on POSIX.
+ * Implementation of the ScummVM file system API based on Ronin.
  * 
  * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
  */

Modified: scummvm/branches/gsoc2007-fsnode/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/backends/fs/posix/posix-fs.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/backends/fs/posix/posix-fs.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -64,6 +64,7 @@
 	
 	virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
 	virtual String getDisplayName() const { return _displayName; }
+	virtual const char *getLastPathComponent(const Common::String &str) const;
 	virtual String getName() const { return _displayName; }
 	virtual String getPath() const { return _path; }
 	virtual bool isDirectory() const { return _isDirectory; }
@@ -81,27 +82,6 @@
 	virtual void setFlags();
 };
 
-/**
- * Returns the last component of a given path.
- * 
- * Examples:
- * 			/foo/bar.txt would return /bar.txt
- * 			/foo/bar/    would return /bar/
- *  
- * @param str String containing the path.
- * @return Pointer to the first char of the last component inside str.
- */
-static const char *lastPathComponent(const Common::String &str) {
-	const char *start = str.c_str();
-	const char *cur = start + str.size() - 2;
-
-	while (cur >= start && *cur != '/') {
-		--cur;
-	}
-
-	return cur + 1;
-}
-
 void POSIXFilesystemNode::setFlags() {
 	struct stat st;
 	
@@ -142,7 +122,7 @@
 	assert(p.size() > 0);
 
 	_path = p;
-	_displayName = lastPathComponent(_path);
+	_displayName = getLastPathComponent(_path);
 
 	if (verify) {
 		setFlags();
@@ -236,12 +216,23 @@
 	return true;
 }
 
+const char *POSIXFilesystemNode::getLastPathComponent(const Common::String &str) const {
+	const char *start = str.c_str();
+	const char *cur = start + str.size() - 2;
+
+	while (cur >= start && *cur != '/') {
+		--cur;
+	}
+
+	return cur + 1;
+}
+
 AbstractFilesystemNode *POSIXFilesystemNode::getParent() const {
 	if (_path == "/")
 		return 0;
 
 	const char *start = _path.c_str();
-	const char *end = lastPathComponent(_path);
+	const char *end = getLastPathComponent(_path);
 
 	return new POSIXFilesystemNode(String(start, end - start), true);
 }

Modified: scummvm/branches/gsoc2007-fsnode/common/file.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/common/file.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/common/file.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -24,14 +24,10 @@
  */
 
 #include "common/file.h"
-#include "common/fs.h"
 #include "common/hashmap.h"
 #include "common/util.h"
 #include "common/hash-str.h"
-
-#if defined(UNIX) || defined(__SYMBIAN32__)
 #include <errno.h>
-#endif
 
 #ifdef MACOSX
 #include "CoreFoundation/CoreFoundation.h"

Modified: scummvm/branches/gsoc2007-fsnode/common/file.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/common/file.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/common/file.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -30,6 +30,9 @@
 #include "common/scummsys.h"
 #include "common/str.h"
 #include "common/stream.h"
+#include "common/fs.h"
+#include "backends/file/base-file.h"
+//#include "backends/factories/fs-factory-maker.h"
 
 class FilesystemNode;
 
@@ -38,7 +41,7 @@
 class File : public SeekableReadStream, public WriteStream {
 protected:
 	/** File handle to the actual file; 0 if no file is open. */
-	//BaseFile *_test;
+	BaseFile *_test;
 	
 	/** File handle to the actual file; 0 if no file is open. */
 	void *_handle;

Modified: scummvm/branches/gsoc2007-fsnode/common/fs.cpp
===================================================================
--- scummvm/branches/gsoc2007-fsnode/common/fs.cpp	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/common/fs.cpp	2007-08-18 05:24:18 UTC (rev 28649)
@@ -24,6 +24,7 @@
 
 #include "common/stdafx.h"
 #include "common/util.h"
+#include "common/fs.h"
 #include "backends/fs/abstract-fs.h"
 #include "backends/factories/fs-factory-maker.cpp"
 
@@ -107,12 +108,13 @@
 	return *this;
 }
 
-bool FilesystemNode::operator< (const FilesystemNode& node) const
+bool FilesystemNode::operator<(const FilesystemNode& node) const
 {
 	if (isDirectory() && !node.isDirectory())
 		return true;
 	if (!isDirectory() && node.isDirectory())
 		return false;
+	
 	return scumm_stricmp(getDisplayName().c_str(), node.getDisplayName().c_str()) < 0;
 }
 
@@ -130,6 +132,7 @@
 bool FilesystemNode::exists() const {
 	if (_realNode == 0)
 		return false;
+	
 	return _realNode->exists();
 }
 
@@ -189,62 +192,78 @@
 bool FilesystemNode::isDirectory() const {
 	if (_realNode == 0)
 		return false;
+	
 	return _realNode->isDirectory();
 }
 
 bool FilesystemNode::isReadable() const {
 	if (_realNode == 0)
 		return false;
+	
 	return _realNode->isReadable();
 }
 
 bool FilesystemNode::isWritable() const {
 	if (_realNode == 0)
 		return false;
+	
 	return _realNode->isWritable();
 }
 
 bool FilesystemNode::lookupFile(FSList &results, FSList &fslist, Common::String &filename, bool hidden, bool exhaustive) const
 {
-	for(FSList::iterator entry = fslist.begin(); entry != fslist.end(); ++entry)
-	{
-		if(entry->isDirectory()) {
-			lookupFileRec(results, *entry, filename, hidden, exhaustive);
+	int matches = 0;
+	
+	for (FSList::iterator entry = fslist.begin(); entry != fslist.end(); ++entry) {
+		if (entry->isDirectory()) {
+			matches += lookupFileRec(results, *entry, filename, hidden, exhaustive);
 		}
 	}
-	
-	//TODO: we would return true even if no matches were found, if the initial results list isn't empty
-	return ((results.size() > 0) ? true : false);
+
+	return ((matches > 0) ? true : false);
 }
 
 bool FilesystemNode::lookupFile(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const
 {
-	lookupFileRec(results, dir, filename, hidden, exhaustive);
+	int matches;
 	
-	//TODO: we would return true even if no matches were found, if the initial results list isn't empty
-	return ((results.size() > 0) ? true : false);
+	if (!dir.isDirectory())
+		return false;
+		
+	matches = lookupFileRec(results, dir, filename, hidden, exhaustive);
+	
+	return ((matches > 0) ? true : false);
 }
 
-void FilesystemNode::lookupFileRec(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const
+int FilesystemNode::lookupFileRec(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const
 {
 	FSList entries;
+	FSList children;
+	int matches = 0;
 	dir.getChildren(entries, FilesystemNode::kListAll, hidden);
 	
-	for(FSList::iterator entry = entries.begin(); entry != entries.end(); ++entry)
-	{
-		if(entry->isDirectory()) {
-			lookupFileRec(results, *entry, filename, hidden, exhaustive);
+	//Breadth search (entries in the same level)
+	for (FSList::iterator entry = entries.begin(); entry != entries.end(); ++entry) {
+		if (entry->isDirectory()) {
+			children.push_back(*entry);
 		} else {
 			//TODO: here we assume all backends implement the lastPathComponent method. It is currently static,
 			//		so it might be a good idea to include it inside the backend class. This would enforce its
 			//		implementation by all ports.
-			if(matchString(lastPathComponent(entry->getPath()), filename.c_str())) {
+			if(matchString(_realNode->getLastPathComponent(entry->getPath()), filename.c_str())) {
 				results.push_back(*entry);
+				matches++;
 				
-				if(!exhaustive) {
+				if (!exhaustive)
 					break;
-				}
 			}
 		}
 	}
+	
+	//Depth search (entries in lower levels)
+	for (FSList::iterator child = children.begin(); child != children.end(); ++child) {
+		matches += lookupFileRec(results, *child, filename, hidden, exhaustive);
+	}
+	
+	return matches;
 }

Modified: scummvm/branches/gsoc2007-fsnode/common/fs.h
===================================================================
--- scummvm/branches/gsoc2007-fsnode/common/fs.h	2007-08-18 01:59:18 UTC (rev 28648)
+++ scummvm/branches/gsoc2007-fsnode/common/fs.h	2007-08-18 05:24:18 UTC (rev 28649)
@@ -62,6 +62,8 @@
  * paths (MacOS 9 doesn't even have the notion of a "current directory").
  * And if we ever want to support devices with no FS in the classical sense (Palm...),
  * we can build upon this.
+ * 
+ * This class acts as a wrapper around the AbstractFilesystemNode class defined in backends/fs. 
  */
 class FilesystemNode {
 private:
@@ -80,9 +82,9 @@
 	};
 
 	/**
-	 * Create a new invalid FilesystemNode. In other words, isValid() for that
-	 * node returns false, and if you try to get it's path, an assert is
-	 * triggered.
+	 * Create a new pathless FilesystemNode. Since there's no path associated
+	 * with this node, path-related operations (i.e. exists(), isDirectory(), 
+	 * getPath()) will always return false or raise an assertion.
 	 */
 	FilesystemNode();
 
@@ -116,10 +118,12 @@
 	 * Compare the name of this node to the name of another. Directories
 	 * go before normal files.
 	 */
-	bool operator< (const FilesystemNode& node) const;
+	bool operator<(const FilesystemNode& node) const;
 
 	/*
-	 * Indicates whether the object refered by this path exists in the filesystem or not.
+	 * Indicates whether the object referred by this path exists in the filesystem or not.
+	 * 
+	 * @return bool true if the path exists, false otherwise.
 	 */
 	virtual bool exists() const;
 
@@ -177,34 +181,53 @@
 	FilesystemNode getParent() const;
 
 	/**
-	 * Indicates whether this path refers to a directory or not.
+	 * Indicates whether the path refers to a directory or not.
 	 * 
-	 * @todo Currently we assume that a valid node that is not a directory
-	 * automatically is a file (ignoring things like symlinks). That might
-	 * actually be OK... but we could still add an isFile method. Or even replace
-	 * isValid and isDirectory by a getType() method that can return values like
+	 * @todo Currently we assume that a node that is not a directory
+	 * automatically is a file (ignoring things like symlinks or pipes).
+	 * That might actually be OK... but we could still add an isFile method.
+	 * Or even replace isDirectory by a getType() method that can return values like
 	 * kDirNodeType, kFileNodeType, kInvalidNodeType.
 	 */
 	virtual bool isDirectory() const;
 	
 	/**
-	 * Indicates whether this path can be read from or not.
+	 * Indicates whether the object referred by this path can be read from or not.
+	 * 
+	 * If the path refers to a directory, readability implies being able to read 
+	 * and list the directory entries.
+	 * 
+	 * If the path refers to a file, readability implies being able to read the 
+	 * contents of the file.
+	 * 
+	 * @return bool true if the object can be read, false otherwise.
 	 */
 	virtual bool isReadable() const;
 	
 	/**
-	 * Indicates whether this path can be written to or not.
+	 * Indicates whether the object referred by this path can be written to or not.
+	 * 
+	 * If the path refers to a directory, writability implies being able to modify
+	 * the directory entry (i.e. rename the directory, remove it or write files inside of it).
+	 * 
+	 * If the path refers to a file, writability implies being able to write data
+	 * to the file.
+	 * 
+	 * @return bool true if the object can be written to, false otherwise.
 	 */
 	virtual bool isWritable() const;
 	
 	/**
 	 * Searches recursively for a filename inside the given directories.
 	 * 
+	 * For each directory in the directory list a breadth-first search is performed,
+	 * that is, the current directory entries are scanned before going into subdirectories.
+	 * 
 	 * @param results List to put the matches in.
 	 * @param fslist List of directories to search within.
 	 * @param filename Name of the file to look for.
-	 * @param hidden Whether to search hidden files or not. Default: false
-	 * @param exhaustive Whether to continue searching after one match has been found. Default: false
+	 * @param hidden Whether to search hidden files or not.
+	 * @param exhaustive Whether to continue searching after one match has been found.
 	 * 
 	 * @return true if matches could be found, false otherwise.
 	 */
@@ -213,11 +236,14 @@
 	/**
 	 * Searches recursively for a filename inside the given directory.
 	 * 
+	 * The search is performed breadth-first, that is, the current directory entries
+	 * are scanned before going into subdirectories.
+	 * 
 	 * @param results List to put the matches in.
 	 * @param FilesystemNode Directory to search within.
 	 * @param filename Name of the file to look for.
-	 * @param hidden Whether to search hidden files or not. Default: false
-	 * @param exhaustive Whether to continue searching after one match has been found. Default: false
+	 * @param hidden Whether to search hidden files or not.
+	 * @param exhaustive Whether to continue searching after one match has been found.
 	 * 
 	 * @return true if matches could be found, false otherwise.
 	 */
@@ -233,13 +259,18 @@
 	/**
 	 * Searches recursively for a filename inside the given directory.
 	 * 
+	 * The search is performed breadth-first, that is, the current directory entries
+	 * are scanned before going into subdirectories.
+	 * 
 	 * @param results List to put the matches in.
 	 * @param FilesystemNode Directory to search within.
 	 * @param filename Name of the file to look for.
 	 * @param hidden Whether to search hidden files or not.
 	 * @param exhaustive Whether to continue searching after one match has been found.
+	 * 
+	 * @return The number of matches found.
 	 */
-	void lookupFileRec(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const;
+	int lookupFileRec(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const;
 };
 
 //} // End of namespace Common


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list