From d439bc3807b3f7cea0544899ee5fc8d849bf32df Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Wed, 2 Aug 2000 18:26:29 +0000 Subject: Added a wrapper for enums and changed all return-code related stuff as well as some other enums to use that instead of plain enums. This results in stronger type checking, range checking and the ability to write an enum's textual representation. --- lib/rpcs16.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib/rpcs16.cc') diff --git a/lib/rpcs16.cc b/lib/rpcs16.cc index d8d75cf..57963e2 100644 --- a/lib/rpcs16.cc +++ b/lib/rpcs16.cc @@ -40,27 +40,25 @@ rpcs16::~rpcs16() { bufferStore a; a.addStringT("Close"); - if (status == E_PSI_GEN_NONE) + if (status == rfsv::E_PSI_GEN_NONE) skt->sendBufferStore(a); skt->closeSocket(); } -int rpcs16:: +Enum rpcs16:: queryDrive(char drive, bufferArray &ret) { bufferStore a; a.addByte(drive); if (!sendCommand(rpcs::QUERY_DRIVE, a)) - return rpcs::E_PSI_FILE_DISC; - long res = getResponse(a); + return rfsv::E_PSI_FILE_DISC; + Enum res = getResponse(a); cout << dec << "qd: " << res << " " << a.getLen() << " a="<< a << endl; - if (res) - return res; return res; } -int rpcs16:: +Enum rpcs16:: getCmdLine(const char *process, bufferStore &ret) { - return 0; + return rfsv::E_PSI_GEN_NONE; } -- cgit v1.2.3