41 stringRep.
add(
rpcs::PSI_MACH_S3A,
N_("Series 3
a, 3c or 3mx"));
42 stringRep.
add(
rpcs::PSI_MACH_WORKABOUT,
N_("Workabout"));
51 stringRep.
add(
rpcs::PSI_BATT_VERYLOW,
N_("Very Low"));
66 stringRep.
add(
rpcs::PSI_LANG_no_NO,
N_("Norwegian"));
68 stringRep.
add(
rpcs::PSI_LANG_en_US,
N_("American"));
69 stringRep.
add(
rpcs::PSI_LANG_fr_CH,
N_("Swiss French"));
70 stringRep.
add(
rpcs::PSI_LANG_de_CH,
N_("Swiss German"));
71 stringRep.
add(
rpcs::PSI_LANG_pt_PT,
N_("Portugese"));
73 stringRep.
add(
rpcs::PSI_LANG_is_IS,
N_("Icelandic"));
75 stringRep.
add(
rpcs::PSI_LANG_hu_HU,
N_("Hungarian"));
77 stringRep.
add(
rpcs::PSI_LANG_nl_BE,
N_("Belgian Flemish"));
78 stringRep.
add(
rpcs::PSI_LANG_en_AU,
N_("Australian"));
79 stringRep.
add(
rpcs::PSI_LANG_fr_BE,
N_("Belgish French"));
80 stringRep.
add(
rpcs::PSI_LANG_de_AT,
N_("Austrian"));
81 stringRep.
add(
rpcs::PSI_LANG_en_NZ,
N_("New Zealand English"));
82 stringRep.
add(
rpcs::PSI_LANG_fr_CA,
N_("Canadian French"));
86 stringRep.
add(
rpcs::PSI_LANG_sl_SI,
N_("Slovenian"));
113 if (!strcmp(
a.getString(0),
"Ok"))
161 if (statusIsFirstByte) {
193 major =
a.getByte(0);
194 minor =
a.getByte(1);
203 a.addStringT(program);
204 int l = strlen(program);
205 for (
int i = 127; i > l; i--)
214 a.addByte(strlen(args)+1);
229 a.addStringT(program);
240 a.addStringT(program);
252 bool anySuccess =
false;
261 drives =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
298 a.discardFirstBytes(sl);
299 if ((p = strstr((
char *)s,
".$"))) {
301 sscanf(p,
"%d", &pid);
306 sl = strlen(
a.getString(0)) + 1;
308 a.discardFirstBytes(sl);
313 if (anySuccess && !ret.empty())
314 for (processList::iterator i = ret.begin(); i != ret.end(); i++) {
317 i->setArgs(cmdline +
" " + i->getArgs());
323formatOpen(
const char drive,
int &handle,
int &count)
328 a.addByte(toupper(drive));
337 handle =
a.getWord(0);
338 count =
a.getWord(2);
382 type = (
enum machs)
a.getWord(0);
392fuser(
const char *name,
char *buf,
int maxlen)
403 strncpy(buf,
a.getString(0), maxlen - 1);
404 while ((p = strchr(buf, 6)))
#define ENUM_DEFINITION_END(EnumName)
#define ENUM_DEFINITION_BEGIN(EnumName, initWith)
Helper macro to construct an enumeration wrapper Enum<E> for a specific enum type.
Wrapper class featuring range-checking and string representation of enumerated values.
A class, describing a Process on the Psion.
virtual bool reconnect()
Reopens the connection after closing it.
int getBufferStore(bufferStore &a, bool wait=true)
Receive data into a bufferStore .
bool sendBufferStore(const bufferStore &a)
Sends data from a bufferStore .
A generic container for an array of bytes.
void discardFirstBytes(int len=0)
Removes bytes from the start of the buffer.
void init()
Initializes the bufferStore.
const char * getString(long pos=0) const
Retrieves the characters at index pos.
unsigned long getLen() const
Retrieves the length of a bufferStore.
unsigned char getByte(long pos=0) const
Retrieves the byte at index pos.
errs
The known error codes.
Remote procedure call services via PLP.
Enum< rfsv::errs > getNCPversion(int &major, int &minor)
Retrieves the version of the NCP protocol on the remote side.
machs
The known machine types.
virtual Enum< rfsv::errs > getMachineInfo(machineInfo &machineInfo)
Retrieve general Information about the connected machine.
Enum< rfsv::errs > formatRead(int handle)
Continues a running format.
Enum< rfsv::errs > status
The current status of the connection.
Enum< rfsv::errs > stopProgram(const char *program)
Requests termination of a program running on the remote machine.
virtual Enum< rfsv::errs > getCmdLine(const char *process, std::string &ret)=0
Retrieves the command line of a running process.
TCPSocket * skt
The socket, used for communication with ncpd.
Enum< rfsv::errs > fuser(const char *name, char *buf, int maxlen)
Retrieves the name of a process, having a given file opened on the remote side.
bool sendCommand(enum commands cc, bufferStore &data)
Sends a command to the remote side.
Enum< rfsv::errs > queryProgram(const char *)
const char * getConnectName()
Enum< rfsv::errs > queryPrograms(processList &ret)
Retrieves a list of all running Programs.
commands
The possible commands.
Enum< rfsv::errs > getMachineType(Enum< machs > &type)
Retrieves the type of machine on the remote side as defined in machs.
Enum< rfsv::errs > getStatus()
Retrieves the current status of the connection.
Enum< rfsv::errs > formatOpen(const char drive, int &handle, int &count)
Starts formatting a drive.
Enum< rfsv::errs > getUniqueID(const char *, long &)
Enum< rfsv::errs > getResponse(bufferStore &data, bool statusIsFirstByte)
void reset()
Initializes a connection to the remote machine.
Enum< rfsv::errs > execProgram(const char *program, const char *args)
Starts execution of a program on the remote machine.
int mtCacheS5mx
Flag: getMachineType and getMachineInfo have been called and the machine is an S5mx.
void reconnect()
Attempts to re-establish a remote connection by first closing the socket, then connecting again to th...
Enum< rfsv::errs > quitServer(void)
Requests the remote server to terminate.
stringRep add(rpcs::PSI_MACH_UNKNOWN, N_("Unknown device"))
std::vector< PsiProcess > processList
Description of a Psion-Device.
This struct holds the data returned by rpcs::getMachineInfo.