Classified ads
Public Member Functions | Public Attributes | List of all members
ProfileComment Class Reference

Carrier-class for comments of a profile. More...

#include <profilecomment.h>

Collaboration diagram for ProfileComment:
Collaboration graph

Public Member Functions

 ProfileComment (const Hash &aHash=KNullHash)
 ~ProfileComment ()
QByteArray asJSon (const MController &aController) const
bool fromJSon (const QByteArray &aJSonBytes, const MController &aController)
QVariant asQVariant (const MController &aController) const
bool setFromQVariant (const QVariantMap &aJSonAsQVariant, const MController &aController)

Public Attributes

Hash iFingerPrint
Hash iProfileFingerPrint
Hash iCommentorHash
QList< HashiAttachedFiles
QString iCommentText
QString iSubject
bool iIsPrivate
quint32 iTimeOfPublish
QByteArray iKeyOfCommentor
QString iCommentorNickName
Hash iReferences
ProtocolItemType iTypeOfObjectReferenced

Detailed Description

Carrier-class for comments of a profile.

Profile-comment data-item behaves much in same way as profile. These are either public or encrypted to profile readers, they might follow the same publish/retrieval procedures as profiles do.

Constructor & Destructor Documentation

◆ ProfileComment()

ProfileComment::ProfileComment ( const Hash aHash = KNullHash)

Constructor. Fingerprint must be given, this is normal when fetching a comment from storage. When publishing a new comment, the fingerprint naturally is not known in advance, in which case KNullHash may be used and real fingerprint can be then updated during publish-processconstructor

◆ ~ProfileComment()

ProfileComment::~ProfileComment ( )


Member Function Documentation

◆ asJSon()

QByteArray ProfileComment::asJSon ( const MController aController) const

returns profile comment data as JSon stream

◆ asQVariant()

QVariant ProfileComment::asQVariant ( const MController aController) const

Method for getting profile comment as JSon / QVariant

◆ fromJSon()

bool ProfileComment::fromJSon ( const QByteArray &  aJSonBytes,
const MController aController 

parses json into members

◆ setFromQVariant()

bool ProfileComment::setFromQVariant ( const QVariantMap &  aJSonAsQVariant,
const MController aController 

reverse of asQVariant()

true if QVariant looked like profile

Member Data Documentation

◆ iAttachedFiles

QList<Hash> ProfileComment::iAttachedFiles

◆ iCommentorHash

Hash ProfileComment::iCommentorHash

fingerprint of profile that posted the comment

◆ iCommentorNickName

QString ProfileComment::iCommentorNickName

if commentor is public profile, its nick

◆ iCommentText

QString ProfileComment::iCommentText

◆ iFingerPrint

Hash ProfileComment::iFingerPrint

fingerprint of the comment

◆ iIsPrivate

bool ProfileComment::iIsPrivate

if set to true, profile, and this comment too, is published encrypted

◆ iKeyOfCommentor

QByteArray ProfileComment::iKeyOfCommentor

public key of profile that sent the comment

◆ iProfileFingerPrint

Hash ProfileComment::iProfileFingerPrint

fingerprint of the profile commented

◆ iReferences

Hash ProfileComment::iReferences

if comment is reply to another comment, this is the hash of the commented comment

◆ iSubject

QString ProfileComment::iSubject

◆ iTimeOfPublish

quint32 ProfileComment::iTimeOfPublish

seconds since 1-jan-1970

◆ iTypeOfObjectReferenced

ProtocolItemType ProfileComment::iTypeOfObjectReferenced

if comment reference is CA, or profile, or another comment

The documentation for this class was generated from the following file: