/usr/include/kabc/distributionlist.h is in kdepimlibs5-dev 4:4.14.10-1ubuntu7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | /*
This file is part of libkabc.
Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KABC_DISTRIBUTIONLIST_H
#define KABC_DISTRIBUTIONLIST_H
#include "kabc_export.h"
#ifndef KDEPIM_NO_KRESOURCES
#include "addressbook.h"
#else
#include "addressee.h"
#include <QtCore/QMap>
#endif
#include <QtCore/QList>
namespace KABC {
//class DistributionListManager;
class Resource;
/**
@short Distribution list of email addresses
This class represents a list of email addresses. Each email address is
associated with an address book entry. If the address book entry changes, the
entry in the distribution list is automatically updated.
*/
class KABC_DEPRECATED_EXPORT DistributionList
{
public:
/**
@short Distribution List Entry
This class represents an entry of a distribution list. It consists of an
addressee and an email address. If the email address is null, the
preferred email address of the addressee is used.
*/
class KABC_EXPORT Entry
{
public:
/**
A list of Entry instances
*/
typedef QList<Entry> List;
/**
Creates an empty Entry instance
*/
Entry();
/**
Copy constructor.
@param other The Entry to copy from
*/
Entry( const Entry &other );
/**
Creates an Entry instance.
@param addressee The addressee of the list entry.
@param email The email address. If @c QString() the preferred email
of the @p addressee will be used instead
*/
Entry( const Addressee &addressee, const QString &email );
/**
Destroys the Entry instance.
*/
~Entry();
/**
Assignment operator.
@param other The Entry to assign to @c this
*/
Entry &operator=( const Entry &other );
/**
Returns the addressee of the list entry.
*/
Addressee addressee() const;
/**
Returns the email address of the list entry.
@return @c QString() if no specific email address has been set
*/
QString email() const;
private:
class Private;
Private *const d;
};
/**
Create distribution list object.
@param resource The resource the list belongs to.
@param name Name of this list.
*/
DistributionList( Resource *resource, const QString &name );
/**
Create distribution list object.
@param resource The resource the list belongs to.
@param identifier Identifier of this list.
@param name Name of this list.
*/
DistributionList( Resource *resource, const QString &identifier,
const QString &name );
/**
Destructor.
*/
~DistributionList();
/**
Sets the @p identifier of this list which is used as key by resources
@param identifier A unique identifier of the distribution list
*/
void setIdentifier( const QString &identifier );
/**
Returns the distribution list's identifier
*/
QString identifier() const;
/**
Set name of this list.
This is a i18n string for display to the user
*/
void setName( const QString & );
/**
Get name of this list.
*/
QString name() const;
/**
Insert an entry into this distribution list. If the entry already exists
nothing happens.
@param email Email address to use for comparison with already inserted
entries. If the same addressee is already in the list but
the @p email is not the same, insert it again, otherwise
update the already existing entry
*/
void insertEntry( const Addressee &, const QString &email=QString() );
/**
Remove an entry from this distribution list. If the entry doesn't exist
nothing happens.
@param email Email address to use as an additional check, since the
same addressee entry can be in the list multiple times
but with different emails
*/
void removeEntry( const Addressee &, const QString &email=QString() );
/**
Return list of email addresses, which belong to this distributon list.
These addresses can be directly used by e.g. a mail client.
*/
QStringList emails() const;
/**
Return list of entries belonging to this distribution list. This function
is mainly useful for a distribution list editor.
*/
Entry::List entries() const;
Resource *resource() const;
private:
class Private;
Private *const d;
Q_DISABLE_COPY( DistributionList )
};
/**
Typedef for map from IDs to respective DistribtionList
*/
typedef QMap<QString, DistributionList*> DistributionListMap;
}
#endif
|