From bf0e9c7d42c2078e29301123aae3593bab1a029b Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sun, 17 Mar 2002 01:25:08 +0000 Subject: - lib: Added rfsv::getProtocolVersion - klipsi: Terminate gracefully if connected to a Series 3. --- kde2/klipsi/toplevel.cpp | 12 ++++++++++++ lib/rfsv.h | 7 +++++++ lib/rfsv16.h | 1 + lib/rfsv32.h | 1 + 4 files changed, 21 insertions(+) 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( + "Your Psion is reported to be a Series 3 " + "machine. This type of machine does not support the " + "remote clipboard protocol; Sorry.
" + "Klipsi will now terminate.
"), + i18n("Protocol not supported")); + return false; + } if (!rc) { rc = new rclip(rclipSocket); Enum 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 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 closedir(rfsvDirhandle &); Enum setVolumeName(const char, const char * const); u_int32_t opMode(const u_int32_t); + int getProtocolVersion() { return 5; } private: -- cgit v1.2.3