plptools
Loading...
Searching...
No Matches
sisfileheader.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 2002 Daniel Brahneborg <basic.chello@se>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 */
19#pragma once
20
21#include "sistypes.h"
22
30{
31public:
32
37
46 SisRC fillFrom(uint8_t* buf, int* base, off_t len);
47
51 void setDrive(char drive);
52
56 void setFiles(int nFiles);
57
61#ifdef EPOC6
62 ,
63 op_noCompress = 8,
64 op_shutdownApps = 16
65#endif
66 };
67
68 enum FileType {
69 FT_App = 0
70#ifdef EPOC6
71 ,
72 FT_System = 1,
73 FT_Option = 2,
74 FT_Config = 3,
75 FT_Patch = 4,
76 FT_Upgrade = 5
77#endif
78 };
79
80 uint32_t m_uid1;
81 uint32_t m_uid2;
82 uint32_t m_uid3;
83 uint32_t m_uid4;
84 uint16_t m_crc;
85 uint16_t m_nlangs;
86 uint16_t m_nfiles;
87 uint16_t m_nreqs;
92 uint16_t m_options;
93 uint16_t m_type;
94 uint16_t m_major;
95 uint16_t m_minor;
96 uint32_t m_variant;
97 uint32_t m_languagePtr;
98 uint32_t m_filesPtr;
99 uint32_t m_reqPtr;
100 uint32_t m_unknown;
102
103private:
104
105 uint8_t* m_buf;
106
107};
The first part of a SISFile.
Definition: sisfileheader.h:30
uint32_t m_reqPtr
Definition: sisfileheader.h:99
uint8_t * m_buf
uint32_t m_uid3
Definition: sisfileheader.h:82
void setFiles(int nFiles)
Update the number of installed files, and patch the parsed buffer.
uint32_t m_uid1
Definition: sisfileheader.h:80
SisRC compareApp(SISFileHeader *other)
Compare uid and version number of this file, with another.
void setDrive(char drive)
Update the drive letter, and patch the parsed buffer.
uint32_t m_uid4
Definition: sisfileheader.h:83
uint32_t m_componentPtr
uint32_t m_languagePtr
Definition: sisfileheader.h:97
uint32_t m_filesPtr
Definition: sisfileheader.h:98
SisRC fillFrom(uint8_t *buf, int *base, off_t len)
Populate the fields.
uint32_t m_uid2
Definition: sisfileheader.h:81
uint16_t m_nlangs
Definition: sisfileheader.h:85
uint16_t m_major
Definition: sisfileheader.h:94
uint32_t m_variant
Definition: sisfileheader.h:96
uint32_t m_unknown
uint32_t m_installerVersion
Definition: sisfileheader.h:91
uint16_t m_nreqs
Definition: sisfileheader.h:87
uint16_t m_type
Definition: sisfileheader.h:93
uint16_t m_crc
Definition: sisfileheader.h:84
uint16_t m_minor
Definition: sisfileheader.h:95
uint16_t m_installationLanguage
Definition: sisfileheader.h:88
uint16_t m_installationFiles
Definition: sisfileheader.h:89
uint16_t m_nfiles
Definition: sisfileheader.h:86
uint16_t m_options
Definition: sisfileheader.h:92
uint32_t m_installationDrive
Definition: sisfileheader.h:90
SisRC
Return Codes.
Definition: sistypes.h:27