summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.h
Unidiff
Diffstat (limited to 'kabc/addressee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 27782f9..f098371 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -67,65 +67,74 @@ class Resource;
67 givenName() is the first name and familyName() the last name. In some 67 givenName() is the first name and familyName() the last name. In some
68 countries the family name comes first, that's the reason for the 68 countries the family name comes first, that's the reason for the
69 naming. formattedName() is the full name with the correct formatting. 69 naming. formattedName() is the full name with the correct formatting.
70 It is used as an override, when the correct formatting can't be generated 70 It is used as an override, when the correct formatting can't be generated
71 from the other name fields automatically. 71 from the other name fields automatically.
72 72
73 realName() returns a fully formatted name(). It uses formattedName, if set, 73 realName() returns a fully formatted name(). It uses formattedName, if set,
74 otherwise it constucts the name from the name fields. As fallback, if 74 otherwise it constucts the name from the name fields. As fallback, if
75 nothing else is set it uses name(). 75 nothing else is set it uses name().
76 76
77 name() is the NAME type of RFC2426. It can be used as internal name for the 77 name() is the NAME type of RFC2426. It can be used as internal name for the
78 data enty, but shouldn't be used for displaying the data to the user. 78 data enty, but shouldn't be used for displaying the data to the user.
79 */ 79 */
80class Addressee 80class Addressee
81{ 81{
82 friend QDataStream &operator<<( QDataStream &, const Addressee & ); 82 friend QDataStream &operator<<( QDataStream &, const Addressee & );
83 friend QDataStream &operator>>( QDataStream &, Addressee & ); 83 friend QDataStream &operator>>( QDataStream &, Addressee & );
84 84
85 public: 85 public:
86 typedef QValueList<Addressee> List; 86 typedef QValueList<Addressee> List;
87 87
88 /** 88 /**
89 Construct an empty address book entry. 89 Construct an empty address book entry.
90 */ 90 */
91 Addressee(); 91 Addressee();
92 ~Addressee(); 92 ~Addressee();
93 93
94 Addressee( const Addressee & ); 94 Addressee( const Addressee & );
95 Addressee &operator=( const Addressee & ); 95 Addressee &operator=( const Addressee & );
96 96
97 bool operator==( const Addressee & ) const; 97 bool operator==( const Addressee & ) const;
98 bool operator!=( const Addressee & ) const; 98 bool operator!=( const Addressee & ) const;
99 99 // sync stuff
100 void setTempSyncStat(int id);
101 int tempSyncStat() const;
102 void setIDStr( const QString & );
103 QString IDStr() const;
104 void setID( const QString &, const QString & );
105 QString getID( const QString & );
106 void setCsum( const QString &, const QString & );
107 QString getCsum( const QString & );
108 void removeID(const QString &);
100 /** 109 /**
101 Return, if the address book entry is empty. 110 Return, if the address book entry is empty.
102 */ 111 */
103 bool isEmpty() const; 112 bool isEmpty() const;
104 113
105 /** 114 /**
106 Set unique identifier. 115 Set unique identifier.
107 */ 116 */
108 void setUid( const QString &uid ); 117 void setUid( const QString &uid );
109 /** 118 /**
110 Return unique identifier. 119 Return unique identifier.
111 */ 120 */
112 QString uid() const; 121 QString uid() const;
113 /** 122 /**
114 Return translated label for uid field. 123 Return translated label for uid field.
115 */ 124 */
116 static QString uidLabel(); 125 static QString uidLabel();
117 126
118 /** 127 /**
119 Set name. 128 Set name.
120 */ 129 */
121 void setName( const QString &name ); 130 void setName( const QString &name );
122 /** 131 /**
123 Return name. 132 Return name.
124 */ 133 */
125 QString name() const; 134 QString name() const;
126 /** 135 /**
127 Return translated label for name field. 136 Return translated label for name field.
128 */ 137 */
129 static QString nameLabel(); 138 static QString nameLabel();
130 139
131 /** 140 /**
@@ -786,43 +795,44 @@ class Addressee
786 */ 795 */
787 QString asString() const; 796 QString asString() const;
788 797
789 /** 798 /**
790 Set resource where the addressee is from. 799 Set resource where the addressee is from.
791 */ 800 */
792 void setResource( Resource *resource ); 801 void setResource( Resource *resource );
793 802
794 /** 803 /**
795 Return pointer to resource. 804 Return pointer to resource.
796 */ 805 */
797 Resource *resource() const; 806 Resource *resource() const;
798 807
799 /** 808 /**
800 Return resourcelabel. 809 Return resourcelabel.
801 */ 810 */
802 //US 811 //US
803 static QString resourceLabel(); 812 static QString resourceLabel();
804 813
805 /** 814 /**
806 Mark addressee as changed. 815 Mark addressee as changed.
807 */ 816 */
808 void setChanged( bool value ); 817 void setChanged( bool value );
809 818
810 /** 819 /**
811 Return whether the addressee is changed. 820 Return whether the addressee is changed.
812 */ 821 */
813 bool changed() const; 822 bool changed() const;
814 823
815 private: 824 private:
816 Addressee copy(); 825 Addressee copy();
817 void detach(); 826 void detach();
827 int mTempSyncStat;
818 828
819 struct AddresseeData; 829 struct AddresseeData;
820 mutable KSharedPtr<AddresseeData> mData; 830 mutable KSharedPtr<AddresseeData> mData;
821}; 831};
822 832
823QDataStream &operator<<( QDataStream &, const Addressee & ); 833QDataStream &operator<<( QDataStream &, const Addressee & );
824QDataStream &operator>>( QDataStream &, Addressee & ); 834QDataStream &operator>>( QDataStream &, Addressee & );
825 835
826} 836}
827 837
828#endif 838#endif