aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-03-17 01:25:08 +0000
committerFritz Elfert <felfert@to.com>2002-03-17 01:25:08 +0000
commitbf0e9c7d42c2078e29301123aae3593bab1a029b (patch)
treefc3c7ac14691c320f4ad5c34c7899975e8758244
parent69980a9469f5a2567239ea6389eca6adb77295bc (diff)
downloadplptools-bf0e9c7d42c2078e29301123aae3593bab1a029b.tar.gz
plptools-bf0e9c7d42c2078e29301123aae3593bab1a029b.tar.bz2
plptools-bf0e9c7d42c2078e29301123aae3593bab1a029b.zip
- lib: Added rfsv::getProtocolVersion
- klipsi: Terminate gracefully if connected to a Series 3.
-rw-r--r--kde2/klipsi/toplevel.cpp12
-rw-r--r--lib/rfsv.h7
-rw-r--r--lib/rfsv16.h1
-rw-r--r--lib/rfsv32.h1
4 files changed, 21 insertions, 0 deletions
diff --git a/kde2/klipsi/toplevel.cpp b/kde2/klipsi/toplevel.cpp
index 1a7d4dd..1de43b7 100644
--- a/kde2/klipsi/toplevel.cpp
+++ b/kde2/klipsi/toplevel.cpp
@@ -554,6 +554,18 @@ checkConnection() {
rf = rff->create(true);
if (rf) {
+ if (rf->getProtocolVersion() == 3) {
+ closeConnection();
+ delete timer;
+ timer = NULL;
+ KMessageBox::error(NULL, i18n(
+ "<QT>Your Psion is reported to be a <B>Series 3</B> "
+ "machine. This type of machine does <B>not support</B> the "
+ "remote clipboard protocol; Sorry.<BR/>"
+ "<B>Klipsi</B> will now terminate.</QT>"),
+ i18n("Protocol not supported"));
+ return false;
+ }
if (!rc) {
rc = new rclip(rclipSocket);
Enum<rfsv::errs> ret;
diff --git a/lib/rfsv.h b/lib/rfsv.h
index 312c1b8..b9a7321 100644
--- a/lib/rfsv.h
+++ b/lib/rfsv.h
@@ -607,6 +607,13 @@ public:
*/
int getSpeed();
+ /**
+ * Retrieves the protocol version.
+ *
+ * @returns Either 3 or 5 representing Series 3 (SIBO) or Series 5 (EPOC)
+ */
+ virtual int getProtocolVersion() = 0;
+
protected:
/**
* Retrieves the PLP protocol name. Mainly internal use.
diff --git a/lib/rfsv16.h b/lib/rfsv16.h
index b0f5e98..94b6742 100644
--- a/lib/rfsv16.h
+++ b/lib/rfsv16.h
@@ -75,6 +75,7 @@ public:
Enum<rfsv::errs> setVolumeName(const char, const char * const);
u_int32_t opMode(const u_int32_t);
+ int getProtocolVersion() { return 3; }
private:
enum commands {
diff --git a/lib/rfsv32.h b/lib/rfsv32.h
index 2adf4d8..4de3feb 100644
--- a/lib/rfsv32.h
+++ b/lib/rfsv32.h
@@ -77,6 +77,7 @@ public:
Enum<rfsv::errs> closedir(rfsvDirhandle &);
Enum<rfsv::errs> setVolumeName(const char, const char * const);
u_int32_t opMode(const u_int32_t);
+ int getProtocolVersion() { return 5; }
private: