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

kabc

  • kabc
distributionlist.h
1 /*
2  This file is part of libkabc.
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 KABC {
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
KABC::DistributionList::Entry
Distribution List Entry.
Definition: distributionlist.h:49
KABC::DistributionListWatcher
Watchdog for distribution lists.
Definition: distributionlist.h:189
KABC::DistributionList
Distribution list of email addresses.
Definition: distributionlist.h:39
KABC::DistributionListManager
Manager of distribution lists.
Definition: distributionlist.h:122
KABC::Addressee
address book entry
Definition: addressee.src.h:74
KABC::AddressBook
Address Book.
Definition: addressbook.h:43

kabc

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

kabc

Skip menu "kabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kabc by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |