/
probes.h
104 lines (80 loc) · 2.88 KB
/
probes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* xoreos - A reimplementation of BioWare's Aurora engine
*
* xoreos is the legal property of its developers, whose names
* can be found in the AUTHORS file distributed with this source
* distribution.
*
* xoreos is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* xoreos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with xoreos. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* Probing for an installation of Neverwinter Nights.
*/
#ifndef ENGINES_NWN_PROBES_H
#define ENGINES_NWN_PROBES_H
#include "src/common/ustring.h"
#include "src/engines/engineprobe.h"
namespace Engines {
namespace NWN {
class NWNEngineProbe : public Engines::EngineProbe {
private:
static const Common::UString kGameName;
public:
NWNEngineProbe() {}
~NWNEngineProbe() {}
Aurora::GameID getGameID() const {
return Aurora::kGameIDNWN;
}
const Common::UString &getGameName() const {
return kGameName;
}
bool probe(Common::SeekableReadStream &UNUSED(stream)) const {
return false;
}
Engines::Engine *createEngine() const;
};
class NWNEngineProbeWindows : public NWNEngineProbe {
public:
NWNEngineProbeWindows() {}
~NWNEngineProbeWindows() {}
bool probe(const Common::UString &directory, const Common::FileList &rootFiles) const;
Aurora::Platform getPlatform() const { return Aurora::kPlatformWindows; }
};
class NWNEngineProbeMac : public NWNEngineProbe {
public:
NWNEngineProbeMac() {}
~NWNEngineProbeMac() {}
bool probe(const Common::UString &directory, const Common::FileList &rootFiles) const;
Aurora::Platform getPlatform() const { return Aurora::kPlatformMacOSX; }
};
class NWNEngineProbeLinux: public NWNEngineProbe {
public:
NWNEngineProbeLinux() {}
~NWNEngineProbeLinux() {}
bool probe(const Common::UString &directory, const Common::FileList &rootFiles) const;
Aurora::Platform getPlatform() const { return Aurora::kPlatformLinux; }
};
class NWNEngineProbeFallback : public NWNEngineProbe {
public:
NWNEngineProbeFallback() {}
~NWNEngineProbeFallback() {}
bool probe(const Common::UString &directory, const Common::FileList &rootFiles) const;
Aurora::Platform getPlatform() const { return Aurora::kPlatformUnknown; }
};
extern const NWNEngineProbeWindows kNWNEngineProbeWin;
extern const NWNEngineProbeMac kNWNEngineProbeMac;
extern const NWNEngineProbeLinux kNWNEngineProbeLinux;
extern const NWNEngineProbeFallback kNWNEngineProbeFallback;
} // End of namespace NWN
} // End of namespace Engines
#endif // ENGINES_NWN_PROBES_H