kabc
distributionlist.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KABC_DISTRIBUTIONLIST_H
00022 #define KABC_DISTRIBUTIONLIST_H
00023
00024 #include "addressbook.h"
00025 #include <QtCore/QList>
00026
00027 namespace KABC {
00028
00029
00030 class Resource;
00031
00039 class KABC_EXPORT DistributionList
00040 {
00041 public:
00049 class KABC_EXPORT Entry
00050 {
00051 public:
00055 typedef QList<Entry> List;
00056
00060 Entry();
00061
00067 Entry( const Entry &other );
00068
00076 Entry( const Addressee &addressee, const QString &email );
00077
00081 ~Entry();
00082
00088 Entry &operator=( const Entry &other );
00089
00093 Addressee addressee() const;
00094
00100 QString email() const;
00101
00102 private:
00103 class Private;
00104 Private *const d;
00105 };
00106
00113 DistributionList( Resource *resource, const QString &name );
00114
00122 DistributionList( Resource *resource, const QString &identifier,
00123 const QString &name );
00124
00128 ~DistributionList();
00129
00135 void setIdentifier( const QString &identifier );
00136
00140 QString identifier() const;
00141
00147 void setName( const QString & );
00148
00152 QString name() const;
00153
00163 void insertEntry( const Addressee &, const QString &email=QString() );
00164
00173 void removeEntry( const Addressee &, const QString &email=QString() );
00174
00179 QStringList emails() const;
00180
00185 Entry::List entries() const;
00186
00187 Resource* resource() const;
00188
00189 private:
00190 class Private;
00191 Private *const d;
00192
00193 Q_DISABLE_COPY( DistributionList )
00194 };
00195
00199 typedef QMap<QString, DistributionList*> DistributionListMap;
00200
00201 }
00202 #endif