From a7e4250b20fa5012942c4fe05ee0c7f701c5799f Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sun, 4 Feb 2001 04:23:06 +0000 Subject: Cleaned up ppsocket. More 64bit-related stuff. --- lib/rfsv.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'lib/rfsv.h') diff --git a/lib/rfsv.h b/lib/rfsv.h index 03ed36f..0cfe7b2 100644 --- a/lib/rfsv.h +++ b/lib/rfsv.h @@ -11,17 +11,17 @@ typedef deque PlpDir; class ppsocket; -const long RFSV_SENDLEN = 2000; +const int RFSV_SENDLEN = 2000; /** * Defines the callback procedure for * progress indication of copy operations. */ -typedef int (*cpCallback_t)(void *, long); +typedef int (*cpCallback_t)(void *, u_int32_t); class rfsvDirhandle { public: - unsigned long h; + u_int32_t h; bufferStore b; }; @@ -198,7 +198,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fopen(const long attr, const char * const name, long &handle) = 0; + virtual Enum fopen(const u_int32_t attr, const char * const name, u_int32_t &handle) = 0; /** * Creates a unique temporary file. @@ -210,7 +210,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum mktemp(long &handle, char * const name) = 0; + virtual Enum mktemp(u_int32_t &handle, string &name) = 0; /** * Creates a named file. @@ -223,7 +223,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fcreatefile(const long attr, const char * const name, long &handle) = 0; + virtual Enum fcreatefile(const u_int32_t attr, const char * const name, u_int32_t &handle) = 0; /** * Creates an named file, overwriting an existing file. @@ -236,7 +236,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum freplacefile(const long attr, const char * const name, long &handle) = 0; + virtual Enum freplacefile(const u_int32_t attr, const char * const name, u_int32_t &handle) = 0; /** * Close a file on the Psion whih was previously opened/created by using @@ -244,7 +244,7 @@ class rfsv { * * @param handle A valid file handle. */ - virtual Enum fclose(const long handle) = 0; + virtual Enum fclose(const u_int32_t handle) = 0; /** * Reads a directory on the Psion. @@ -286,7 +286,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fgetattr(const char * const name, long &attr) = 0; + virtual Enum fgetattr(const char * const name, u_int32_t &attr) = 0; /** * Retrieves attributes, size and modification time of a file on the Psion. @@ -303,7 +303,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fsetattr(const char * const name, const long seta, const long unseta) = 0; + virtual Enum fsetattr(const char * const name, const u_int32_t seta, const u_int32_t unseta) = 0; /** * Counts number of entries in a directory. @@ -313,7 +313,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum dircount(const char * const name, long &count) = 0; + virtual Enum dircount(const char * const name, u_int32_t &count) = 0; /** * Retrieves available drives on the Psion. @@ -323,7 +323,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum devlist(long &devbits) = 0; + virtual Enum devlist(u_int32_t &devbits) = 0; /** * Retrieves details about a drive. @@ -334,11 +334,11 @@ class rfsv { * @param total On return, the total capacity in bytes is returned here. * @param attr On return, the attributes of the drive are returned here. * @param uniqueid On return, the unique Id of the drive is returned here. - * @param name On return, the volume name is copied to this pointer's destination. + * @param name On return, the volume name returned here. * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum devinfo(const int dev, long &free, long &total, long &attr, long &uniqueid, char * const name) = 0; + virtual Enum devinfo(const u_int32_t dev, u_int32_t &free, u_int32_t &total, u_int32_t &attr, u_int32_t &uniqueid, string &name) = 0; /** * Reads from a file on the Psion. @@ -350,7 +350,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fread(const long handle, unsigned char * const buffer, const long len, long &count) = 0; + virtual Enum fread(const u_int32_t handle, unsigned char * const buffer, const u_int32_t len, u_int32_t &count) = 0; /** * Write to a file on the Psion. @@ -362,7 +362,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fwrite(const long handle, const unsigned char * const buffer, const long len, long &count) = 0; + virtual Enum fwrite(const u_int32_t handle, const unsigned char * const buffer, const u_int32_t len, u_int32_t &count) = 0; /** * Copies a file from the Psion to the local machine. @@ -418,7 +418,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fsetsize(const long handle, const long size) = 0; + virtual Enum fsetsize(const u_int32_t handle, const u_int32_t size) = 0; /** * Sets the current file position of a file on the Psion. @@ -430,7 +430,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum fseek(const long handle, const long offset, const long mode, long &resultpos) = 0; + virtual Enum fseek(const u_int32_t handle, const int32_t offset, const u_int32_t mode, u_int32_t &resultpos) = 0; /** * Creates a directory on the Psion. @@ -479,7 +479,7 @@ class rfsv { * * @returns A Psion error code (One of enum @ref #errs ). */ - virtual Enum opendir(const long attr, const char * const name, rfsvDirhandle &handle) = 0; + virtual Enum opendir(const u_int32_t attr, const char * const name, rfsvDirhandle &handle) = 0; /** * Read directory entries. @@ -540,7 +540,7 @@ class rfsv { * @returns Pointer to static textual representation of file attributes. * */ - string attr2String(const long attr); + string attr2String(const u_int32_t attr); /** * Converts an open-mode (A combination of the PSI_O_ constants.) @@ -551,7 +551,7 @@ class rfsv { * @returns The machine specific representation for use with * @ref fopen , @ref fcreatefile and @freplacefile. */ - virtual long opMode(const long mode) = 0; + virtual u_int32_t opMode(const u_int32_t mode) = 0; /** * Utility method, converts '/' to '\'. @@ -568,7 +568,7 @@ protected: ppsocket *skt; Enum status; - int serNum; + int32_t serNum; }; #endif -- cgit v1.2.3