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#pragma once
20
21#include "sistypes.h"
22
23class SISFile;
24
32public:
33
43 SisRC fillFrom(uint8_t* buf, int* base, off_t len, SISFile* sisFile);
44
45 uint8_t* getDestPtr() {
46 return m_destPtr < m_len ? &m_buf[m_destPtr] : 0;
47 }
48
53 uint8_t* getFilePtr(int fileNo);
54
55 void setMainDrive(char drive);
56
60 uint32_t m_flags;
61
72 uint32_t m_fileType;
73
87 uint32_t m_fileDetails;
88
90 uint32_t m_sourcePtr;
91 uint32_t m_destLength;
92 uint32_t* m_fileLengths;
93
94private:
95
96 uint32_t m_destPtr;
97 uint32_t* m_filePtrs;
98
103 uint8_t* m_buf;
104
105 int m_len;
106
107};
Information about a file component in a SIS file.
Definition: sisfilerecord.h:31
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:60
uint32_t m_sourceLength
Definition: sisfilerecord.h:89
uint32_t m_fileDetails
If file type is 1:
Definition: sisfilerecord.h:87
uint32_t m_destLength
Definition: sisfilerecord.h:91
uint32_t m_destPtr
Definition: sisfilerecord.h:96
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:72
void setMainDrive(char drive)
uint8_t * getDestPtr()
Definition: sisfilerecord.h:45
uint32_t m_sourcePtr
Definition: sisfilerecord.h:90
uint32_t * m_filePtrs
Definition: sisfilerecord.h:97
uint32_t * m_fileLengths
Definition: sisfilerecord.h:92
The top level container of a SIS file.
Definition: sisfile.h:34
SisRC
Return Codes.
Definition: sistypes.h:27