From f1840173ca21b3668c25b3fdec73f9bbcbb8cb12 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Fri, 2 Feb 2001 06:33:42 +0000 Subject: Added automatic initialization of the timezone info in PsTime. --- kde2/kioslave/kio_plp.cpp | 21 +++++++++++++++++++++ kde2/kioslave/kio_plp.h | 3 +++ 2 files changed, 24 insertions(+) (limited to 'kde2') diff --git a/kde2/kioslave/kio_plp.cpp b/kde2/kioslave/kio_plp.cpp index 4e7dbf0..72b1060 100644 --- a/kde2/kioslave/kio_plp.cpp +++ b/kde2/kioslave/kio_plp.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -226,6 +227,26 @@ openConnection() { error(ERR_COULD_NOT_CONNECT, i18n("Could not read version info")); return; } + + /* If we have a S5, get the Psion's Owner- and Mach- info. + * This implicitely sets the Timezone info of the Psion also. + */ + + ppsocket rpcsSocket; + if (rpcsSocket.connect((char *)(currentHost.data()), currentPort)) { + rpcsfactory factory(&rpcsSocket); + rpcs *Rpcs = factory.create(false); + if (Rpcs != 0L) { + bufferArray b; + Enum res; + if ((res = Rpcs->getOwnerInfo(b)) == rfsv::E_PSI_GEN_NONE) { + Rpcs->getMachineType(machType); + if (machType == rpcs::PSI_MACH_S5) + Rpcs->getMachineInfo(mi); + } + } + } + long devbits; Enum res; diff --git a/kde2/kioslave/kio_plp.h b/kde2/kioslave/kio_plp.h index 49176f0..c17436e 100644 --- a/kde2/kioslave/kio_plp.h +++ b/kde2/kioslave/kio_plp.h @@ -26,6 +26,7 @@ #include #include #include +#include #include typedef QMap UidMap; @@ -77,6 +78,8 @@ private: int currentPort; time_t t_last; time_t t_start; + Enum machType; + rpcs::machineInfo mi; }; #endif -- cgit v1.2.3