|
|
Access remote file services of a Psion.
rfsv provides an API for accessing file services of a Psion connected via ncpd. This class defines the interface and a small amount of common constants and methods. The majority of implementation is provided by rfsv32 and rfsv16 , which implement the variations of the protocol for EPOC and SIBO respectively. Usually, the class rfsvfactory is used to instantiate the correct variant depending on the remote machine, currently connected.
enum |
The kown modes for seek.
enum |
The known modes for file open.
enum |
The known modes for file creation.
enum |
The known error codes.
enum |
The known file attributes
~ |
[virtual]
void |
void |
Enum<errs> |
Retrieves the current connection status.
Returns: The status of the connection.
Enum<errs> |
[pure virtual]
Opens a file.
Parameters:
attr | The open mode. Use opMode to convert a combination of open_flags and open_mode to the machine-specific representation. |
name | The name of the file to open. |
handle | The handle for usage with fread , fwrite , fseek or fclose is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Creates a unique temporary file. The file is opened for reading and writing.
Parameters:
handle | The handle for usage with fread , fwrite , fseek or fclose is returned here. |
name | The name of the temporary file is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Creates a named file.
Parameters:
attr | The open mode. Use opMode to convert a combination of open_flags and open_mode to the machine-specific representation. |
name | The name of the file to create. |
handle | The handle for usage with fread , fwrite , fseek or fclose is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Creates an named file, overwriting an existing file.
Parameters:
attr | The open mode. Use opMode to convert a combination of open_flags and open_mode to the machine-specific representation. |
name | The name of the file to create. |
handle | The handle for usage with fread , fwrite , fseek or fclose is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Close a file on the Psion whih was previously opened/created by using fopen , fcreatefile , freplacefile or mktemp .
Parameters:
handle | A valid file handle. |
Enum<errs> |
[pure virtual]
Reads a directory on the Psion. The returned STL deque of PlpDirent contains all requested directory entries.
Parameters:
name | The name of the directory |
ret | An STL deque of PlpDirent entries. |
Returns: A Psion error code (One of enum rfsv::errs ).
Enum<errs> |
[pure virtual]
Retrieves the modification time of a file on the Psion.
Parameters:
name | Name of the file. |
mtime | Modification time is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Sets the modification time of a file on the Psion.
Parameters:
name | Name of the file whose modification time should be set. |
mtime | The desired modification time. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Retrieves attributes of a file on the Psion.
Parameters:
name | Name of the file whose attributes ar to be retrieved. |
attr | The file's attributes are returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Retrieves attributes, size and modification time of a file on the Psion.
Parameters:
name | The name of the file. |
e | PlpDirent object, filled with the information on return. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Counts number of entries in a directory.
Parameters:
name | The directory whose entries are to be counted. |
count | The number of entries is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Retrieves available drives on the Psion.
devbits
On return, for every exiting drive, a bit is set in this
variable. The lowest bit represents drive A:.
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Retrieves details about a drive.
Parameters:
drive | The drive character of the drive to get details from (e.g: 'C', 'D' etc.). (0 represents A:, 1 is B: and so on ...) |
dinfo | A PlpDrive object which is filled with the drive's information upon return. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Reads from a file on the Psion.
Parameters:
handle | Handle of the file to read from. |
buffer | The area where to store the data read. |
len | The number of bytes to read. |
count | The number of bytes actually read is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Write to a file on the Psion.
Parameters:
handle | Handle of the file to read from. |
buffer | The area to be written. |
len | The number of bytes to write. |
count | The number of bytes actually written is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Copies a file from the Psion to the local machine.
Parameters:
from | Name of the file on the Psion to be copied. |
to | Name of the destination file on the local machine. |
func | Pointer to a function which gets called on every read. This function can be used to show some progress etc. May be set to NULL, where no callback is performed. If the callback function returns 0, the operation is aborted and E_PSI_FILE_CANCEL is returned. |
Returns: A Psion error code (One of enum errs ).
Enum<rfsv::errs> |
[pure virtual]
Copies a file from the Psion to the local machine.
Enum<errs> |
[pure virtual]
Copies a file from local machine to the Psion.
Parameters:
from | Name of the file on the local machine to be copied. |
to | Name of the destination file on the Psion. |
func | Pointer to a function which gets called on every read. This function can be used to show some progress etc. May be set to NULL, where no callback is performed. If the callback function returns 0, the operation is aborted and E_PSI_FILE_CANCEL is returned. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Copies a file from the Psion to the Psion. On the EPOC variants, this runs much faster than reading data from the Psion and then writing it back to the Psion, since data transfer is handled locally on the Psion.
Parameters:
from | Name of the file to be copied. |
to | Name of the destination file. |
func | Pointer to a function which gets called on every read. This function can be used to show some progress etc. May be set to NULL, where no callback is performed. If the callback function returns 0, the operation is aborted and E_PSI_FILE_CANCEL is returned. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Resizes an open file on the Psion. If the new size is greater than the file's current size, the contents of the added data is undefined. If The new size is smaller, the file is truncated.
Parameters:
handle | Handle of the file to be resized. |
size | New size for that file. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Sets the current file position of a file on the Psion.
Parameters:
handle | The file handle. |
offset | Position to be seeked to. |
mode | The mode for seeking. |
resultpos | The final file position after seeking is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Creates a directory on the Psion.
Parameters:
name | Name of the directory to be created. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Removes a directory on the Psion.
Parameters:
name | Name of the directory to be removed. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Renames a file on the Psion.
Parameters:
oldname | Name of the file to be renamed. |
newname | New Name for that file. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Removes a file on the Psion.
Parameters:
name | Name of the file to be removed. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Open a directory for reading with readdir.
Parameters:
attr | A combination of PSI_A_.. flags, representing the desired types of entries to be returned when calling readdir . |
name | The name of the directory |
handle | A handle to be used with readdir and closedir . |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Read directory entries. This method reads entries of a directory, previously opened with opendir .
Parameters:
handle | A handle, obtained by calling opendir . |
entry | The entry information is returned here. |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Close a directory, previously opened with opendir.
Parameters:
handle | A handle, obtained by calling opendir . |
Returns: A Psion error code (One of enum errs ).
Enum<errs> |
[pure virtual]
Set the name of a Psion Volume (Drive).
Parameters:
drive | The drive character of the Volume, whose name should be set. |
name | The new name for that drive. |
Returns: A Psion error code (One of enum errs ).
std::string |
Converts a file attribute rfsv::file_attribs to human readable format, usable for showing them in directory listings. The first 7 characters are common to all machine types:
Char Nr. Value 0 'd' if a directory, '-' otherwise. 1 'r' if file is readable, '-' otherwise. 2 'w' if file is writeable, '-' otherwise. 3 'h' if file is hidden, '-' otherwise. 4 's' if file is a system file, '-' otherwise. 5 'a' if file is modified (archive flag), '-' otherwise. 6 'v' if file is a volume name, '-' otherwise.
The rest (3 characters) are machine specific:
Char Nr. EPOC Value SIBO Value 7 'n' if normal, 'x' if executable, '-' otherwise. 8 't' if temporary, 'b' if a stream, '-' otherwise. 8 'c' if compressed, 't' if a textfile, '-' otherwise.
Parameters:
attr | the generic file attribute. |
Returns: Pointer to static textual representation of file attributes.
u_int32_t |
[pure virtual]
Converts an open-mode (A combination of the PSI_O_ constants.) from generic representation to the machine-specific representation.
Parameters:
mode | The generic open mode. |
Returns: The machine specific representation for use with fopen , fcreatefile and @freplacefile.
std::string |
[static]
Utility method, converts '/' to '\'.
int |
Retrieve speed of serial link.
Returns: The speed of the serial link in baud or -1 on error.
int |
[pure virtual]
Retrieves the protocol version.
Returns: Either 3 or 5 representing Series 3 (SIBO) or Series 5 (EPOC)
const char * |
[protected]
Retrieves the PLP protocol name. Mainly internal use.
Returns: The connection name always "SYS$RFSV"
ppsocket * |
[protected]
Enum<errs> |
[protected]
int32_t |
[protected]
Generated by: felfert@usw-pr-shell1.sourceforge.net on Sat Aug 10 18:46:04 2002, using kdoc 2.0a36. |