ScummVM API documentation
file_mgr.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 PETKA_FILE_MGR_H
23 #define PETKA_FILE_MGR_H
24 
25 #include "common/list.h"
26 #include "common/ptr.h"
27 
28 namespace Common {
29  class File;
30  class SeekableReadStream;
31 }
32 
33 namespace Petka {
34 
35 class FileMgr {
36 public:
37  bool openStore(const Common::String &name);
38  void closeStore(const Common::String &name);
39  void closeAll();
40 
41  Common::SeekableReadStream *getFileStream(const Common::String &name);
42 
43 private:
44  struct Resource {
45  Common::String name;
46  uint32 offset;
47  uint32 size;
48  };
49  struct Store {
51  Common::Array<Resource> descriptions;
52  };
53  Common::Array<Store> _stores;
54 };
55 
56 } // End of namespace Petka
57 
58 #endif
Definition: str.h:59
Definition: file_mgr.h:35
Definition: stream.h:745
Definition: algorithm.h:29
Definition: base.h:27