distributionlist.h
00001 #ifndef DISTRIBUTIONLIST_H
00002 #define DISTRIBUTIONLIST_H
00003
00004 #include <kabc/addressee.h>
00005
00006 namespace KABC {
00007 class AddressBook;
00008 }
00009
00010 namespace KPIM {
00011
00022 class DistributionList : public KABC::Addressee
00023 {
00024 public:
00032 struct Entry
00033 {
00034 typedef QValueList<Entry> List;
00035
00036 Entry() {}
00037 Entry( const Addressee &_addressee, const QString &_email ) :
00038 addressee( _addressee ), email( _email ) {}
00039
00040 Addressee addressee;
00041 QString email;
00042 };
00043
00044 typedef QValueList<DistributionList> List;
00045
00052 DistributionList();
00053 DistributionList( const KABC::Addressee& addr );
00054
00058 ~DistributionList() {}
00059
00061 void setName( const QString &name );
00062
00063 QString name() const { return formattedName(); }
00064
00069 void insertEntry( const Addressee &, const QString &email=QString::null );
00070
00075 void removeEntry( const Addressee &, const QString &email=QString::null );
00076
00078 void insertEntry( const QString& uid, const QString& email=QString::null );
00080 void removeEntry( const QString& uid, const QString& email=QString::null );
00081
00082
00088 QStringList emails( KABC::AddressBook* book ) const;
00089
00095 Entry::List entries( KABC::AddressBook* book ) const;
00096
00097
00098 static bool isDistributionList( const KABC::Addressee& addr );
00099
00100
00101 static DistributionList findByName( KABC::AddressBook* book,
00102 const QString& name,
00103 bool caseSensitive = true );
00104
00105
00106
00107 static QValueList<DistributionList> allDistributionLists( KABC::AddressBook* book );
00108
00109
00110 private:
00111
00112 };
00113
00114 };
00115
00116 #endif
00117
This file is part of the documentation for libkdepim Library Version 3.3.2.