ScummVM API documentation
android-fs-factory.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ANDROID_FILESYSTEM_FACTORY_H
23 #define ANDROID_FILESYSTEM_FACTORY_H
24 
25 #include "backends/fs/fs-factory.h"
26 #include "common/singleton.h"
27 #include "backends/fs/posix-drives/posix-drives-fs.h"
28 
35  public Common::Singleton<AndroidFilesystemFactory> {
36  friend class Common::Singleton<SingletonBaseType>;
37 protected:
39 public:
40  AbstractFSNode *makeRootFileNode() const override;
42  AbstractFSNode *makeFileNodePath(const Common::String &path) const override;
43 
44  void initSAF();
45  bool hasSAF() const { return _withSAF; }
46  void getSAFTrees(AbstractFSList &list, bool allowSAFadd) const;
47 private:
48  struct Config : public DrivePOSIXFilesystemNode::Config {
49  Config(const AndroidFilesystemFactory *factory);
50 
51  bool getDrives(AbstractFSList &list, bool hidden) const override;
52  bool isDrive(const Common::String &path) const override;
53 
54  private:
55  const AndroidFilesystemFactory *_factory;
57  };
58 
59  bool _withSAF;
60  Config _config;
61 };
62 
63 #endif /*ANDROID_FILESYSTEM_FACTORY_H*/
Definition: str.h:59
Definition: fs-factory.h:31
Definition: array.h:52
AbstractFSNode * makeCurrentDirectoryFileNode() const override
AbstractFSNode * makeRootFileNode() const override
AbstractFSNode * makeFileNodePath(const Common::String &path) const override
Definition: android-fs-factory.h:34
Definition: posix-drives-fs.h:52
Definition: abstract-fs.h:41
Definition: singleton.h:42