Classified ads
profile.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Jarvinen 2013.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads 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) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef CLASSIFIED_PROFILE_H
22 #define CLASSIFIED_PROFILE_H
23 #include <QString>
24 #include "../util/hash.h" // for class Hash
25 #include <QImage>
26 #include <QVariant> // actually for qvariantmap
27 
28 class MController ;
29 class Node ;
30 
37 class Profile : public QObject {
38  Q_OBJECT
39 
40 public:
41  Profile(const Hash& aHash) ;
42  ~Profile() ;
52  QString displayName() const ;
53  QByteArray asJSon(const MController& aController) const ;
57  QVariant asQVariant(const MController& aController) const ;
67  bool setFromQVariant(const QVariantMap& aJSonAsQVariant,
68  const MController& aController,
69  bool aOmitImage = false) ;
78  bool fromJSon(const QByteArray &aJSonBytes,
79  const MController& aController,
80  bool aOmitImage = false ) ;
81  const Hash iFingerPrint ;
82  QString iNickName ;
83  QString iGreetingText ;
84  QString iFirstName ;
85  QString iFamilyName ;
86  QString iCityCountry ;
87  QString iBTCAddress ;
88  QString iStateOfTheWorld ;
89  bool iIsPrivate ;
90  quint32 iTimeOfPublish ;
95  QList<Hash> iProfileReaders ;
96  QImage iProfilePicture ;
97  QList<Hash> iSharedFiles ;
99  QList<Hash> iTrustList ;
100 } ;
101 #endif
Node is a peer in network.
Definition: node.h:40
bool setFromQVariant(const QVariantMap &aJSonAsQVariant, const MController &aController, bool aOmitImage=false)
QString iCityCountry
Definition: profile.h:86
QList< Hash > iSharedFiles
Definition: profile.h:97
const Hash iFingerPrint
Definition: profile.h:81
QByteArray asJSon(const MController &aController) const
Profile(const Hash &aHash)
Hash is class that carries 160-bit digest.
Definition: hash.h:38
QString iFirstName
Definition: profile.h:84
quint32 iTimeOfPublish
Definition: profile.h:90
QVariant asQVariant(const MController &aController) const
QString iGreetingText
Definition: profile.h:83
bool iIsPrivate
Definition: profile.h:89
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
bool fromJSon(const QByteArray &aJSonBytes, const MController &aController, bool aOmitImage=false)
QString iFamilyName
Definition: profile.h:85
QList< Hash > iTrustList
Definition: profile.h:99
QImage iProfilePicture
Definition: profile.h:96
QString iBTCAddress
Definition: profile.h:87
QString displayName() const
QString iNickName
Definition: profile.h:82
QList< Hash > iProfileReaders
Definition: profile.h:95
Node * iNodeOfProfile
Definition: profile.h:98
Carrier-class for user-profile data.
Definition: profile.h:37
QString iStateOfTheWorld
Definition: profile.h:88