From 75007da068aac10fed90fc5234ab2d50deed3e61 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Thu, 1 Mar 2001 00:22:23 +0000 Subject: Modified icons. Started NLS support. Added kpsion KDE2 application. Unified file-headers. --- lib/rfsv16.h | 231 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 132 insertions(+), 99 deletions(-) (limited to 'lib/rfsv16.h') diff --git a/lib/rfsv16.h b/lib/rfsv16.h index 42661f8..2cd4393 100644 --- a/lib/rfsv16.h +++ b/lib/rfsv16.h @@ -1,5 +1,28 @@ -#ifndef _rfsv16_h_ -#define _rfsv16_h_ +/*-*-c++-*- + * $Id$ + * + * This file is part of plptools. + * + * Copyright (C) 1999 Philip Proudman + * Copyright (C) 1999-2001 Fritz Elfert + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _RFSV16_H_ +#define _RFSV16_H_ #include "rfsv.h" @@ -13,113 +36,123 @@ class rfsvfactory; * @ref rfsv . For a complete documentation, see @ref rfsv . */ class rfsv16 : public rfsv { - friend rfsvfactory; + + /** + * rfsvfactory may call our constructor. + */ + friend rfsvfactory; public: - Enum fopen(const u_int32_t, const char * const, u_int32_t &); - Enum mktemp(u_int32_t &, string &); - Enum fcreatefile(const u_int32_t, const char * const, u_int32_t &); - Enum freplacefile(const u_int32_t, const char * const, u_int32_t &); - Enum fclose(const u_int32_t); - Enum dir(const char * const, PlpDir &); - Enum fgetmtime(const char * const, PsiTime &); - Enum fsetmtime(const char * const, const PsiTime); - Enum fgetattr(const char * const, u_int32_t &); - Enum fgeteattr(const char * const, PlpDirent &); - Enum fsetattr(const char * const, const u_int32_t seta, const u_int32_t unseta); - Enum dircount(const char * const, u_int32_t &); - Enum devlist(u_int32_t &); - Enum devinfo(const u_int32_t, PlpDrive &); - Enum fread(const u_int32_t, unsigned char * const, const u_int32_t, u_int32_t &); - Enum fwrite(const u_int32_t, const unsigned char * const, const u_int32_t, u_int32_t &); - Enum copyFromPsion(const char * const, const char * const, void *, cpCallback_t); - Enum copyToPsion(const char * const, const char * const, void *, cpCallback_t); - Enum copyOnPsion(const char *, const char *, void *, cpCallback_t); - Enum fsetsize(const u_int32_t, const u_int32_t); - Enum fseek(const u_int32_t, const int32_t, const u_int32_t, u_int32_t &); - Enum mkdir(const char * const); - Enum rmdir(const char * const); - Enum rename(const char * const, const char * const); - Enum remove(const char * const); - Enum opendir(const u_int32_t, const char * const, rfsvDirhandle &); - Enum readdir(rfsvDirhandle &, PlpDirent &); - Enum closedir(rfsvDirhandle &); - Enum setVolumeName(const char, const char * const); + Enum fopen(const u_int32_t, const char * const, u_int32_t &); + Enum mktemp(u_int32_t &, string &); + Enum fcreatefile(const u_int32_t, const char * const, u_int32_t &); + Enum freplacefile(const u_int32_t, const char * const, u_int32_t &); + Enum fclose(const u_int32_t); + Enum dir(const char * const, PlpDir &); + Enum fgetmtime(const char * const, PsiTime &); + Enum fsetmtime(const char * const, const PsiTime); + Enum fgetattr(const char * const, u_int32_t &); + Enum fgeteattr(const char * const, PlpDirent &); + Enum fsetattr(const char * const, const u_int32_t seta, const u_int32_t unseta); + Enum dircount(const char * const, u_int32_t &); + Enum devlist(u_int32_t &); + Enum devinfo(const u_int32_t, PlpDrive &); + Enum fread(const u_int32_t, unsigned char * const, const u_int32_t, u_int32_t &); + Enum fwrite(const u_int32_t, const unsigned char * const, const u_int32_t, u_int32_t &); + Enum copyFromPsion(const char * const, const char * const, void *, cpCallback_t); + Enum copyToPsion(const char * const, const char * const, void *, cpCallback_t); + Enum copyOnPsion(const char *, const char *, void *, cpCallback_t); + Enum fsetsize(const u_int32_t, const u_int32_t); + Enum fseek(const u_int32_t, const int32_t, const u_int32_t, u_int32_t &); + Enum mkdir(const char * const); + Enum rmdir(const char * const); + Enum rename(const char * const, const char * const); + Enum remove(const char * const); + Enum opendir(const u_int32_t, const char * const, rfsvDirhandle &); + Enum readdir(rfsvDirhandle &, PlpDirent &); + Enum closedir(rfsvDirhandle &); + Enum setVolumeName(const char, const char * const); - u_int32_t opMode(const u_int32_t); + u_int32_t opMode(const u_int32_t); private: - enum commands { - FOPEN = 0, // File Open - FCLOSE = 2, // File Close - FREAD = 4, // File Read - FDIRREAD = 6, // Read Directory entries - FDEVICEREAD = 8, // Device Information - FWRITE = 10, // File Write - FSEEK = 12, // File Seek - FFLUSH = 14, // Flush - FSETEOF = 16, - RENAME = 18, - DELETE = 20, - FINFO = 22, - SFSTAT = 24, - PARSE = 26, - MKDIR = 28, - OPENUNIQUE = 30, - STATUSDEVICE = 32, - PATHTEST = 34, - STATUSSYSTEM = 36, - CHANGEDIR = 38, - SFDATE = 40, - RESPONSE = 42 - }; + enum commands { + FOPEN = 0, // File Open + FCLOSE = 2, // File Close + FREAD = 4, // File Read + FDIRREAD = 6, // Read Directory entries + FDEVICEREAD = 8, // Device Information + FWRITE = 10, // File Write + FSEEK = 12, // File Seek + FFLUSH = 14, // Flush + FSETEOF = 16, + RENAME = 18, + DELETE = 20, + FINFO = 22, + SFSTAT = 24, + PARSE = 26, + MKDIR = 28, + OPENUNIQUE = 30, + STATUSDEVICE = 32, + PATHTEST = 34, + STATUSSYSTEM = 36, + CHANGEDIR = 38, + SFDATE = 40, + RESPONSE = 42 + }; - enum fopen_attrib { - P_FOPEN = 0x0000, /* Open file */ - P_FCREATE = 0x0001, /* Create file */ - P_FREPLACE = 0x0002, /* Replace file */ - P_FAPPEND = 0x0003, /* Append records */ - P_FUNIQUE = 0x0004, /* Unique file open */ - P_FSTREAM = 0x0000, /* Stream access to a binary file */ - P_FSTREAM_TEXT = 0x0010, /* Stream access to a text file */ - P_FTEXT = 0x0020, /* Record access to a text file */ - P_FDIR = 0x0030, /* Record access to a directory file */ - P_FFORMAT = 0x0040, /* Format a device */ - P_FDEVICE = 0x0050, /* Record access to device name list */ - P_FNODE = 0x0060, /* Record access to node name list */ - P_FUPDATE = 0x0100, /* Read and write access */ - P_FRANDOM = 0x0200, /* Random access */ - P_FSHARE = 0x0400 /* File can be shared */ - }; + enum fopen_attrib { + P_FOPEN = 0x0000, /* Open file */ + P_FCREATE = 0x0001, /* Create file */ + P_FREPLACE = 0x0002, /* Replace file */ + P_FAPPEND = 0x0003, /* Append records */ + P_FUNIQUE = 0x0004, /* Unique file open */ + P_FSTREAM = 0x0000, /* Stream access to a binary file */ + P_FSTREAM_TEXT = 0x0010, /* Stream access to a text file */ + P_FTEXT = 0x0020, /* Record access to a text file */ + P_FDIR = 0x0030, /* Record access to a directory file */ + P_FFORMAT = 0x0040, /* Format a device */ + P_FDEVICE = 0x0050, /* Record access to device name list */ + P_FNODE = 0x0060, /* Record access to node name list */ + P_FUPDATE = 0x0100, /* Read and write access */ + P_FRANDOM = 0x0200, /* Random access */ + P_FSHARE = 0x0400 /* File can be shared */ + }; - enum status_enum { - P_FAWRITE = 0x0001, /* can the file be written to? */ - P_FAHIDDEN = 0x0002, /* set if file is hidden */ - P_FASYSTEM = 0x0004, /* set if file is a system file */ - P_FAVOLUME = 0x0008, /* set if the name is a volume name */ - P_FADIR = 0x0010, /* set if file is a directory file */ - P_FAMOD = 0x0020, /* has the file been modified? */ - P_FAREAD = 0x0100, /* can the file be read? */ - P_FAEXEC = 0x0200, /* is the file executable? */ - P_FASTREAM = 0x0400, /* is the file a byte stream file? */ - P_FATEXT = 0x0800, /* is it a text file? */ - P_FAMASK = 0x0f3f /* All of the above */ - }; + enum status_enum { + P_FAWRITE = 0x0001, /* can the file be written to? */ + P_FAHIDDEN = 0x0002, /* set if file is hidden */ + P_FASYSTEM = 0x0004, /* set if file is a system file */ + P_FAVOLUME = 0x0008, /* set if the name is a volume name */ + P_FADIR = 0x0010, /* set if file is a directory file */ + P_FAMOD = 0x0020, /* has the file been modified? */ + P_FAREAD = 0x0100, /* can the file be read? */ + P_FAEXEC = 0x0200, /* is the file executable? */ + P_FASTREAM = 0x0400, /* is the file a byte stream file? */ + P_FATEXT = 0x0800, /* is it a text file? */ + P_FAMASK = 0x0f3f /* All of the above */ + }; - /** - * Private constructor. Shall be called by - * rfsvfactory only. - */ - rfsv16(ppsocket *); + /** + * Private constructor. Shall be called by + * rfsvfactory only. + */ + rfsv16(ppsocket *); - // Miscellaneous - Enum fopendir(const char * const, u_int32_t &); - u_int32_t attr2std(const u_int32_t); - u_int32_t std2attr(const u_int32_t); + // Miscellaneous + Enum fopendir(const char * const, u_int32_t &); + u_int32_t attr2std(const u_int32_t); + u_int32_t std2attr(const u_int32_t); - // Communication - bool sendCommand(enum commands, bufferStore &); - Enum getResponse(bufferStore &); + // Communication + bool sendCommand(enum commands, bufferStore &); + Enum getResponse(bufferStore &); }; #endif + +/* + * Local variables: + * c-basic-offset: 4 + * End: + */ -- cgit v1.2.3