21 #ifndef CLASSIFIED_CADBRECORDMODEL_H 22 #define CLASSIFIED_CADBRECORDMODEL_H 24 #include "../mcontroller.h" 25 #include "../net/protocol.h" 73 const QList<Hash>* aRecordReaders = NULL ) ;
136 const quint32 aModifiedAfter = 0 ,
137 const quint32 aModifiedBefore = std::numeric_limits<quint32>::max(),
138 const qint64 aByHavingNumberMoreThan = std::numeric_limits<qint64>::min(),
139 const qint64 aByHavingNumberLessThan = std::numeric_limits<qint64>::max(),
140 const QString& aBySearchPhrase = QString::null,
142 const bool aForPublish =
false ) ;
157 const QByteArray& aSignature,
158 const QList<quint32>& aBangPath,
159 const Hash& aFromNode) ;
170 const QByteArray& aSignature,
171 const Hash& aFromNode ) ;
191 void fillBucket(QList<SendQueueItem>& aSendQueue,
192 const Hash& aStartOfBucket,
193 const Hash& aEndOfBucket,
194 quint32 aLastMutualConnectTime,
195 const Hash& aForNode );
204 const QByteArray& aSignature,
205 const QList<quint32>& aBangPath,
206 const Hash& aFromNode,
211 const QByteArray& aSignature,
212 quint32 aReceivedFrom ) ;
223 quint32* aTimestampOfOldRecord = NULL ) ;
242 const QByteArray& aSignature,
243 QList<QPair<Hash,Hash> >& aListOfGoodSignatures ) ;
246 const Hash& aSenderId) ;
248 const Hash& aSenderId,
249 bool aNewVerificationStatus) ;
251 bool aIsNewRecord ) ;
255 const QString& aExplanation) ;
258 const Hash& aHashOfCollection,
bool tryVerifyRecord(CaDbRecord &aRecord, const QByteArray &aSignature, QList< QPair< Hash, Hash > > &aListOfGoodSignatures)
void updateRecordVerification(const Hash &aRecordId, const Hash &aSenderId, bool aNewVerificationStatus)
MController * iController
Definition: cadbrecordmodel.h:261
QString isRecordNew(const CaDbRecord &aRecord, bool *aResult, quint32 *aTimestampOfOldRecord=NULL)
QString persistDbRecordIntoDb(const CaDbRecord &aRecord, bool aIsNew, const QByteArray &aSignature, quint32 aReceivedFrom)
void deleteRecord(const Hash &aRecordId, const Hash &aSenderId)
void error(MController::CAErrorSituation aError, const QString &aExplanation)
CaDbRecordModel(MController *aMController, const MModelProtocolInterface &aModel)
bool sentCaDbRecordReceived(CaDbRecord &aRecord, const QByteArray &aSignature, const Hash &aFromNode)
QList< CaDbRecord * > searchRecords(const Hash &aFromCollection, const Hash &aById=KNullHash, const quint32 aModifiedAfter=0, const quint32 aModifiedBefore=std::numeric_limits< quint32 >::max(), const qint64 aByHavingNumberMoreThan=std::numeric_limits< qint64 >::min(), const qint64 aByHavingNumberLessThan=std::numeric_limits< qint64 >::max(), const QString &aBySearchPhrase=QString::null, const Hash &aBySender=KNullHash, const bool aForPublish=false)
Hash is class that carries 160-bit digest.
Definition: hash.h:38
CAErrorSituation
Definition: mcontroller.h:57
const MModelProtocolInterface & iModel
Definition: cadbrecordmodel.h:262
bool publishedCaDbRecordReceived(CaDbRecord &aRecord, const QByteArray &aSignature, const QList< quint32 > &aBangPath, const Hash &aFromNode)
ProtocolItemType
Definition: protocol.h:157
void contentReceived(const Hash &aHashOfContent, const Hash &aHashOfCollection, const ProtocolItemType aTypeOfReceivedContent)
bool doHandlepublishedOrSentRecord(CaDbRecord &aRecord, const QByteArray &aSignature, const QList< quint32 > &aBangPath, const Hash &aFromNode, bool aWasPublish)
Pure-virtual interface of datamodel for message parser to use.
Definition: mmodelprotocolinterface.h:46
void fillBucket(QList< SendQueueItem > &aSendQueue, const Hash &aStartOfBucket, const Hash &aEndOfBucket, quint32 aLastMutualConnectTime, const Hash &aForNode)
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:48
datamodel-parts common part. this is inherited and contains common funcs
Definition: datamodelbase.h:39
QString publishDbRecord(CaDbRecord &aRecord, const QList< Hash > *aRecordReaders=NULL)
method for storing and publishing a database record.
void updateFTS(const CaDbRecord &aRecord, bool aIsNewRecord)
This is is part of datamodel for storing database records.
Definition: cadbrecordmodel.h:44
Data record in distributed database.
Definition: cadbrecord.h:35