summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2004-10-09 21:35:22 (UTC)
committer zautrix <zautrix>2004-10-09 21:35:22 (UTC)
commit213a9d993e5a4751b64e18320cfbebb000681d13 (patch) (unidiff)
tree995b465797464e689b73d3271ff4a3f8f0d3749b /libkcal
parentd68435216e1ebc5a7fed391157197994e13992b3 (diff)
downloadkdepimpi-213a9d993e5a4751b64e18320cfbebb000681d13.zip
kdepimpi-213a9d993e5a4751b64e18320cfbebb000681d13.tar.gz
kdepimpi-213a9d993e5a4751b64e18320cfbebb000681d13.tar.bz2
ab phone sync implemented
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index c39413e..3555dc6 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -282,34 +282,30 @@ ulong PhoneFormat::getCsum( const QStringList & attList)
282 282
283 return cSum; 283 return cSum;
284 284
285} 285}
286//extern "C" GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum); 286//extern "C" GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum);
287#include <stdlib.h> 287#include <stdlib.h>
288#define DEBUGMODE false 288#define DEBUGMODE false
289bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) 289bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
290{ 290{
291 291
292 QString fileName; 292 QString fileName;
293#ifdef _WIN32_ 293#ifdef _WIN32_
294 fileName = locateLocal("tmp", "tempfile.vcs"); 294 fileName = locateLocal("tmp", "phonefile.vcs");
295#else 295#else
296 fileName = "/tmp/kdepimtemp.vcs"; 296 fileName = "/tmp/phonefile.vcs";
297#endif 297#endif
298#ifdef DESKTOP_VERSION 298 QString command;
299 QString command ="./kammu --backup " + fileName + " -yes" ; 299 int ret = PhoneAccess::readFromPhone( fileName );
300#else
301 QString command ="kammu --backup " + fileName + " -yes" ;
302#endif
303 int ret = system ( command.latin1() );
304 if ( ret != 0 ) { 300 if ( ret != 0 ) {
305 qDebug("Error::command returned %d", ret); 301 qDebug("Error::command returned %d", ret);
306 return false; 302 return false;
307 } 303 }
308 VCalFormat vfload; 304 VCalFormat vfload;
309 vfload.setLocalTime ( true ); 305 vfload.setLocalTime ( true );
310 qDebug("loading file ..."); 306 qDebug("loading file ...");
311 307
312 if ( ! vfload.load( calendar, fileName ) ) 308 if ( ! vfload.load( calendar, fileName ) )
313 return false; 309 return false;
314 QPtrList<Event> er = calendar->rawEvents(); 310 QPtrList<Event> er = calendar->rawEvents();
315 Event* ev = er.first(); 311 Event* ev = er.first();