1 | /* |
2 | This file is part of KDE. |
3 | |
4 | Copyright (c) 2008 Cornelius Schumacher <schumacher@kde.org> |
5 | |
6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Lesser General Public |
8 | License as published by the Free Software Foundation; either |
9 | version 2.1 of the License, or (at your option) version 3, or any |
10 | later version accepted by the membership of KDE e.V. (or its |
11 | successor approved by the membership of KDE e.V.), which shall |
12 | act as a proxy defined in Section 6 of version 3 of the license. |
13 | |
14 | This library is distributed in the hope that it will be useful, |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 | Lesser General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Lesser General Public |
20 | License along with this library. If not, see <http://www.gnu.org/licenses/>. |
21 | |
22 | */ |
23 | #ifndef ATTICA_PERSON_H |
24 | #define ATTICA_PERSON_H |
25 | |
26 | #include <QtCore/QDate> |
27 | #include <QtCore/QList> |
28 | #include <QtCore/QMap> |
29 | #include <QtCore/QSharedDataPointer> |
30 | #include <QtCore/QUrl> |
31 | |
32 | #include "atticaclient_export.h" |
33 | |
34 | |
35 | namespace Attica { |
36 | |
37 | class ATTICA_EXPORT Person |
38 | { |
39 | public: |
40 | typedef QList<Person> List; |
41 | class Parser; |
42 | |
43 | Person(); |
44 | Person(const Person& other); |
45 | Person& operator=(const Person& other); |
46 | ~Person(); |
47 | |
48 | void setId( const QString & ); |
49 | QString id() const; |
50 | |
51 | void setFirstName( const QString & ); |
52 | QString firstName() const; |
53 | |
54 | void setLastName( const QString & ); |
55 | QString lastName() const; |
56 | |
57 | void setBirthday( const QDate & ); |
58 | QDate birthday() const; |
59 | |
60 | void setCountry( const QString & ); |
61 | QString country() const; |
62 | |
63 | void setLatitude( qreal ); |
64 | qreal latitude() const; |
65 | |
66 | void setLongitude( qreal ); |
67 | qreal longitude() const; |
68 | |
69 | void setAvatarUrl( const QUrl & ); |
70 | QUrl avatarUrl() const; |
71 | |
72 | void setHomepage( const QString & ); |
73 | QString homepage() const; |
74 | |
75 | void setCity( const QString & ); |
76 | QString city() const; |
77 | |
78 | void addExtendedAttribute( const QString &key, const QString &value ); |
79 | QString extendedAttribute( const QString &key ) const; |
80 | |
81 | QMap<QString,QString> extendedAttributes() const; |
82 | |
83 | bool isValid() const; |
84 | |
85 | private: |
86 | class Private; |
87 | QSharedDataPointer<Private> d; |
88 | }; |
89 | |
90 | } |
91 | |
92 | #endif |
93 | |