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
21#ifndef _SISINSTALLER_H
22#define _SISINSTALLER_H
23
24#include "sistypes.h"
25
26#include <sys/types.h>
27
28class Psion;
29class SISFile;
30class SISFileLink;
31class SISFileRecord;
32
38{
39public:
40
42
43 virtual ~SISInstaller();
44
45 SisRC run(SISFile* file, uint8_t* buf, off_t len);
46
47 SisRC run(SISFile* file, uint8_t* buf, off_t len, SISFile* parent);
48
52 void selectDrive();
53
59 void setInstalled(SISFileLink* installed)
60 {
61 m_installed = installed;
62 }
63
67 void setPsion(Psion* psion);
68
69private:
70
71 char m_drive;
72
74
76
77 uint8_t* m_buf;
78
80
82
84
86
87 enum {
91 };
92
96 void copyBuf(const uint8_t* buf, int len, char* name);
97
101 void copyFile(SISFileRecord* fileRecord);
102
103 void createDirs(char* filename);
104
105 int installFile(SISFileRecord* fileRecord);
106
108
109 void loadPsionSis(const char* name);
110
111 void removeFile(SISFileRecord* fileRecord);
112
113 void uninstall(SISFile* sisFile);
114
115 void uninstallFile(SISFileRecord* fileRecord);
116
117};
118
119#endif
120
Semi smart proxy for communicating with a Psion.
Definition: psion.h:36
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
A minimal SIS installer.
Definition: sisinstaller.h:38
void selectDrive()
Ask the user which drive to install to.
void loadPsionSis(const char *name)
SISFileLink * m_installed
Definition: sisinstaller.h:81
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:85
void setPsion(Psion *psion)
Set the Psion manager.
SISFile * m_file
Definition: sisinstaller.h:79
Psion * m_psion
Definition: sisinstaller.h:75
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:77
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:59
SisRC
Return Codes.
Definition: sistypes.h:29