summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.h
authorzautrix <zautrix>2006-02-24 18:49:56 (UTC)
committer zautrix <zautrix>2006-02-24 18:49:56 (UTC)
commitd7738fdfc685192eb2f8317db6ffad3c246001c8 (patch) (unidiff)
treed9aae6ca97851fd1b53c4d9e74740a5ee2b69ea9 /kabc/addressee.h
parent987757f168bbae56100f2aff763b865e81ceec18 (diff)
downloadkdepimpi-d7738fdfc685192eb2f8317db6ffad3c246001c8.zip
kdepimpi-d7738fdfc685192eb2f8317db6ffad3c246001c8.tar.gz
kdepimpi-d7738fdfc685192eb2f8317db6ffad3c246001c8.tar.bz2
kapi sync
Diffstat (limited to 'kabc/addressee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h
index aac78dc..0ea1803 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -1,248 +1,249 @@
1/*** Warning! This file has been generated by the script makeaddressee ***/ 1/*** Warning! This file has been generated by the script makeaddressee ***/
2/* 2/*
3 This file is part of libkabc. 3 This file is part of libkabc.
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_ADDRESSEE_H 29#ifndef KABC_ADDRESSEE_H
30#define KABC_ADDRESSEE_H 30#define KABC_ADDRESSEE_H
31 31
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qstring.h> 33#include <qstring.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <qvaluelist.h> 36#include <qvaluelist.h>
37 37
38#include <ksharedptr.h> 38#include <ksharedptr.h>
39#include <kurl.h> 39#include <kurl.h>
40 40
41#include "address.h" 41#include "address.h"
42#include "agent.h" 42#include "agent.h"
43#include "geo.h" 43#include "geo.h"
44#include "key.h" 44#include "key.h"
45#include "phonenumber.h" 45#include "phonenumber.h"
46#include "picture.h" 46#include "picture.h"
47#include "secrecy.h" 47#include "secrecy.h"
48#include "sound.h" 48#include "sound.h"
49#include "timezone.h" 49#include "timezone.h"
50 50
51namespace KABC { 51namespace KABC {
52 52
53class Resource; 53class Resource;
54 54
55/** 55/**
56 @short address book entry 56 @short address book entry
57 57
58 This class represents an entry in the address book. 58 This class represents an entry in the address book.
59 59
60 The data of this class is implicitly shared. You can pass this class by value. 60 The data of this class is implicitly shared. You can pass this class by value.
61 61
62 If you need the name of a field for presenting it to the user you should use 62 If you need the name of a field for presenting it to the user you should use
63 the functions ending in Label(). They return a translated string which can be 63 the functions ending in Label(). They return a translated string which can be
64 used as label for the corresponding field. 64 used as label for the corresponding field.
65 65
66 About the name fields: 66 About the name fields:
67 67
68 givenName() is the first name and familyName() the last name. In some 68 givenName() is the first name and familyName() the last name. In some
69 countries the family name comes first, that's the reason for the 69 countries the family name comes first, that's the reason for the
70 naming. formattedName() is the full name with the correct formatting. 70 naming. formattedName() is the full name with the correct formatting.
71 It is used as an override, when the correct formatting can't be generated 71 It is used as an override, when the correct formatting can't be generated
72 from the other name fields automatically. 72 from the other name fields automatically.
73 73
74 realName() returns a fully formatted name(). It uses formattedName, if set, 74 realName() returns a fully formatted name(). It uses formattedName, if set,
75 otherwise it constucts the name from the name fields. As fallback, if 75 otherwise it constucts the name from the name fields. As fallback, if
76 nothing else is set it uses name(). 76 nothing else is set it uses name().
77 77
78 name() is the NAME type of RFC2426. It can be used as internal name for the 78 name() is the NAME type of RFC2426. It can be used as internal name for the
79 data enty, but shouldn't be used for displaying the data to the user. 79 data enty, but shouldn't be used for displaying the data to the user.
80 */ 80 */
81class Addressee 81class Addressee
82{ 82{
83 friend QDataStream &operator<<( QDataStream &, const Addressee & ); 83 friend QDataStream &operator<<( QDataStream &, const Addressee & );
84 friend QDataStream &operator>>( QDataStream &, Addressee & ); 84 friend QDataStream &operator>>( QDataStream &, Addressee & );
85 85
86 public: 86 public:
87 typedef QValueList<Addressee> List; 87 typedef QValueList<Addressee> List;
88 88
89 /** 89 /**
90 Construct an empty address book entry. 90 Construct an empty address book entry.
91 */ 91 */
92 Addressee(); 92 Addressee();
93 ~Addressee(); 93 ~Addressee();
94 94
95 Addressee( const Addressee & ); 95 Addressee( const Addressee & );
96 Addressee &operator=( const Addressee & ); 96 Addressee &operator=( const Addressee & );
97 97
98 bool operator==( const Addressee & ) const; 98 bool operator==( const Addressee & ) const;
99 bool operator!=( const Addressee & ) const; 99 bool operator!=( const Addressee & ) const;
100 // sync stuff 100 // sync stuff
101 void setTempSyncStat(int id); 101 void setTempSyncStat(int id);
102 int tempSyncStat() const; 102 int tempSyncStat() const;
103 void setIDStr( const QString & ); 103 void setIDStr( const QString & );
104 const QString IDStr() const; 104 const QString IDStr() const;
105 void setID( const QString &, const QString & ); 105 void setID( const QString &, const QString & );
106 const QString getID( const QString & ) const; 106 const QString getID( const QString & ) const;
107 void setCsum( const QString &, const QString & ); 107 void setCsum( const QString &, const QString & );
108 const QString getCsum( const QString & ) const ; 108 const QString getCsum( const QString & ) const ;
109 void removeID(const QString &); 109 void removeID(const QString &);
110 void computeCsum(const QString &dev); 110 void computeCsum(const QString &dev);
111 ulong getCsum4List( const QStringList & attList); 111 ulong getCsum4List( const QStringList & attList);
112 /** 112 /**
113 Return, if the address book entry is empty. 113 Return, if the address book entry is empty.
114 */ 114 */
115 bool isEmpty() const; 115 bool isEmpty() const;
116 void setExternalUID( const QString &id ); 116 void setExternalUID( const QString &id );
117 const QString externalUID() const; 117 const QString externalUID() const;
118 void setOriginalExternalUID( const QString &id ); 118 void setOriginalExternalUID( const QString &id );
119 QString originalExternalUID() const; 119 QString originalExternalUID() const;
120 void mergeContact( const Addressee& ad, bool isSubSet ); 120 void mergeContact( const Addressee& ad, bool isSubSet );
121 void mergeOLContact( const Addressee& ad );
121 void simplifyEmails(); 122 void simplifyEmails();
122 void simplifyAddresses(); 123 void simplifyAddresses();
123 void simplifyPhoneNumbers(); 124 void simplifyPhoneNumbers();
124 void simplifyPhoneNumberTypes(); 125 void simplifyPhoneNumberTypes();
125 void makePhoneNumbersOLcompatible(); 126 void makePhoneNumbersOLcompatible();
126 int hasPhoneNumberType( int type ); 127 int hasPhoneNumberType( int type );
127 bool removeVoice(); 128 bool removeVoice();
128 bool containsAdr(const Addressee& addr ); 129 bool containsAdr(const Addressee& addr );
129 130
130 /** 131 /**
131 Set unique identifier. 132 Set unique identifier.
132 */ 133 */
133 void setUid( const QString &uid ); 134 void setUid( const QString &uid );
134 /** 135 /**
135 Return unique identifier. 136 Return unique identifier.
136 */ 137 */
137 const QString uid() const; 138 const QString uid() const;
138 /** 139 /**
139 Return translated label for uid field. 140 Return translated label for uid field.
140 */ 141 */
141 static QString uidLabel(); 142 static QString uidLabel();
142 143
143 /** 144 /**
144 Set name. 145 Set name.
145 */ 146 */
146 void setName( const QString &name ); 147 void setName( const QString &name );
147 /** 148 /**
148 Return name. 149 Return name.
149 */ 150 */
150 QString name() const; 151 QString name() const;
151 /** 152 /**
152 Return translated label for name field. 153 Return translated label for name field.
153 */ 154 */
154 static QString nameLabel(); 155 static QString nameLabel();
155 156
156 /** 157 /**
157 Set formatted name. 158 Set formatted name.
158 */ 159 */
159 void setFormattedName( const QString &formattedName ); 160 void setFormattedName( const QString &formattedName );
160 /** 161 /**
161 Return formatted name. 162 Return formatted name.
162 */ 163 */
163 QString formattedName() const; 164 QString formattedName() const;
164 /** 165 /**
165 Return translated label for formattedName field. 166 Return translated label for formattedName field.
166 */ 167 */
167 static QString formattedNameLabel(); 168 static QString formattedNameLabel();
168 169
169 /** 170 /**
170 Set family name. 171 Set family name.
171 */ 172 */
172 void setFamilyName( const QString &familyName ); 173 void setFamilyName( const QString &familyName );
173 /** 174 /**
174 Return family name. 175 Return family name.
175 */ 176 */
176 QString familyName() const; 177 QString familyName() const;
177 /** 178 /**
178 Return translated label for familyName field. 179 Return translated label for familyName field.
179 */ 180 */
180 static QString familyNameLabel(); 181 static QString familyNameLabel();
181 182
182 /** 183 /**
183 Set given name. 184 Set given name.
184 */ 185 */
185 void setGivenName( const QString &givenName ); 186 void setGivenName( const QString &givenName );
186 /** 187 /**
187 Return given name. 188 Return given name.
188 */ 189 */
189 QString givenName() const; 190 QString givenName() const;
190 /** 191 /**
191 Return translated label for givenName field. 192 Return translated label for givenName field.
192 */ 193 */
193 static QString givenNameLabel(); 194 static QString givenNameLabel();
194 195
195 /** 196 /**
196 Set additional names. 197 Set additional names.
197 */ 198 */
198 void setAdditionalName( const QString &additionalName ); 199 void setAdditionalName( const QString &additionalName );
199 /** 200 /**
200 Return additional names. 201 Return additional names.
201 */ 202 */
202 QString additionalName() const; 203 QString additionalName() const;
203 /** 204 /**
204 Return translated label for additionalName field. 205 Return translated label for additionalName field.
205 */ 206 */
206 static QString additionalNameLabel(); 207 static QString additionalNameLabel();
207 208
208 /** 209 /**
209 Set honorific prefixes. 210 Set honorific prefixes.
210 */ 211 */
211 void setPrefix( const QString &prefix ); 212 void setPrefix( const QString &prefix );
212 /** 213 /**
213 Return honorific prefixes. 214 Return honorific prefixes.
214 */ 215 */
215 QString prefix() const; 216 QString prefix() const;
216 /** 217 /**
217 Return translated label for prefix field. 218 Return translated label for prefix field.
218 */ 219 */
219 static QString prefixLabel(); 220 static QString prefixLabel();
220 221
221 /** 222 /**
222 Set honorific suffixes. 223 Set honorific suffixes.
223 */ 224 */
224 void setSuffix( const QString &suffix ); 225 void setSuffix( const QString &suffix );
225 /** 226 /**
226 Return honorific suffixes. 227 Return honorific suffixes.
227 */ 228 */
228 QString suffix() const; 229 QString suffix() const;
229 /** 230 /**
230 Return translated label for suffix field. 231 Return translated label for suffix field.
231 */ 232 */
232 static QString suffixLabel(); 233 static QString suffixLabel();
233 234
234 /** 235 /**
235 Set nick name. 236 Set nick name.
236 */ 237 */
237 void setNickName( const QString &nickName ); 238 void setNickName( const QString &nickName );
238 /** 239 /**
239 Return nick name. 240 Return nick name.
240 */ 241 */
241 QString nickName() const; 242 QString nickName() const;
242 /** 243 /**
243 Return translated label for nickName field. 244 Return translated label for nickName field.
244 */ 245 */
245 static QString nickNameLabel(); 246 static QString nickNameLabel();
246 247
247 /** 248 /**
248 Set birthday. 249 Set birthday.
@@ -522,335 +523,336 @@ class Addressee
522 523
523 /** 524 /**
524 Set logo. 525 Set logo.
525 */ 526 */
526 void setLogo( const Picture &logo ); 527 void setLogo( const Picture &logo );
527 /** 528 /**
528 Return logo. 529 Return logo.
529 */ 530 */
530 Picture logo() const; 531 Picture logo() const;
531 /** 532 /**
532 Return translated label for logo field. 533 Return translated label for logo field.
533 */ 534 */
534 static QString logoLabel(); 535 static QString logoLabel();
535 536
536 /** 537 /**
537 Set photo. 538 Set photo.
538 */ 539 */
539 void setPhoto( const Picture &photo ); 540 void setPhoto( const Picture &photo );
540 /** 541 /**
541 Return photo. 542 Return photo.
542 */ 543 */
543 Picture photo() const; 544 Picture photo() const;
544 /** 545 /**
545 Return translated label for photo field. 546 Return translated label for photo field.
546 */ 547 */
547 static QString photoLabel(); 548 static QString photoLabel();
548 549
549 /** 550 /**
550 Set sound. 551 Set sound.
551 */ 552 */
552 void setSound( const Sound &sound ); 553 void setSound( const Sound &sound );
553 /** 554 /**
554 Return sound. 555 Return sound.
555 */ 556 */
556 Sound sound() const; 557 Sound sound() const;
557 /** 558 /**
558 Return translated label for sound field. 559 Return translated label for sound field.
559 */ 560 */
560 static QString soundLabel(); 561 static QString soundLabel();
561 562
562 /** 563 /**
563 Set agent. 564 Set agent.
564 */ 565 */
565 void setAgent( const Agent &agent ); 566 void setAgent( const Agent &agent );
566 /** 567 /**
567 Return agent. 568 Return agent.
568 */ 569 */
569 Agent agent() const; 570 Agent agent() const;
570 /** 571 /**
571 Return translated label for agent field. 572 Return translated label for agent field.
572 */ 573 */
573 static QString agentLabel(); 574 static QString agentLabel();
574 575
575 /** 576 /**
576 Set name fields by parsing the given string and trying to associate the 577 Set name fields by parsing the given string and trying to associate the
577 parts of the string with according fields. This function should probably 578 parts of the string with according fields. This function should probably
578 be a bit more clever. 579 be a bit more clever.
579 */ 580 */
580 void setNameFromString( const QString & ); 581 void setNameFromString( const QString & );
581 582
582 /** 583 /**
583 Return the name of the addressee. This is calculated from all the name 584 Return the name of the addressee. This is calculated from all the name
584 fields. 585 fields.
585 */ 586 */
586 QString realName() const; 587 QString realName() const;
587 588
588 /** 589 /**
589 Return the name that consists of all name parts. 590 Return the name that consists of all name parts.
590 */ 591 */
591 QString assembledName() const; 592 QString assembledName() const;
592 593
593 /** 594 /**
594 Return email address including real name. 595 Return email address including real name.
595 596
596 @param email Email address to be used to construct the full email string. 597 @param email Email address to be used to construct the full email string.
597 If this is QString::null the preferred email address is used. 598 If this is QString::null the preferred email address is used.
598 */ 599 */
599 QString fullEmail( const QString &email=QString::null ) const; 600 QString fullEmail( const QString &email=QString::null ) const;
600 601
601 /** 602 /**
602 Insert an email address. If the email address already exists in this 603 Insert an email address. If the email address already exists in this
603 addressee it is not duplicated. 604 addressee it is not duplicated.
604 605
605 @param email Email address 606 @param email Email address
606 @param preferred Set to true, if this is the preferred email address of 607 @param preferred Set to true, if this is the preferred email address of
607 the addressee. 608 the addressee.
608 */ 609 */
609 void insertEmail( const QString &email, bool preferred=false ); 610 void insertEmail( const QString &email, bool preferred=false );
610 611
611 /** 612 /**
612 Remove email address. If the email address doesn't exist, nothing happens. 613 Remove email address. If the email address doesn't exist, nothing happens.
613 */ 614 */
614 void removeEmail( const QString &email ); 615 void removeEmail( const QString &email );
615 616
616 /** 617 /**
617 Return preferred email address. This is the first email address or the 618 Return preferred email address. This is the first email address or the
618 last one added with @ref insertEmail() with a set preferred parameter. 619 last one added with @ref insertEmail() with a set preferred parameter.
619 */ 620 */
620 QString preferredEmail() const; 621 QString preferredEmail() const;
621 622
622 /** 623 /**
623 Return list of all email addresses. 624 Return list of all email addresses.
624 */ 625 */
625 QStringList emails() const; 626 QStringList emails() const;
626 627
627 /** 628 /**
628 Set the emails to @param. 629 Set the emails to @param.
629 The first email address gets the preferred one! 630 The first email address gets the preferred one!
630 @param list The list of email addresses. 631 @param list The list of email addresses.
631 */ 632 */
632 void setEmails( const QStringList& list); 633 void setEmails( const QStringList& list);
633 634
634 /** 635 /**
635 Insert a phone number. If a phone number with the same id already exists 636 Insert a phone number. If a phone number with the same id already exists
636 in this addressee it is not duplicated. 637 in this addressee it is not duplicated.
637 */ 638 */
638 void insertPhoneNumber( const PhoneNumber &phoneNumber ); 639 void insertPhoneNumber( const PhoneNumber &phoneNumber );
639 640
640 /** 641 /**
641 Remove phone number. If no phone number with the given id exists for this 642 Remove phone number. If no phone number with the given id exists for this
642 addresse nothing happens. 643 addresse nothing happens.
643 */ 644 */
644 void removePhoneNumber( const PhoneNumber &phoneNumber ); 645 void removePhoneNumber( const PhoneNumber &phoneNumber );
645 646
646 /** 647 /**
647 Return phone number, which matches the given type. 648 Return phone number, which matches the given type.
648 */ 649 */
649 PhoneNumber phoneNumber( int type ) const; 650 PhoneNumber phoneNumber( int type ) const;
651 QString phoneNumberString( int type ) const;
650 652
651 bool matchPhoneNumber( QRegExp* searchExp ) const; 653 bool matchPhoneNumber( QRegExp* searchExp ) const;
652 bool matchAddress( QRegExp* searchExp ) const; 654 bool matchAddress( QRegExp* searchExp ) const;
653 655
654 /** 656 /**
655 Return list of all phone numbers. 657 Return list of all phone numbers.
656 */ 658 */
657 PhoneNumber::List phoneNumbers() const; 659 PhoneNumber::List phoneNumbers() const;
658 660
659 /** 661 /**
660 Return list of phone numbers with a special type. 662 Return list of phone numbers with a special type.
661 */ 663 */
662 PhoneNumber::List phoneNumbers( int type ) const; 664 PhoneNumber::List phoneNumbers( int type ) const;
663 665
664 /** 666 /**
665 Return phone number with the given id. 667 Return phone number with the given id.
666 */ 668 */
667 PhoneNumber findPhoneNumber( const QString &id ) const; 669 PhoneNumber findPhoneNumber( const QString &id ) const;
668 670
669 /** 671 /**
670 Insert a key. If a key with the same id already exists 672 Insert a key. If a key with the same id already exists
671 in this addressee it is not duplicated. 673 in this addressee it is not duplicated.
672 */ 674 */
673 void insertKey( const Key &key ); 675 void insertKey( const Key &key );
674 676
675 /** 677 /**
676 Remove a key. If no key with the given id exists for this 678 Remove a key. If no key with the given id exists for this
677 addresse nothing happens. 679 addresse nothing happens.
678 */ 680 */
679 void removeKey( const Key &key ); 681 void removeKey( const Key &key );
680 682
681 /** 683 /**
682 Return key, which matches the given type. 684 Return key, which matches the given type.
683 If @p type == Key::Custom you can specify a string 685 If @p type == Key::Custom you can specify a string
684 that should match. If you leave the string empty, the first 686 that should match. If you leave the string empty, the first
685 key with a custom value is returned. 687 key with a custom value is returned.
686 */ 688 */
687 Key key( int type, QString customTypeString = QString::null ) const; 689 Key key( int type, QString customTypeString = QString::null ) const;
688 690
689 /** 691 /**
690 Return list of all keys. 692 Return list of all keys.
691 */ 693 */
692 Key::List keys() const; 694 Key::List keys() const;
693 695
694 /** 696 /**
695 Set the list of keys 697 Set the list of keys
696 @param keys The keys to be set. 698 @param keys The keys to be set.
697 */ 699 */
698 void setKeys( const Key::List& keys); 700 void setKeys( const Key::List& keys);
699 701
700 /** 702 /**
701 Return list of keys with a special type. 703 Return list of keys with a special type.
702 If @p type == Key::Custom you can specify a string 704 If @p type == Key::Custom you can specify a string
703 that should match. If you leave the string empty, all custom 705 that should match. If you leave the string empty, all custom
704 keys will be returned. 706 keys will be returned.
705 */ 707 */
706 Key::List keys( int type, QString customTypeString = QString::null ) const; 708 Key::List keys( int type, QString customTypeString = QString::null ) const;
707 709
708 /** 710 /**
709 Return key with the given id. 711 Return key with the given id.
710 */ 712 */
711 Key findKey( const QString &id ) const; 713 Key findKey( const QString &id ) const;
712 714
713 /** 715 /**
714 Insert an address. If an address with the same id already exists 716 Insert an address. If an address with the same id already exists
715 in this addressee it is not duplicated. 717 in this addressee it is not duplicated.
716 */ 718 */
717 void insertAddress( const Address &address ); 719 void insertAddress( const Address &address );
718 720
719 /** 721 /**
720 Remove address. If no address with the given id exists for this 722 Remove address. If no address with the given id exists for this
721 addresse nothing happens. 723 addresse nothing happens.
722 */ 724 */
723 void removeAddress( const Address &address ); 725 void removeAddress( const Address &address );
724 726
725 /** 727 /**
726 Return address, which matches the given type. 728 Return address, which matches the given type.
727 */ 729 */
728 Address address( int type ) const; 730 Address address( int type ) const;
729 731
730 /** 732 /**
731 Return list of all addresses. 733 Return list of all addresses.
732 */ 734 */
733 Address::List addresses() const; 735 Address::List addresses() const;
734 736 Address otherAddress() const;
735 /** 737 /**
736 Return list of addresses with a special type. 738 Return list of addresses with a special type.
737 */ 739 */
738 Address::List addresses( int type ) const; 740 Address::List addresses( int type ) const;
739 741
740 /** 742 /**
741 Return address with the given id. 743 Return address with the given id.
742 */ 744 */
743 Address findAddress( const QString &id ) const; 745 Address findAddress( const QString &id ) const;
744 746
745 /** 747 /**
746 Insert category. If the category already exists it is not duplicated. 748 Insert category. If the category already exists it is not duplicated.
747 */ 749 */
748 void insertCategory( const QString & ); 750 void insertCategory( const QString & );
749 751
750 /** 752 /**
751 Remove category. 753 Remove category.
752 */ 754 */
753 void removeCategory( const QString & ); 755 void removeCategory( const QString & );
754 756
755 /** 757 /**
756 Return, if addressee has the given category. 758 Return, if addressee has the given category.
757 */ 759 */
758 bool hasCategory( const QString & ) const; 760 bool hasCategory( const QString & ) const;
759 761
760 /** 762 /**
761 Set categories to given value. 763 Set categories to given value.
762 */ 764 */
763 void setCategories( const QStringList & ); 765 void setCategories( const QStringList & );
764 766
765 /** 767 /**
766 Return list of all set categories. 768 Return list of all set categories.
767 */ 769 */
768 QStringList categories() const; 770 QStringList categories() const;
769 771
770 /** 772 /**
771 Insert custom entry. The entry is identified by the name of the inserting 773 Insert custom entry. The entry is identified by the name of the inserting
772 application and a unique name. If an entry with the given app and name 774 application and a unique name. If an entry with the given app and name
773 already exists its value is replaced with the new given value. 775 already exists its value is replaced with the new given value.
774 */ 776 */
775 void insertCustom( const QString &app, const QString &name, 777 void insertCustom( const QString &app, const QString &name,
776 const QString &value ); 778 const QString &value );
777 779
778 /** 780 /**
779 Remove custom entry. 781 Remove custom entry.
780 */ 782 */
781 void removeCustom( const QString &app, const QString &name ); 783 void removeCustom( const QString &app, const QString &name );
782 784
783 /** 785 /**
784 Return value of custom entry, identified by app and entry name. 786 Return value of custom entry, identified by app and entry name.
785 */ 787 */
786 QString custom( const QString &app, const QString &name ) const; 788 QString custom( const QString &app, const QString &name ) const;
787 789
788 /** 790 /**
789 Set all custom entries. 791 Set all custom entries.
790 */ 792 */
791 void setCustoms( const QStringList & ); 793 void setCustoms( const QStringList & );
792 794
793 /** 795 /**
794 Return list of all custom entries. 796 Return list of all custom entries.
795 */ 797 */
796 QStringList customs() const; 798 QStringList customs() const;
797 799
798 /** 800 /**
799 Parse full email address. The result is given back in fullName and email. 801 Parse full email address. The result is given back in fullName and email.
800 */ 802 */
801 static void parseEmailAddress( const QString &rawEmail, QString &fullName, 803 static void parseEmailAddress( const QString &rawEmail, QString &fullName,
802 QString &email ); 804 QString &email );
803 805
804 /** 806 /**
805 Debug output. 807 Debug output.
806 */ 808 */
807 void dump() const; 809 void dump() const;
808 810
809 /** 811 /**
810 Returns string representation of the addressee. 812 Returns string representation of the addressee.
811 */ 813 */
812 QString asString() const; 814 QString asString() const;
813 815
814 /** 816 /**
815 Set resource where the addressee is from. 817 Set resource where the addressee is from.
816 */ 818 */
817 void setResource( Resource *resource ); 819 void setResource( Resource *resource );
818 820
819 /** 821 /**
820 Return pointer to resource. 822 Return pointer to resource.
821 */ 823 */
822 Resource *resource() const; 824 Resource *resource() const;
823 825
824 /** 826 /**
825 Return resourcelabel. 827 Return resourcelabel.
826 */ 828 */
827 //US 829 //US
828 static QString resourceLabel(); 830 static QString resourceLabel();
829 static QString categoryLabel(); 831 static QString categoryLabel();
830 /** 832 /**
831 Mark addressee as changed. 833 Mark addressee as changed.
832 */ 834 */
833 void setChanged( bool value ); 835 void setChanged( bool value );
834 836
835 /** 837 /**
836 Return whether the addressee is changed. 838 Return whether the addressee is changed.
837 */ 839 */
838 bool changed() const; 840 bool changed() const;
839 841
840 void setTagged( bool value ); 842 void setTagged( bool value );
841 bool tagged() const; 843 bool tagged() const;
842 844
843 private: 845 private:
844 Addressee copy(); 846 Addressee copy();
845 void detach(); 847 void detach();
846 848
847 struct AddresseeData; 849 struct AddresseeData;
848 mutable KSharedPtr<AddresseeData> mData; 850 mutable KSharedPtr<AddresseeData> mData;
849}; 851};
850 852
851QDataStream &operator<<( QDataStream &, const Addressee & ); 853QDataStream &operator<<( QDataStream &, const Addressee & );
852QDataStream &operator>>( QDataStream &, Addressee & ); 854QDataStream &operator>>( QDataStream &, Addressee & );
853 855
854} 856}
855 857
856#endif 858#endif