plptools
Loading...
Searching...
No Matches
sisinstaller.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#pragma once
21
22#include "sistypes.h"
23
24#include <sys/types.h>
25
26class Psion;
27class SISFile;
28class SISFileLink;
29class SISFileRecord;
30
36{
37public:
38
40
41 virtual ~SISInstaller();
42
43 SisRC run(SISFile* file, uint8_t* buf, off_t len);
44
45 SisRC run(SISFile* file, uint8_t* buf, off_t len, SISFile* parent);
46
50 void selectDrive();
51
57 void setInstalled(SISFileLink* installed)
58 {
59 m_installed = installed;
60 }
61
65 void setPsion(Psion* psion);
66
67private:
68
69 char m_drive;
70
72
74
75 uint8_t* m_buf;
76
78
80
82
84
85 enum {
89 };
90
94 void copyBuf(const uint8_t* buf, int len, char* name);
95
99 void copyFile(SISFileRecord* fileRecord);
100
101 void createDirs(char* filename);
102
103 int installFile(SISFileRecord* fileRecord);
104
106
107 void loadPsionSis(const char* name);
108
109 void removeFile(SISFileRecord* fileRecord);
110
111 void uninstall(SISFile* sisFile);
112
113 void uninstallFile(SISFileRecord* fileRecord);
114
115};
Semi smart proxy for communicating with a Psion.
Definition: psion.h:33
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
A minimal SIS installer.
Definition: sisinstaller.h:36
void selectDrive()
Ask the user which drive to install to.
void loadPsionSis(const char *name)
SISFileLink * m_installed
Definition: sisinstaller.h:79
void removeFile(SISFileRecord *fileRecord)
virtual ~SISInstaller()
void copyBuf(const uint8_t *buf, int len, char *name)
Store the contents of a buffer in a file on the Psion.
bool m_ownInstalled
Definition: sisinstaller.h:83
void setPsion(Psion *psion)
Set the Psion manager.
SISFile * m_file
Definition: sisinstaller.h:77
Psion * m_psion
Definition: sisinstaller.h:73
void uninstallFile(SISFileRecord *fileRecord)
int installFile(SISFileRecord *fileRecord)
void createDirs(char *filename)
SisRC run(SISFile *file, uint8_t *buf, off_t len)
void copyFile(SISFileRecord *fileRecord)
Copy a file to the Psion.
void uninstall(SISFile *sisFile)
uint8_t * m_buf
Definition: sisinstaller.h:75
SisRC loadInstalled()
void setInstalled(SISFileLink *installed)
Set the base pointer to the list of already installed applications, so we don't have to scan it for e...
Definition: sisinstaller.h:57
SisRC
Return Codes.
Definition: sistypes.h:27