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

tdeabc

  • tdeabc
distributionlist.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_DISTRIBUTIONLIST_H
22 #define KABC_DISTRIBUTIONLIST_H
23 
24 #include <kdirwatch.h>
25 
26 #include "addressbook.h"
27 
28 namespace TDEABC {
29 
30 class DistributionListManager;
31 
39 class KABC_EXPORT DistributionList
40 {
41  public:
49  struct Entry
50  {
51  typedef TQValueList<Entry> List;
52 
53  Entry() {}
54  Entry( const Addressee &_addressee, const TQString &_email ) :
55  addressee( _addressee ), email( _email ) {}
56 
57  Addressee addressee;
58  TQString email;
59  };
60 
67  DistributionList( DistributionListManager *manager, const TQString &name );
68 
72  ~DistributionList();
73 
78  void setName( const TQString & );
79 
83  TQString name() const;
84 
89  void insertEntry( const Addressee &, const TQString &email=TQString::null );
90 
95  void removeEntry( const Addressee &, const TQString &email=TQString::null );
96 
101  TQStringList emails() const;
102 
107  Entry::List entries() const;
108 
109  private:
110  DistributionListManager *mManager;
111  TQString mName;
112 
113  Entry::List mEntries;
114 };
115 
122 class KABC_EXPORT DistributionListManager
123 {
124  public:
128  DistributionListManager( AddressBook * );
129 
133  ~DistributionListManager();
134 
138  DistributionList *list( const TQString &name ); // KDE4: add bool caseSensitive = true
139 
144  void insert( DistributionList * );
145 
150  void remove( DistributionList * );
151 
155  TQStringList listNames();
156 
160  bool load();
161 
165  bool save();
166 
167  private:
168  class DistributionListManagerPrivate;
169  DistributionListManagerPrivate *d;
170 
171  TQPtrList<DistributionList> mLists;
172 };
173 
189 class KABC_EXPORT DistributionListWatcher : public TQObject
190 {
191  Q_OBJECT
192 
193  public:
197  static DistributionListWatcher *self();
198 
199  signals:
205  void changed();
206 
207  protected:
208  DistributionListWatcher();
209  ~DistributionListWatcher();
210 
211  private:
212  static DistributionListWatcher* mSelf;
213  KDirWatch *mDirWatch;
214 };
215 
216 }
217 #endif
TDEABC::DistributionList::Entry
Distribution List Entry.
Definition: distributionlist.h:49
TDEABC::AddressBook
Address Book.
Definition: addressbook.h:43
TDEABC::DistributionListWatcher
Watchdog for distribution lists.
Definition: distributionlist.h:189
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
TDEABC::DistributionList
Distribution list of email addresses.
Definition: distributionlist.h:39
TDEABC::Addressee
address book entry
Definition: addressee.src.h:74
TDEABC::DistributionListManager
Manager of distribution lists.
Definition: distributionlist.h:122

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.8.8
This website is maintained by Timothy Pearson.