plptools
Loading...
Searching...
No Matches
fakepsion.cc
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#include "config.h"
21
22#include "fakepsion.h"
23#include "sistypes.h"
24
25#include <stdio.h>
26
28}
29
31 return true;
32}
33
34Enum<RFSV::errs> FakePsion::copyToPsion(const char * const from, const char * const to, void *, cpCallback_t func) {
35 (void)func;
36 if (logLevel >= 1) {
37 printf(" -- Not really copying %s to %s\n", from, to);
38 }
40}
41
42Enum<RFSV::errs> FakePsion::devinfo(const char drive, Drive& plpDrive) {
43 (void)drive;
44 (void)plpDrive;
46}
47
49 (void)devbits;
51}
52
53Enum<RFSV::errs> FakePsion::dir(const char* dir, PlpDir& files) {
54 (void) dir;
55 (void) files;
57}
58
59bool FakePsion::dirExists(const char* name) {
60 (void)name;
61 return true;
62}
63
65}
66
68 (void)dir;
69 if (logLevel >= 1) {
70 printf(" -- Not really creating dir %s\n", dir);
71 }
73}
74
75void FakePsion::remove(const char* name) {
76 (void)name;
77}
A class representing information about a Disk drive on the psion.
Definition: drive.h:51
Wrapper class featuring range-checking and string representation of enumerated values.
Definition: Enum.h:135
virtual bool connect()
Definition: fakepsion.cc:30
virtual Enum< RFSV::errs > mkdir(const char *dir)
Definition: fakepsion.cc:67
virtual Enum< RFSV::errs > devlist(uint32_t &devbits)
Definition: fakepsion.cc:48
virtual void disconnect()
Definition: fakepsion.cc:64
virtual ~FakePsion()
Definition: fakepsion.cc:27
virtual Enum< RFSV::errs > devinfo(const char drive, Drive &plpDrive)
Definition: fakepsion.cc:42
virtual Enum< RFSV::errs > dir(const char *dir, PlpDir &files)
Definition: fakepsion.cc:53
virtual bool dirExists(const char *name)
Definition: fakepsion.cc:59
virtual Enum< RFSV::errs > copyToPsion(const char *const from, const char *const to, void *, cpCallback_t func)
Definition: fakepsion.cc:34
virtual void remove(const char *name)
Definition: fakepsion.cc:75
@ E_PSI_GEN_FAIL
Definition: rfsv.h:115
@ E_PSI_GEN_NONE
Definition: rfsv.h:114
int(* cpCallback_t)(void *, uint32_t)
Defines the callback procedure for progress indication of copy operations.
Definition: rfsv.h:45
std::deque< class PlpDirent > PlpDir
Definition: rfsv.h:34
int logLevel
Definition: sistypes.cpp:25