From 23f25b04b95f08f5fc3aeaf9ea745326246dec9f Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Mon, 18 Mar 2002 05:01:40 +0000 Subject: - made kpsion SIBO-aware - Added SIBO-related stuff in PsiTime - Added new class PsiProcess, renamed rpcs:queryDrive to queryPrograms and changed it accordingly - Adapted kspion, plpbackup, plpnfsd and plpftp to use queryPrograms - Several cleanups in rfsv16 --- lib/rpcs.h | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'lib/rpcs.h') diff --git a/lib/rpcs.h b/lib/rpcs.h index 5a64013..9d1e736 100644 --- a/lib/rpcs.h +++ b/lib/rpcs.h @@ -3,7 +3,7 @@ * * This file is part of plptools. * - * Copyright (C) 1999-2001 Fritz Elfert + * Copyright (C) 1999-2002 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 @@ -23,7 +23,9 @@ #ifndef _RPCS_H_ #define _RPCS_H_ +#include #include +#include #include #include @@ -31,6 +33,8 @@ class ppsocket; class bufferStore; class bufferArray; +typedef vector processList; + /** * Remote procedure call services via PLP * @@ -312,20 +316,32 @@ public: */ Enum quitServer(void); - // API different on SIBO and EPOC - virtual Enum queryDrive(const char, bufferArray &) = 0; + /** + * Retrieves a list of all running Programs. + * + * This function works with both SIBO and EPOC. + * + * @param ret The list of currently running processes is returned here. + * + * @returns A psion error code. 0 = Ok. + */ + Enum queryPrograms(processList &ret); + /** * Retrieves the command line of a running process. * - * This function works with EPOC only. Using it with SIBO - * machines, returns always an error code E_PSI_NOT_SIBO. + * This function works with both SIBO and EPOC. + * Note: @ref rfsv::getPrograms calls this method internally and sets + * the args member of @ref PsiProcess , so you usually don't have to call + * this method yourself. * * @param process Name of process. Format: processname.$pid * @param ret The program name and arguments are returned here. * * @return Psion error code. 0 = Ok. */ - virtual Enum getCmdLine(const char *process, bufferStore &ret) = 0; + virtual Enum getCmdLine(const char *process, string &ret) = 0; + /** * Retrieve general Information about the connected * machine. @@ -337,6 +353,7 @@ public: * @return Psion error code. 0 = Ok. */ virtual Enum getMachineInfo(machineInfo &) { return rfsv::E_PSI_NOT_SIBO;} + virtual Enum closeHandle(int) { return rfsv::E_PSI_NOT_SIBO;} virtual Enum regOpenIter(u_int32_t, char *, u_int16_t &) { return rfsv::E_PSI_NOT_SIBO;} virtual Enum regReadIter(u_int16_t) { return rfsv::E_PSI_NOT_SIBO;} @@ -393,6 +410,12 @@ protected: QUIT_SERVER = 0xff }; + /** + * Flag: getMachineType and getMachineInfo have been called and the + * machine is an S5mx. + */ + int mtCacheS5mx; + /** * Sends a command to the remote side. * -- cgit v1.2.3