aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rpcs16.cc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2000-08-02 18:26:29 +0000
committerFritz Elfert <felfert@to.com>2000-08-02 18:26:29 +0000
commitd439bc3807b3f7cea0544899ee5fc8d849bf32df (patch)
tree5c28e89d19cc8c5cf7759dc4ae0082e21151fe0a /lib/rpcs16.cc
parent83757d37b7cfb7ef6da178a26b9a203d1b65e0af (diff)
downloadplptools-d439bc3807b3f7cea0544899ee5fc8d849bf32df.tar.gz
plptools-d439bc3807b3f7cea0544899ee5fc8d849bf32df.tar.bz2
plptools-d439bc3807b3f7cea0544899ee5fc8d849bf32df.zip
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.
Diffstat (limited to 'lib/rpcs16.cc')
-rw-r--r--lib/rpcs16.cc14
1 files changed, 6 insertions, 8 deletions
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<rfsv::errs> 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<rfsv::errs> res = getResponse(a);
cout << dec << "qd: " << res << " " << a.getLen() << " a="<< a << endl;
- if (res)
- return res;
return res;
}
-int rpcs16::
+Enum<rfsv::errs> rpcs16::
getCmdLine(const char *process, bufferStore &ret)
{
- return 0;
+ return rfsv::E_PSI_GEN_NONE;
}