• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

  • tdeabc
  • scripts
addressee.src.h
1 /*
2  This file is part of libtdeabc.
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KABC_ADDRESSEE_H
22 #define KABC_ADDRESSEE_H
23 
24 #include <tqdatetime.h>
25 #include <tqstring.h>
26 #include <tqstringlist.h>
27 #include <tqvaluelist.h>
28 
29 #include <ksharedptr.h>
30 #include <kurl.h>
31 
32 #include "address.h"
33 #include "agent.h"
34 #include "geo.h"
35 #include "key.h"
36 #include "phonenumber.h"
37 #include "picture.h"
38 #include "secrecy.h"
39 #include "sound.h"
40 #include "timezone.h"
41 
42 namespace TDEABC {
43 
44 class Resource;
45 class Field;
46 class SortMode;
47 
74 class KABC_EXPORT Addressee
75 {
76  friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & );
77  friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & );
78 
79  public:
80  typedef TQValueList<Addressee> List;
81  typedef TQMap<TQString, Addressee> Map;
82 
86  Addressee();
87  ~Addressee();
88 
89  Addressee( const Addressee & );
90  Addressee &operator=( const Addressee & );
91 
92  bool operator==( const Addressee & ) const;
93  bool operator!=( const Addressee & ) const;
94 
98  bool isEmpty() const;
99 
103  void setUid( const TQString &uid );
107  TQString uid() const;
111  static TQString uidLabel();
112 
116  void setUri( const TQString &uid );
120  TQString uri() const;
124  static TQString uriLabel();
125 
126  --DECLARATIONS--
132  void setNameFromString( const TQString & );
133 
138  TQString realName() const;
139 
143  TQString assembledName() const;
144 
151  TQString fullEmail( const TQString &email=TQString::null ) const;
152 
161  void insertEmail( const TQString &email, bool preferred=false );
162 
166  void removeEmail( const TQString &email );
167 
172  TQString preferredEmail() const;
173 
177  TQStringList emails() const;
178 
184  void setEmails( const TQStringList& list);
185 
190  void insertPhoneNumber( const PhoneNumber &phoneNumber );
191 
196  void removePhoneNumber( const PhoneNumber &phoneNumber );
197 
201  PhoneNumber phoneNumber( int type ) const;
202 
206  PhoneNumber::List phoneNumbers() const;
207 
211  PhoneNumber::List phoneNumbers( int type ) const;
212 
216  PhoneNumber findPhoneNumber( const TQString &id ) const;
217 
222  void insertKey( const Key &key );
223 
228  void removeKey( const Key &key );
229 
236  Key key( int type, TQString customTypeString = TQString::null ) const;
237 
241  Key::List keys() const;
242 
247  void setKeys( const Key::List& keys);
248 
255  Key::List keys( int type, TQString customTypeString = TQString::null ) const;
256 
260  Key findKey( const TQString &id ) const;
261 
266  void insertAddress( const Address &address );
267 
272  void removeAddress( const Address &address );
273 
277  Address address( int type ) const;
278 
282  Address::List addresses() const;
283 
287  Address::List addresses( int type ) const;
288 
292  Address findAddress( const TQString &id ) const;
293 
297  void insertCategory( const TQString & );
298 
302  void removeCategory( const TQString & );
303 
307  bool hasCategory( const TQString & ) const;
308 
312  void setCategories( const TQStringList & );
313 
317  TQStringList categories() const;
318 
327  void insertCustom( const TQString &app, const TQString &name,
328  const TQString &value );
329 
333  void removeCustom( const TQString &app, const TQString &name );
334 
338  TQString custom( const TQString &app, const TQString &name ) const;
339 
343  void setCustoms( const TQStringList & );
344 
348  TQStringList customs() const;
349 
353  static void parseEmailAddress( const TQString &rawEmail, TQString &fullName,
354  TQString &email );
355 
359  void dump() const;
360 
364  TQString asString() const;
365 
369  void setResource( Resource *resource );
370 
374  Resource *resource() const;
375 
379  void setChanged( bool value );
380 
384  bool changed() const;
385 
386  static void setSortMode( TDEABC::SortMode *mode );
387 
388  bool operator< ( const Addressee &addr );
389 
390  private:
391  void detach();
392 
393  struct AddresseeData;
394  mutable TDESharedPtr<AddresseeData> mData;
395 
396  private:
397  static AddresseeData* shared_null;
398  static AddresseeData* makeSharedNull();
399  static TDEABC::SortMode *mSortMode;
400 };
401 
402 KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & );
403 KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & );
404 
405 }
406 
407 #endif
TDEABC::Address
Postal address information.
Definition: address.h:56
TDEABC::Address::List
TQValueList< Address > List
List of addresses.
Definition: address.h:64
TDEABC::Addressee
address book entry
Definition: addressee.src.h:75
TDEABC::Key
A class to store an encryption key.
Definition: key.h:34
TDEABC::PhoneNumber
Phonenumber information.
Definition: phonenumber.h:39
TDEABC::SortMode
Sort method for sorting an addressee list.
Definition: sortmode.h:37
TDESharedPtr< AddresseeData >
operator<<
kdbgstream & operator<<(const TQValueList< T > &list)
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48

tdeabc

Skip menu "tdeabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.9.1
This website is maintained by Timothy Pearson.