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 "kabc_export.h"
00025 #ifndef KDEPIM_NO_KRESOURCES
00026 #include "addressbook.h"
00027 #else
00028 #include "addressee.h"
00029 #include <QtCore/QMap>
00030 #endif
00031 #include <QtCore/QList>
00032
00033 namespace KABC {
00034
00035
00036 class Resource;
00037
00045 class KABC_EXPORT_DEPRECATED DistributionList
00046 {
00047 public:
00055 class KABC_EXPORT Entry
00056 {
00057 public:
00061 typedef QList<Entry> List;
00062
00066 Entry();
00067
00073 Entry( const Entry &other );
00074
00082 Entry( const Addressee &addressee, const QString &email );
00083
00087 ~Entry();
00088
00094 Entry &operator=( const Entry &other );
00095
00099 Addressee addressee() const;
00100
00106 QString email() const;
00107
00108 private:
00109 class Private;
00110 Private *const d;
00111 };
00112
00119 DistributionList( Resource *resource, const QString &name );
00120
00128 DistributionList( Resource *resource, const QString &identifier,
00129 const QString &name );
00130
00134 ~DistributionList();
00135
00141 void setIdentifier( const QString &identifier );
00142
00146 QString identifier() const;
00147
00153 void setName( const QString & );
00154
00158 QString name() const;
00159
00169 void insertEntry( const Addressee &, const QString &email=QString() );
00170
00179 void removeEntry( const Addressee &, const QString &email=QString() );
00180
00185 QStringList emails() const;
00186
00191 Entry::List entries() const;
00192
00193 Resource *resource() const;
00194
00195 private:
00196 class Private;
00197 Private *const d;
00198
00199 Q_DISABLE_COPY( DistributionList )
00200 };
00201
00205 typedef QMap<QString, DistributionList*> DistributionListMap;
00206
00207 }
00208 #endif