xoreos  0.0.5
resources.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_AURORA_RESOURCES_H
26 #define ENGINES_AURORA_RESOURCES_H
27 
28 #include <list>
29 #include <vector>
30 
31 #include "src/common/changeid.h"
32 
33 #include "src/aurora/types.h"
34 
35 namespace Common {
36  class UString;
37 }
38 
39 namespace Engines {
40 
41 typedef std::list<Common::ChangeID> ChangeList;
42 
44 void indexMandatoryArchive(const Common::UString &file, uint32 priority, Common::ChangeID *changeID = 0);
45 void indexMandatoryArchive(const Common::UString &file, uint32 priority, ChangeList &changes);
46 void indexMandatoryArchive(const Common::UString &file, uint32 priority, const std::vector<byte> &password,
47  Common::ChangeID *changeID = 0);
48 void indexMandatoryArchive(const Common::UString &file, uint32 priority, const std::vector<byte> &password,
49  ChangeList &changes);
50 
52 bool indexOptionalArchive(const Common::UString &file, uint32 priority, Common::ChangeID *changeID = 0);
53 bool indexOptionalArchive(const Common::UString &file, uint32 priority, ChangeList &changes);
54 bool indexOptionalArchive(const Common::UString &file, uint32 priority, const std::vector<byte> &password,
55  Common::ChangeID *changeID = 0);
56 bool indexOptionalArchive(const Common::UString &file, uint32 priority, const std::vector<byte> &password,
57  ChangeList &changes);
58 
60 void indexMandatoryDirectory(const Common::UString &dir, const char *glob, int depth,
61  uint32 priority, Common::ChangeID *changeID = 0);
62 void indexMandatoryDirectory(const Common::UString &dir, const char *glob, int depth,
63  uint32 priority, ChangeList &changes);
64 
66 bool indexOptionalDirectory(const Common::UString &dir, const char *glob, int depth,
67  uint32 priority, Common::ChangeID *changeID = 0);
68 bool indexOptionalDirectory(const Common::UString &dir, const char *glob, int depth,
69  uint32 priority, ChangeList &changes);
70 
72 void deindexResources(Common::ChangeID &changeID);
73 void deindexResources(ChangeList &changes);
74 
75 } // End of namespace Engines
76 
77 #endif // ENGINES_AURORA_RESOURCES_H
Definition: 2dafile.h:39
A class holding an UTF-8 string.
Definition: ustring.h:48
bool indexOptionalArchive(const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
Definition: resources.cpp:69
bool indexOptionalDirectory(const Common::UString &dir, const char *glob, int depth, uint32 priority, Common::ChangeID *changeID)
Add a directory to the resource manager, if it exists.
Definition: resources.cpp:133
std::list< Common::ChangeID > ChangeList
Definition: resources.h:41
void deindexResources(Common::ChangeID &changeID)
Remove previously added resources from the ResourceManager.
Definition: resources.cpp:164
void indexMandatoryArchive(const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
Definition: resources.cpp:36
Helper class to represent an undoable change.
void indexMandatoryDirectory(const Common::UString &dir, const char *glob, int depth, uint32 priority, Common::ChangeID *changeID)
Add a directory to the resource manager, erroring out if it does not exist.
Definition: resources.cpp:112
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
A class representing an undoable change.
Definition: changeid.h:35
uint32_t uint32
Definition: types.h:204