00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OpenSpace3D 00004 For the latest info, see http://www.openspace3d.com 00005 00006 Copyright (c) 2010 I-maginer 00007 00008 This program is free software; you can redistribute it and/or modify it under 00009 the terms of the GNU Lesser General Public License as published by the Free Software 00010 Foundation; either version 2 of the License, or (at your option) any later 00011 version. 00012 00013 This program is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00015 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public License along with 00018 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00019 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00020 http://www.gnu.org/copyleft/lesser.txt 00021 00022 You may alternatively use this source under the terms of a specific version of 00023 the OpenSpace3D Unrestricted License provided you have obtained such a license from 00024 I-maginer. 00025 ----------------------------------------------------------------------------- 00026 */ 00027 00033 #include "SO3ScolUrl.h" 00034 #include "Scol.h" 00035 00036 namespace SO3 00037 { 00038 00039 /*#include <sys/types.h> 00040 #include <sys/stat.h> 00041 00042 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE 00043 # include "OgreSearchOps.h" 00044 # include <sys/param.h> 00045 # define MAX_PATH MAXPATHLEN 00046 #endif 00047 00048 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 00049 # define WIN32_LEAN_AND_MEAN 00050 # define NOMINMAX // required to stop windows.h messing up std::min 00051 # include <windows.h> 00052 # include <direct.h> 00053 # include <io.h> 00054 #endif*/ 00055 00056 //----------------------------------------------------------------------- 00057 SO3ScolUrlArchive::SO3ScolUrlArchive(const Ogre::String& name, const Ogre::String& archType) : Ogre::Archive(name, archType) 00058 { 00059 } 00060 00061 //----------------------------------------------------------------------- 00062 bool SO3ScolUrlArchive::isCaseSensitive() const 00063 { 00064 return false; 00065 } 00066 00067 //----------------------------------------------------------------------- 00068 SO3ScolUrlArchive::~SO3ScolUrlArchive() 00069 { 00070 unload(); 00071 } 00072 00073 //----------------------------------------------------------------------- 00074 void SO3ScolUrlArchive::load() 00075 { 00076 // TODO 00077 } 00078 00079 //----------------------------------------------------------------------- 00080 void SO3ScolUrlArchive::unload() 00081 { 00082 // TODO 00083 } 00084 00085 //----------------------------------------------------------------------- 00086 #if OGRE_VERSION < ((1 << 16) | (7 << 8) | 0) 00087 Ogre::DataStreamPtr SO3ScolUrlArchive::open(const Ogre::String& filename) const 00088 #else 00089 Ogre::DataStreamPtr SO3ScolUrlArchive::open(const Ogre::String& filename, bool readOnly) const 00090 #endif 00091 { 00092 // TODO 00093 return Ogre::DataStreamPtr(); 00094 } 00095 00096 //----------------------------------------------------------------------- 00097 Ogre::StringVectorPtr SO3ScolUrlArchive::list(bool recursive, bool dirs) 00098 { 00099 // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category 00100 Ogre::StringVectorPtr ret(OGRE_NEW_T(Ogre::StringVector, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T); 00101 00102 // TODO 00103 00104 return ret; 00105 } 00106 00107 //----------------------------------------------------------------------- 00108 Ogre::FileInfoListPtr SO3ScolUrlArchive::listFileInfo(bool recursive, bool dirs) 00109 { 00110 // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category 00111 Ogre::FileInfoListPtr ret(OGRE_NEW_T(Ogre::FileInfoList, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T); 00112 00113 // TODO 00114 00115 return ret; 00116 } 00117 00118 //----------------------------------------------------------------------- 00119 Ogre::StringVectorPtr SO3ScolUrlArchive::find(const Ogre::String& pattern, 00120 bool recursive, bool dirs) 00121 { 00122 // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category 00123 Ogre::StringVectorPtr ret(OGRE_NEW_T(Ogre::StringVector, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T); 00124 00125 // TODO 00126 00127 return ret; 00128 } 00129 00130 //----------------------------------------------------------------------- 00131 // If our ogre is anterior to v1.7 00132 #if OGRE_VERSION < ((1 << 16) | (7 << 8) | 0) 00133 Ogre::FileInfoListPtr SO3ScolUrlArchive::findFileInfo(const Ogre::String& pattern, bool recursive, bool dirs) 00134 #else 00135 Ogre::FileInfoListPtr SO3ScolUrlArchive::findFileInfo(const Ogre::String& pattern, bool recursive, bool dirs) const 00136 #endif 00137 { 00138 // Note that we have to tell the SharedPtr to use OGRE_DELETE_T not OGRE_DELETE by passing category 00139 Ogre::FileInfoListPtr ret(OGRE_NEW_T(Ogre::FileInfoList, Ogre::MEMCATEGORY_GENERAL)(), Ogre::SPFM_DELETE_T); 00140 00141 // TODO 00142 00143 return ret; 00144 } 00145 00146 //----------------------------------------------------------------------- 00147 bool SO3ScolUrlArchive::exists(const Ogre::String& filename) 00148 { 00149 // TODO 00150 return false; 00151 } 00152 00153 //--------------------------------------------------------------------- 00154 time_t SO3ScolUrlArchive::getModifiedTime(const Ogre::String& filename) 00155 { 00156 // TODO 00157 return 0; 00158 } 00159 00160 }
1.6.3