summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 70eda1b..9332e21 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -33,24 +33,25 @@ $Id$
33 33
34#include <kapplication.h> 34#include <kapplication.h>
35#include <kinstance.h> 35#include <kinstance.h>
36#include <kstandarddirs.h> 36#include <kstandarddirs.h>
37 37
38#include "errorhandler.h" 38#include "errorhandler.h"
39*/ 39*/
40#include <qptrlist.h> 40#include <qptrlist.h>
41 41
42#include <kglobal.h> 42#include <kglobal.h>
43#include <klocale.h> 43#include <klocale.h>
44#include <kdebug.h> 44#include <kdebug.h>
45#include <libkcal/syncdefines.h>
45#include "addressbook.h" 46#include "addressbook.h"
46#include "resource.h" 47#include "resource.h"
47 48
48//US #include "addressbook.moc" 49//US #include "addressbook.moc"
49 50
50using namespace KABC; 51using namespace KABC;
51 52
52struct AddressBook::AddressBookData 53struct AddressBook::AddressBookData
53{ 54{
54 Addressee::List mAddressees; 55 Addressee::List mAddressees;
55 Addressee::List mRemovedAddressees; 56 Addressee::List mRemovedAddressees;
56 Field::List mAllFields; 57 Field::List mAllFields;
@@ -503,24 +504,50 @@ AddressBook::Iterator AddressBook::find( const Addressee &a )
503} 504}
504 505
505Addressee AddressBook::findByUid( const QString &uid ) 506Addressee AddressBook::findByUid( const QString &uid )
506{ 507{
507 Iterator it; 508 Iterator it;
508 for ( it = begin(); it != end(); ++it ) { 509 for ( it = begin(); it != end(); ++it ) {
509 if ( uid == (*it).uid() ) { 510 if ( uid == (*it).uid() ) {
510 return *it; 511 return *it;
511 } 512 }
512 } 513 }
513 return Addressee(); 514 return Addressee();
514} 515}
516Addressee::List AddressBook::getExternLastSyncAddressees()
517{
518 Addressee::List results;
519
520 Iterator it;
521 for ( it = begin(); it != end(); ++it ) {
522 if ( (*it).uid().left( 20 ) == "last-syncAddressee-" ) {
523 if ( (*it).familyName().left(3) == "E: " )
524 results.append( *it );
525 }
526 }
527
528 return results;
529}
530void AddressBook::resetTempSyncStat()
531{
532
533
534 Iterator it;
535 for ( it = begin(); it != end(); ++it ) {
536 (*it).setTempSyncStat ( SYNC_TEMPSTATE_INITIAL );
537 }
538
539}
540
541
515 542
516Addressee::List AddressBook::allAddressees() 543Addressee::List AddressBook::allAddressees()
517{ 544{
518 return d->mAddressees; 545 return d->mAddressees;
519} 546}
520 547
521Addressee::List AddressBook::findByName( const QString &name ) 548Addressee::List AddressBook::findByName( const QString &name )
522{ 549{
523 Addressee::List results; 550 Addressee::List results;
524 551
525 Iterator it; 552 Iterator it;
526 for ( it = begin(); it != end(); ++it ) { 553 for ( it = begin(); it != end(); ++it ) {