aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rpcs.h
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-03-18 05:01:40 +0000
committerFritz Elfert <felfert@to.com>2002-03-18 05:01:40 +0000
commit23f25b04b95f08f5fc3aeaf9ea745326246dec9f (patch)
treedbd68bb6a5e228efa95dbfb18fa69c563925163c /lib/rpcs.h
parent38fc74f68c90aff4909660b89a9c233eac16f626 (diff)
downloadplptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.tar.gz
plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.tar.bz2
plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.zip
- 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
Diffstat (limited to 'lib/rpcs.h')
-rw-r--r--lib/rpcs.h35
1 files changed, 29 insertions, 6 deletions
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 <felfert@to.com>
+ * Copyright (C) 1999-2002 Fritz Elfert <felfert@to.com>
*
* 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 <vector>
#include <psitime.h>
+#include <psiprocess.h>
#include <rfsv.h>
#include <Enum.h>
@@ -31,6 +33,8 @@ class ppsocket;
class bufferStore;
class bufferArray;
+typedef vector<PsiProcess> processList;
+
/**
* Remote procedure call services via PLP
*
@@ -312,20 +316,32 @@ public:
*/
Enum<rfsv::errs> quitServer(void);
- // API different on SIBO and EPOC
- virtual Enum<rfsv::errs> 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<rfsv::errs> 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<rfsv::errs> getCmdLine(const char *process, bufferStore &ret) = 0;
+ virtual Enum<rfsv::errs> 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<rfsv::errs> getMachineInfo(machineInfo &) { return rfsv::E_PSI_NOT_SIBO;}
+
virtual Enum<rfsv::errs> closeHandle(int) { return rfsv::E_PSI_NOT_SIBO;}
virtual Enum<rfsv::errs> regOpenIter(u_int32_t, char *, u_int16_t &) { return rfsv::E_PSI_NOT_SIBO;}
virtual Enum<rfsv::errs> 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.
*