Projet Bee-Honey't  1.0
BTS SN 2019
emailaddress.h
Aller à la documentation de ce fichier.
1 /*
2  Copyright (c) 2011-2012 - Tőkés Attila
3  Copyright (C) 2015 Daniel Nicoletti <dantti12@gmail.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 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  Lesser General Public License for more details.
14 
15  See the LICENSE file for more details.
16 */
17 
18 #ifndef EMAILADDRESS_H
19 #define EMAILADDRESS_H
20 
21 #include <QtCore/QSharedDataPointer>
22 #include <QString>
23 
24 #include "smtpexports.h"
25 
26 namespace SimpleMail {
27 
30 {
31 public:
32  EmailAddress();
33  EmailAddress(const EmailAddress &other);
34  EmailAddress(const QString &address, const QString &name = QString());
35  virtual ~EmailAddress();
36 
37  EmailAddress &operator=(const EmailAddress &other);
38 
39  QString name() const;
40  void setName(const QString &name);
41 
42  QString address() const;
43  void setAddress(const QString &address);
44 
45 protected:
46  QSharedDataPointer<EmailAddressPrivate> d_ptr;
47 
48 private:
49  // Q_DECLARE_PRIVATE equivalent for shared data pointers
50  EmailAddressPrivate* d_func();
51  inline const EmailAddressPrivate* d_func() const
52  {
53  return d_ptr.constData();
54  }
55 };
56 
57 }
58 
59 #endif // EMAILADDRESS_H
#define SMTP_EXPORT
Definition: smtpexports.h:7
QSharedDataPointer< EmailAddressPrivate > d_ptr
Definition: emailaddress.h:46
const EmailAddressPrivate * d_func() const
Definition: emailaddress.h:51
Definition: emailaddress_p.h:27
Definition: emailaddress.h:26
Definition: emailaddress.h:29