From 213a9d993e5a4751b64e18320cfbebb000681d13 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 09 Oct 2004 21:35:22 +0000 Subject: ab phone sync implemented --- (limited to 'libkdepim') diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index fe914dd..5fafa1f 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -143,7 +143,29 @@ bool PhoneAccess::writeToPhone( QString fileName) while ( (ret = system ( command.latin1())) != 0 ) { qDebug("Error S::command returned %d.", ret); int retval = KMessageBox::warningContinueCancel(0, - i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KO/Pi phone access"),i18n("Retry"),i18n("Cancel")); + i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel")); + if ( retval != KMessageBox::Continue ) + return false; + } + return true; +} +bool PhoneAccess::readFromPhone( QString fileName) +{ + +#ifdef DESKTOP_VERSION +#ifdef _WIN32_ + QString command ="kammu --backup " + fileName + " -yes" ; +#else + QString command ="./kammu --backup " + fileName + " -yes" ; +#endif +#else + QString command ="kammu --backup " + fileName + " -yes" ; +#endif + int ret; + while ( (ret = system ( command.latin1())) != 0 ) { + qDebug("Error S::command returned %d.", ret); + int retval = KMessageBox::warningContinueCancel(0, + i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel")); if ( retval != KMessageBox::Continue ) return false; } diff --git a/libkdepim/phoneaccess.h b/libkdepim/phoneaccess.h index b7c4732..80840e2 100644 --- a/libkdepim/phoneaccess.h +++ b/libkdepim/phoneaccess.h @@ -22,6 +22,7 @@ #define PHONEACCESS_H #include +#include @@ -34,6 +35,7 @@ class PhoneAccess : public QObject { static void writeConfig( QString device,QString connection, QString model ); static bool writeToPhone( QString fileName ); + static bool readFromPhone( QString fileName ); }; -- cgit v0.9.0.2