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
20#ifndef _SISFILEHEADER_H
21#define _SISFILEHEADER_H
22
23#include "sistypes.h"
24
32{
33public:
34
39
48 SisRC fillFrom(uint8_t* buf, int* base, off_t len);
49
53 void setDrive(char drive);
54
58 void setFiles(int nFiles);
59
63#ifdef EPOC6
64 ,
65 op_noCompress = 8,
66 op_shutdownApps = 16
67#endif
68 };
69
70 enum FileType {
71 FT_App = 0
72#ifdef EPOC6
73 ,
74 FT_System = 1,
75 FT_Option = 2,
76 FT_Config = 3,
77 FT_Patch = 4,
78 FT_Upgrade = 5
79#endif
80 };
81
82 uint32_t m_uid1;
83 uint32_t m_uid2;
84 uint32_t m_uid3;
85 uint32_t m_uid4;
86 uint16_t m_crc;
87 uint16_t m_nlangs;
88 uint16_t m_nfiles;
89 uint16_t m_nreqs;
94 uint16_t m_options;
95 uint16_t m_type;
96 uint16_t m_major;
97 uint16_t m_minor;
98 uint32_t m_variant;
99 uint32_t m_languagePtr;
100 uint32_t m_filesPtr;
101 uint32_t m_reqPtr;
102 uint32_t m_unknown;
104
105private:
106
107 uint8_t* m_buf;
108
109};
110
111#endif
The first part of a SISFile.
Definition: sisfileheader.h:32
uint32_t m_reqPtr
uint8_t * m_buf
uint32_t m_uid3
Definition: sisfileheader.h:84
void setFiles(int nFiles)
Update the number of installed files, and patch the parsed buffer.
uint32_t m_uid1
Definition: sisfileheader.h:82
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:85
uint32_t m_componentPtr
uint32_t m_languagePtr
Definition: sisfileheader.h:99
uint32_t m_filesPtr
SisRC fillFrom(uint8_t *buf, int *base, off_t len)
Populate the fields.
uint32_t m_uid2
Definition: sisfileheader.h:83
uint16_t m_nlangs
Definition: sisfileheader.h:87
uint16_t m_major
Definition: sisfileheader.h:96
uint32_t m_variant
Definition: sisfileheader.h:98
uint32_t m_unknown
uint32_t m_installerVersion
Definition: sisfileheader.h:93
uint16_t m_nreqs
Definition: sisfileheader.h:89
uint16_t m_type
Definition: sisfileheader.h:95
uint16_t m_crc
Definition: sisfileheader.h:86
uint16_t m_minor
Definition: sisfileheader.h:97
uint16_t m_installationLanguage
Definition: sisfileheader.h:90
uint16_t m_installationFiles
Definition: sisfileheader.h:91
uint16_t m_nfiles
Definition: sisfileheader.h:88
uint16_t m_options
Definition: sisfileheader.h:94
uint32_t m_installationDrive
Definition: sisfileheader.h:92
SisRC
Return Codes.
Definition: sistypes.h:29