plptools
Loading...
Searching...
No Matches
fakepsion.cpp
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}
30
31bool
33{
34 return true;
35}
36
38FakePsion::copyToPsion(const char * const from, const char * const to,
39 void *, cpCallback_t func)
40{
41 if (logLevel >= 1)
42 printf(" -- Not really copying %s to %s\n", from, to);
44}
45
47FakePsion::devinfo(const char drive, PlpDrive& plpDrive)
48{
50}
51
53FakePsion::devlist(uint32_t& devbits)
54{
56}
57
59FakePsion::dir(const char* dir, PlpDir& files)
60{
62}
63
64bool
65FakePsion::dirExists(const char* name)
66{
67 return true;
68}
69
70void
72{
73}
74
76FakePsion::mkdir(const char* dir)
77{
78 if (logLevel >= 1)
79 printf(" -- Not really creating dir %s\n", dir);
81}
82
83void
84FakePsion::remove(const char* name)
85{
86}
87
Wrapper class featuring range-checking and string representation of enumerated values.
Definition: Enum.h:136
virtual Enum< rfsv::errs > copyToPsion(const char *const from, const char *const to, void *, cpCallback_t func)
Definition: fakepsion.cpp:38
virtual Enum< rfsv::errs > devlist(uint32_t &devbits)
Definition: fakepsion.cpp:53
virtual Enum< rfsv::errs > mkdir(const char *dir)
Definition: fakepsion.cpp:76
virtual bool connect()
Definition: fakepsion.cpp:32
virtual Enum< rfsv::errs > dir(const char *dir, PlpDir &files)
Definition: fakepsion.cpp:59
virtual void disconnect()
Definition: fakepsion.cpp:71
virtual ~FakePsion()
Definition: fakepsion.cpp:27
virtual bool dirExists(const char *name)
Definition: fakepsion.cpp:65
virtual Enum< rfsv::errs > devinfo(const char drive, PlpDrive &plpDrive)
Definition: fakepsion.cpp:47
virtual void remove(const char *name)
Definition: fakepsion.cpp:84
A class representing information about a Disk drive on the psion.
Definition: plpdirent.h:196
@ E_PSI_GEN_NONE
Definition: rfsv.h:110
@ E_PSI_GEN_FAIL
Definition: rfsv.h:111
int(* cpCallback_t)(void *, uint32_t)
Defines the callback procedure for progress indication of copy operations.
Definition: rfsv.h:42
std::deque< class PlpDirent > PlpDir
Definition: rfsv.h:31
int logLevel
Definition: sistypes.cpp:25