aboutsummaryrefslogtreecommitdiffstats
path: root/kde2
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-02-02 06:33:42 +0000
committerFritz Elfert <felfert@to.com>2001-02-02 06:33:42 +0000
commitf1840173ca21b3668c25b3fdec73f9bbcbb8cb12 (patch)
treef780e4afd9d7ab7c51ad1d98a4b6789827a8350e /kde2
parent9fac7af37460c6a73a7debac1ba82b094a8f066c (diff)
downloadplptools-f1840173ca21b3668c25b3fdec73f9bbcbb8cb12.tar.gz
plptools-f1840173ca21b3668c25b3fdec73f9bbcbb8cb12.tar.bz2
plptools-f1840173ca21b3668c25b3fdec73f9bbcbb8cb12.zip
Added automatic initialization of the timezone info in PsTime.
Diffstat (limited to 'kde2')
-rw-r--r--kde2/kioslave/kio_plp.cpp21
-rw-r--r--kde2/kioslave/kio_plp.h3
2 files changed, 24 insertions, 0 deletions
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 <kconfig.h>
#include <rfsvfactory.h>
+#include <rpcsfactory.h>
#include <bufferarray.h>
#include <string>
@@ -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 <rfsv::errs> 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<rfsv::errs> 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 <qstringlist.h>
#include <qmap.h>
#include <rfsv.h>
+#include <rpcs.h>
#include <ppsocket.h>
typedef QMap<PlpUID,QString> UidMap;
@@ -77,6 +78,8 @@ private:
int currentPort;
time_t t_last;
time_t t_start;
+ Enum<rpcs::machs> machType;
+ rpcs::machineInfo mi;
};
#endif