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
20#ifndef _SISFILE_H
21#define _SISFILE_H
22
23#include "sistypes.h"
24#include "sisfileheader.h"
25#include "siscomponentrecord.h"
26
27class SISLangRecord;
28class SISFileRecord;
29class SISReqRecord;
30
36{
37public:
38
39 SISFile();
40
41 virtual ~SISFile();
42
48 SisRC compareApp(SISFile* other);
49
56 SisRC fillFrom(uint8_t* buf, off_t len);
57
61 int getLanguage();
62
68
72 uint8_t* getName();
73
78 uint32_t getResidualEnd()
79 {
80 return m_end;
81 }
82
83 void ownBuffer()
84 {
85 m_ownBuffer = true;
86 }
87
91 bool sameApp(SISFile* other);
92
96 void setDrive(char drive);
97
101 void setFiles(int nFiles);
102
106 void setLanguage(int lang);
107
112
113private:
114
116
118
119 uint8_t* m_buf;
120
121 uint32_t m_end;
122
123 void updateEnd(uint32_t pos);
124
125};
126
127#endif
The name of the component in this SIS file.
The first part of a SISFile.
Definition: sisfileheader.h:32
Information about a file component in a SIS file.
Definition: sisfilerecord.h:34
The top level container of a SIS file.
Definition: sisfile.h:36
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:119
SISReqRecord * m_reqRecords
Definition: sisfile.h:111
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:117
SISLangRecord * m_langRecords
Definition: sisfile.h:109
SISFileRecord * m_fileRecords
Definition: sisfile.h:110
SISComponentNameRecord m_componentRecord
Definition: sisfile.h:115
void ownBuffer()
Definition: sisfile.h:83
SISFileHeader m_header
Definition: sisfile.h:108
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:121
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:78
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:30
Information about an application that must be installed prior to the current one.
Definition: sisreqrecord.h:32
SisRC
Return Codes.
Definition: sistypes.h:29
Holder of a language entry, translating from language numbers to names.
Definition: sistypes.h:59