WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
CASCFolder.h
Go to the documentation of this file.
1/*
2 * CASCFolder.h
3 *
4 * Created on: 22 oct. 2014
5 * Author: Jeromnimo
6 */
7
8#pragma once
9
10#include <string>
11#include <vector>
12
13#ifdef _WIN32
14#include <Windows.h> // Include Windows headers for standard HANDLE definition
15#endif
16
17#include "GameFolder.h" // GameConfig
18
24{
25public:
26 CASCFolder();
27
28 void init(const std::string& path);
29
30 std::string locale() { return m_currentConfig.locale; }
31 std::string version() { return m_currentConfig.version; }
32
33 std::vector<core::GameConfig> configsFound() { return m_configs; }
34 bool setConfig(core::GameConfig config);
35
36 int lastError() { return m_openError; }
37
38 bool fileExists(int id);
39
40 bool openFile(int id, HANDLE* result);
41 bool closeFile(HANDLE file);
42
43 // int fileDataId(std::string & filename);
44
45private:
46 CASCFolder(const CASCFolder&) = delete;
47 CASCFolder& operator=(const CASCFolder&) = delete;
48
49 //void initLocales();
50 //void initVersion();
51 void initBuildInfo();
53
56
57 std::string m_folder;
59 HANDLE hStorage;
60
61 std::vector<core::GameConfig> m_configs;
62};
Manages a CASC (Content Addressable Storage Container) archive.
Definition CASCFolder.h:24
bool setConfig(core::GameConfig config)
CASCFolder & operator=(const CASCFolder &)=delete
CASCFolder(const CASCFolder &)=delete
void init(const std::string &path)
int lastError()
Definition CASCFolder.h:36
bool closeFile(HANDLE file)
void initBuildInfo()
bool openFile(int id, HANDLE *result)
HANDLE hStorage
Definition CASCFolder.h:59
void addExtraEncryptionKeys()
bool fileExists(int id)
std::string version()
Definition CASCFolder.h:31
int m_currentCascLocale
Definition CASCFolder.h:54
std::vector< core::GameConfig > configsFound()
Definition CASCFolder.h:33
int m_openError
Definition CASCFolder.h:58
std::string locale()
Definition CASCFolder.h:30
core::GameConfig m_currentConfig
Definition CASCFolder.h:55
std::vector< core::GameConfig > m_configs
Definition CASCFolder.h:61
std::string m_folder
Definition CASCFolder.h:57
Describes a detected game installation (locale, version, product).
Definition GameFolder.h:16
std::string version
e.g. "11.0.7.58238".
Definition GameFolder.h:19
std::string locale
e.g. "enUS".
Definition GameFolder.h:18