-rw-r--r-- | kabc/addressbook.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/addressbook.h b/kabc/addressbook.h index f89d7da..e43de31 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h | |||
@@ -80,128 +80,129 @@ class AddressBook : public QObject | |||
80 | bool operator!=( const Iterator &it ); | 80 | bool operator!=( const Iterator &it ); |
81 | 81 | ||
82 | struct IteratorData; | 82 | struct IteratorData; |
83 | IteratorData *d; | 83 | IteratorData *d; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | @short Address Book Const Iterator | 87 | @short Address Book Const Iterator |
88 | 88 | ||
89 | This class provides a const iterator for address book entries. | 89 | This class provides a const iterator for address book entries. |
90 | */ | 90 | */ |
91 | class ConstIterator | 91 | class ConstIterator |
92 | { | 92 | { |
93 | public: | 93 | public: |
94 | ConstIterator(); | 94 | ConstIterator(); |
95 | ConstIterator( const ConstIterator & ); | 95 | ConstIterator( const ConstIterator & ); |
96 | ~ConstIterator(); | 96 | ~ConstIterator(); |
97 | 97 | ||
98 | ConstIterator &operator=( const ConstIterator & ); | 98 | ConstIterator &operator=( const ConstIterator & ); |
99 | const Addressee &operator*() const; | 99 | const Addressee &operator*() const; |
100 | const Addressee* operator->() const; | 100 | const Addressee* operator->() const; |
101 | ConstIterator &operator++(); | 101 | ConstIterator &operator++(); |
102 | ConstIterator &operator++(int); | 102 | ConstIterator &operator++(int); |
103 | ConstIterator &operator--(); | 103 | ConstIterator &operator--(); |
104 | ConstIterator &operator--(int); | 104 | ConstIterator &operator--(int); |
105 | bool operator==( const ConstIterator &it ); | 105 | bool operator==( const ConstIterator &it ); |
106 | bool operator!=( const ConstIterator &it ); | 106 | bool operator!=( const ConstIterator &it ); |
107 | 107 | ||
108 | struct ConstIteratorData; | 108 | struct ConstIteratorData; |
109 | ConstIteratorData *d; | 109 | ConstIteratorData *d; |
110 | }; | 110 | }; |
111 | 111 | ||
112 | /** | 112 | /** |
113 | Constructs a address book object. | 113 | Constructs a address book object. |
114 | 114 | ||
115 | @param format File format class. | 115 | @param format File format class. |
116 | */ | 116 | */ |
117 | AddressBook(); | 117 | AddressBook(); |
118 | AddressBook( const QString &config ); | 118 | AddressBook( const QString &config ); |
119 | AddressBook( const QString &config, const QString &family ); | 119 | AddressBook( const QString &config, const QString &family ); |
120 | virtual ~AddressBook(); | 120 | virtual ~AddressBook(); |
121 | 121 | ||
122 | /** | 122 | /** |
123 | Requests a ticket for saving the addressbook. Calling this function locks | 123 | Requests a ticket for saving the addressbook. Calling this function locks |
124 | the addressbook for all other processes. If the address book is already | 124 | the addressbook for all other processes. If the address book is already |
125 | locked the function returns 0. You need the returned @ref Ticket object | 125 | locked the function returns 0. You need the returned @ref Ticket object |
126 | for calling the @ref save() function. | 126 | for calling the @ref save() function. |
127 | 127 | ||
128 | @see save() | 128 | @see save() |
129 | */ | 129 | */ |
130 | Ticket *requestSaveTicket( Resource *resource=0 ); | 130 | Ticket *requestSaveTicket( Resource *resource=0 ); |
131 | 131 | ||
132 | /** | 132 | /** |
133 | Load address book from file. | 133 | Load address book from file. |
134 | */ | 134 | */ |
135 | bool load(); | 135 | bool load(); |
136 | 136 | ||
137 | /** | 137 | /** |
138 | Save address book. The address book is saved to the file, the Ticket | 138 | Save address book. The address book is saved to the file, the Ticket |
139 | object has been requested for by @ref requestSaveTicket(). | 139 | object has been requested for by @ref requestSaveTicket(). |
140 | 140 | ||
141 | @param ticket a ticket object returned by @ref requestSaveTicket() | 141 | @param ticket a ticket object returned by @ref requestSaveTicket() |
142 | */ | 142 | */ |
143 | bool save( Ticket *ticket ); | 143 | bool save( Ticket *ticket ); |
144 | bool saveAB( ); | ||
144 | 145 | ||
145 | /** | 146 | /** |
146 | Returns a iterator for first entry of address book. | 147 | Returns a iterator for first entry of address book. |
147 | */ | 148 | */ |
148 | Iterator begin(); | 149 | Iterator begin(); |
149 | 150 | ||
150 | /** | 151 | /** |
151 | Returns a const iterator for first entry of address book. | 152 | Returns a const iterator for first entry of address book. |
152 | */ | 153 | */ |
153 | ConstIterator begin() const; | 154 | ConstIterator begin() const; |
154 | 155 | ||
155 | /** | 156 | /** |
156 | Returns a iterator for first entry of address book. | 157 | Returns a iterator for first entry of address book. |
157 | */ | 158 | */ |
158 | Iterator end(); | 159 | Iterator end(); |
159 | 160 | ||
160 | /** | 161 | /** |
161 | Returns a const iterator for first entry of address book. | 162 | Returns a const iterator for first entry of address book. |
162 | */ | 163 | */ |
163 | ConstIterator end() const; | 164 | ConstIterator end() const; |
164 | 165 | ||
165 | /** | 166 | /** |
166 | Removes all entries from address book. | 167 | Removes all entries from address book. |
167 | */ | 168 | */ |
168 | void clear(); | 169 | void clear(); |
169 | 170 | ||
170 | /** | 171 | /** |
171 | Insert an Addressee object into address book. If an object with the same | 172 | Insert an Addressee object into address book. If an object with the same |
172 | unique id already exists in the address book it it replaced by the new | 173 | unique id already exists in the address book it it replaced by the new |
173 | one. If not the new object is appended to the address book. | 174 | one. If not the new object is appended to the address book. |
174 | */ | 175 | */ |
175 | void insertAddressee( const Addressee & ); | 176 | void insertAddressee( const Addressee & ); |
176 | 177 | ||
177 | /** | 178 | /** |
178 | Removes entry from the address book. | 179 | Removes entry from the address book. |
179 | */ | 180 | */ |
180 | void removeAddressee( const Addressee & ); | 181 | void removeAddressee( const Addressee & ); |
181 | 182 | ||
182 | /** | 183 | /** |
183 | This is like @ref removeAddressee() just above, with the difference that | 184 | This is like @ref removeAddressee() just above, with the difference that |
184 | the first element is a iterator, returned by @ref begin(). | 185 | the first element is a iterator, returned by @ref begin(). |
185 | */ | 186 | */ |
186 | void removeAddressee( const Iterator & ); | 187 | void removeAddressee( const Iterator & ); |
187 | 188 | ||
188 | /** | 189 | /** |
189 | Find the specified entry in address book. Returns end(), if the entry | 190 | Find the specified entry in address book. Returns end(), if the entry |
190 | couldn't be found. | 191 | couldn't be found. |
191 | */ | 192 | */ |
192 | Iterator find( const Addressee & ); | 193 | Iterator find( const Addressee & ); |
193 | 194 | ||
194 | /** | 195 | /** |
195 | Find the entry specified by an unique id. Returns an empty Addressee | 196 | Find the entry specified by an unique id. Returns an empty Addressee |
196 | object, if the address book does not contain an entry with this id. | 197 | object, if the address book does not contain an entry with this id. |
197 | */ | 198 | */ |
198 | Addressee findByUid( const QString & ); | 199 | Addressee findByUid( const QString & ); |
199 | 200 | ||
200 | 201 | ||
201 | /** | 202 | /** |
202 | Returns a list of all addressees in the address book. This list can | 203 | Returns a list of all addressees in the address book. This list can |
203 | be sorted with @ref KABC::AddresseeList for example. | 204 | be sorted with @ref KABC::AddresseeList for example. |
204 | */ | 205 | */ |
205 | Addressee::List allAddressees(); | 206 | Addressee::List allAddressees(); |
206 | 207 | ||
207 | /** | 208 | /** |