34typedef std::deque<class PlpDirent>
PlpDir;
242 virtual Enum<errs> fopen(
const uint32_t attr,
const char *
const name, uint32_t &handle) = 0;
304 std::vector<PlpDirent> &files);
370 virtual Enum<errs> fsetattr(
const char *
const name,
const uint32_t seta,
const uint32_t unseta) = 0;
416 virtual Enum<errs> fread(
const uint32_t handle,
unsigned char *
const buffer,
const uint32_t len, uint32_t &count) = 0;
428 virtual Enum<errs> fwrite(
const uint32_t handle,
const unsigned char *
const buffer,
const uint32_t len, uint32_t &count) = 0;
508 virtual Enum<errs> fseek(
const uint32_t handle,
const int32_t offset,
const uint32_t mode, uint32_t &resultpos) = 0;
629 virtual uint32_t
opMode(
const uint32_t mode) = 0;
634 static std::string
convertSlash(
const std::string &name);
A generic container for an array of bytes.
A class representing information about a Disk drive on the psion.
Wrapper class featuring range-checking and string representation of enumerated values.
A class, representing a directory entry of the Psion.
Psion time related utility class.
This is the implementation of the RFSV protocol for Psion series 3 (SIBO) variant.
This is the implementation of the RFSV protocol for Psion series 5 (EPOC) variant.
A helper class for storing intermediate internal information in RFSV16 and RFSV32 .
Access remote file services of a Psion.
virtual Enum< errs > fsetsize(const uint32_t handle, const uint32_t size)=0
Resizes an open file on the Psion.
virtual Enum< RFSV::errs > copyFromPsion(const char *from, int fd, cpCallback_t cb)=0
Copies a file from the Psion to the local machine.
open_flags
The known modes for file open.
virtual Enum< errs > copyOnPsion(const char *const from, const char *const to, void *, cpCallback_t func)=0
Copies a file from the Psion to the Psion.
virtual Enum< errs > fwrite(const uint32_t handle, const unsigned char *const buffer, const uint32_t len, uint32_t &count)=0
Write to a file on the Psion.
virtual Enum< errs > fgetmtime(const char *const name, PsiTime &mtime)=0
Retrieves the modification time of a file on the Psion.
virtual uint32_t opMode(const uint32_t mode)=0
Converts an open-mode (A combination of the PSI_O_ constants.) from generic representation to the mac...
virtual Enum< errs > pathtest(const char *const name)=0
Checks to see if the directory component of a path or file name exists and is valid.
virtual Enum< errs > mktemp(uint32_t &handle, std::string &name)=0
Creates a unique temporary file.
virtual Enum< errs > remove(const char *const name)=0
Removes a file on the Psion.
const char * getConnectName()
Retrieves the PLP protocol name.
virtual Enum< errs > fseek(const uint32_t handle, const int32_t offset, const uint32_t mode, uint32_t &resultpos)=0
Sets the current file position of a file on the Psion.
virtual Enum< errs > opendir(const uint32_t attr, const char *const name, RFSVDirHandle &handle)=0
Open a directory for reading with readdir.
Enum< errs > drives(std::vector< Drive > &drives)
virtual Enum< errs > fopen(const uint32_t attr, const char *const name, uint32_t &handle)=0
Opens a file.
std::string attr2String(const uint32_t attr)
Converts a file attribute RFSV::file_attribs to human readable format, usable for showing them in dir...
virtual Enum< errs > setVolumeName(const char drive, const char *const name)=0
Set the name of a Psion Volume (Drive).
virtual Enum< errs > fread(const uint32_t handle, unsigned char *const buffer, const uint32_t len, uint32_t &count)=0
Reads from a file on the Psion.
virtual Enum< errs > fsetattr(const char *const name, const uint32_t seta, const uint32_t unseta)=0
virtual Enum< errs > copyToPsion(const char *const from, const char *const to, void *, cpCallback_t func)=0
Copies a file from local machine to the Psion.
virtual Enum< errs > fgeteattr(const char *const name, PlpDirent &e)=0
Retrieves attributes, size and modification time of a file on the Psion.
virtual Enum< errs > fcreatefile(const uint32_t attr, const char *const name, uint32_t &handle)=0
Creates a named file.
virtual Enum< errs > fsetmtime(const char *const name, const PsiTime mtime)=0
Sets the modification time of a file on the Psion.
seek_mode
The known modes for seek.
virtual Enum< errs > mkdir(const char *const name)=0
Creates a directory on the Psion.
virtual char defaultInternalDriveLetter()=0
virtual Enum< errs > fclose(const uint32_t handle)=0
Close a file on the Psion whih was previously opened/created by using fopen , fcreatefile ,...
static RFSV * connect(const std::string &host, int port, Enum< ConnectionError > *error)
Enum< errs > getStatus()
Retrieves the current connection status.
virtual Enum< errs > fgetattr(const char *const name, uint32_t &attr)=0
Retrieves attributes of a file on the Psion.
virtual Enum< errs > dir(const char *const name, PlpDir &ret)=0
Reads a directory on the Psion.
virtual Enum< errs > dircount(const char *const name, uint32_t &count)=0
Counts number of entries in a directory.
virtual Enum< errs > freplacefile(const uint32_t attr, const char *const name, uint32_t &handle)=0
Creates an named file, overwriting an existing file.
std::unique_ptr< TCPSocket > socket_
virtual int getProtocolVersion()=0
Retrieves the protocol version.
virtual Enum< errs > rmdir(const char *const name)=0
Removes a directory on the Psion.
virtual Enum< errs > devlist(uint32_t &devbits)=0
Retrieves available drives on the Psion.
virtual Enum< errs > devinfo(const char drive, Drive &dinfo)=0
Retrieves details about a drive.
virtual Enum< errs > readdir(RFSVDirHandle &handle, PlpDirent &entry)=0
Read directory entries.
virtual Enum< errs > closedir(RFSVDirHandle &handle)=0
Close a directory, previously opened with opendir.
static std::string convertSlash(const std::string &name)
Utility method, converts '/' to '\'.
virtual Enum< errs > rename(const char *const oldname, const char *const newname)=0
Renames a file on the Psion.
int getSpeed()
Retrieve speed of serial link.
errs
The known error codes.
virtual Enum< errs > copyFromPsion(const char *from, const char *to, void *context, cpCallback_t func)=0
Copies a file from the Psion to the local machine.
file_attribs
The known file attributes.
@ PSI_A_NORMAL
Attributes, valid on EPOC only.
@ PSI_A_READ
Attributes, valid on SIBO only.
@ PSI_A_RDONLY
Attributes, valid on both EPOC and SIBO.
open_mode
The known modes for file creation.
A class for dealing with sockets.
int(* cpCallback_t)(void *, uint32_t)
Defines the callback procedure for progress indication of copy operations.
std::deque< class PlpDirent > PlpDir
static void error(int line)