plptools
Loading...
Searching...
No Matches
sisfilerecord.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 _SISFILERECORD_H
21#define _SISFILERECORD_H
22
23#include "sistypes.h"
24
25class SISFile;
26
34{
35public:
36
46 SisRC fillFrom(uint8_t* buf, int* base, off_t len, SISFile* sisFile);
47
48 uint8_t* getDestPtr()
49 {
50 return m_destPtr < m_len ? &m_buf[m_destPtr] : 0;
51 }
52
57 uint8_t* getFilePtr(int fileNo);
58
59 void setMainDrive(char drive);
60
64 uint32_t m_flags;
65
76 uint32_t m_fileType;
77
91 uint32_t m_fileDetails;
92
94 uint32_t m_sourcePtr;
95 uint32_t m_destLength;
96 uint32_t* m_fileLengths;
97
98private:
99
100 uint32_t m_destPtr;
101 uint32_t* m_filePtrs;
102
107 uint8_t* m_buf;
108
109 int m_len;
110
111};
112
113#endif
Information about a file component in a SIS file.
Definition: sisfilerecord.h:34
uint8_t * getFilePtr(int fileNo)
Return a pointer to the file data for the file for the specified language.
uint32_t m_flags
1 if multiple language versions, otherwise 0.
Definition: sisfilerecord.h:64
uint32_t m_sourceLength
Definition: sisfilerecord.h:93
uint32_t m_fileDetails
If file type is 1:
Definition: sisfilerecord.h:91
uint32_t m_destLength
Definition: sisfilerecord.h:95
uint32_t m_destPtr
SisRC fillFrom(uint8_t *buf, int *base, off_t len, SISFile *sisFile)
Populate the fields.
uint8_t * m_buf
The buffer we belong to.
uint32_t m_fileType
Type of file.
Definition: sisfilerecord.h:76
void setMainDrive(char drive)
uint8_t * getDestPtr()
Definition: sisfilerecord.h:48
uint32_t m_sourcePtr
Definition: sisfilerecord.h:94
uint32_t * m_filePtrs
uint32_t * m_fileLengths
Definition: sisfilerecord.h:96
The top level container of a SIS file.
Definition: sisfile.h:36
SisRC
Return Codes.
Definition: sistypes.h:29