plptools
Loading...
Searching...
No Matches
sisfile.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#include "sisfileheader.h"
23#include "siscomponentrecord.h"
24
25class SISLangRecord;
26class SISFileRecord;
27class SISReqRecord;
28
34{
35public:
36
37 SISFile();
38
39 virtual ~SISFile();
40
46 SisRC compareApp(SISFile* other);
47
54 SisRC fillFrom(uint8_t* buf, off_t len);
55
59 int getLanguage();
60
66
70 uint8_t* getName();
71
76 uint32_t getResidualEnd()
77 {
78 return m_end;
79 }
80
81 void ownBuffer()
82 {
83 m_ownBuffer = true;
84 }
85
89 bool sameApp(SISFile* other);
90
94 void setDrive(char drive);
95
99 void setFiles(int nFiles);
100
104 void setLanguage(int lang);
105
110
111private:
112
114
116
117 uint8_t* m_buf;
118
119 uint32_t m_end;
120
121 void updateEnd(uint32_t pos);
122
123};
The name of the component in this SIS file.
The first part of a SISFile.
Definition: sisfileheader.h:30
Information about a file component in a SIS file.
Definition: sisfilerecord.h:31
The top level container of a SIS file.
Definition: sisfile.h:34
void setDrive(char drive)
Set the installed drive.
Definition: sisfile.cpp:155
SISFile()
Definition: sisfile.cpp:29
bool sameApp(SISFile *other)
Is this the same application?
SisRC fillFrom(uint8_t *buf, off_t len)
Populate the fields.
Definition: sisfile.cpp:48
uint8_t * m_buf
Definition: sisfile.h:117
SISReqRecord * m_reqRecords
Definition: sisfile.h:109
void setFiles(int nFiles)
Set the number of installed files.
Definition: sisfile.cpp:161
SisRC compareApp(SISFile *other)
Compare uid and version number of this file, with another.
Definition: sisfile.cpp:42
virtual ~SISFile()
Definition: sisfile.cpp:35
bool m_ownBuffer
Definition: sisfile.h:115
SISLangRecord * m_langRecords
Definition: sisfile.h:107
SISFileRecord * m_fileRecords
Definition: sisfile.h:108
SISComponentNameRecord m_componentRecord
Definition: sisfile.h:113
void ownBuffer()
Definition: sisfile.h:81
SISFileHeader m_header
Definition: sisfile.h:106
void setLanguage(int lang)
Set the selected installation language.
Definition: sisfile.cpp:167
int getLanguage()
Return the currently selected installation language.
Definition: sisfile.cpp:137
uint32_t m_end
Definition: sisfile.h:119
void updateEnd(uint32_t pos)
Definition: sisfile.cpp:173
uint32_t getResidualEnd()
Get the number of bytes that should be copied to the residual sis file on the psion.
Definition: sisfile.h:76
uint8_t * getName()
Get the name of this component, in the selected language.
Definition: sisfile.cpp:149
A simple language record, only containing the epoc specific 16 bit language number.
Definition: sislangrecord.h:27
Information about an application that must be installed prior to the current one.
Definition: sisreqrecord.h:29
SisRC
Return Codes.
Definition: sistypes.h:27
Holder of a language entry, translating from language numbers to names.
Definition: sistypes.h:56