PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: FileSearchAndroid.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLCORE_FILESEARCH_ANDROID_H__ 00024 #define __PLCORE_FILESEARCH_ANDROID_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLCore/File/FileSearchImpl.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Forward declarations ] 00036 //[-------------------------------------------------------] 00037 struct AAssetDir; 00038 typedef struct AAssetDir AAssetDir; 00039 00040 00041 //[-------------------------------------------------------] 00042 //[ Namespace ] 00043 //[-------------------------------------------------------] 00044 namespace PLCore { 00045 00046 00047 //[-------------------------------------------------------] 00048 //[ Classes ] 00049 //[-------------------------------------------------------] 00050 /** 00051 * @brief 00052 * Android implementation of 'FileSearchImpl' 00053 */ 00054 class FileSearchAndroid : public FileSearchImpl { 00055 00056 00057 //[-------------------------------------------------------] 00058 //[ Friends ] 00059 //[-------------------------------------------------------] 00060 friend class FileAndroid; 00061 00062 00063 //[-------------------------------------------------------] 00064 //[ Private functions ] 00065 //[-------------------------------------------------------] 00066 private: 00067 /** 00068 * @brief 00069 * Constructor 00070 * 00071 * @param[in] sPath 00072 * Search path 00073 * @param[in] pAccess 00074 * Additional file access information (can be a null pointer) 00075 */ 00076 FileSearchAndroid(const String &sPath, const FileAccess *pAccess); 00077 00078 /** 00079 * @brief 00080 * Destructor 00081 */ 00082 virtual ~FileSearchAndroid(); 00083 00084 00085 //[-------------------------------------------------------] 00086 //[ Private virtual FileSearchImpl functions ] 00087 //[-------------------------------------------------------] 00088 private: 00089 virtual bool HasNextFile() override; 00090 virtual String GetNextFile() override; 00091 00092 00093 //[-------------------------------------------------------] 00094 //[ Private data ] 00095 //[-------------------------------------------------------] 00096 private: 00097 AAssetDir *m_pAAssetDir; /**< Android asset directory, can be a null pointer */ 00098 String m_sPath; 00099 const char *m_pszNextFilename; 00100 String m_sFilename; 00101 00102 00103 }; 00104 00105 00106 //[-------------------------------------------------------] 00107 //[ Namespace ] 00108 //[-------------------------------------------------------] 00109 } // PLCore 00110 00111 00112 #endif // __PLCORE_FILESEARCH_ANDROID_H__
|