20 #ifndef CLASSIFIED_CLASSIFIEDADMODEL_H
21 #define CLASSIFIED_CLASSIFIEDADMODEL_H
22 #include <QSqlDatabase>
23 #include "../mcontroller.h"
24 #include "../net/protocol.h"
142 QByteArray& aResultingCaData,
143 QByteArray& aResultingSignature,
144 QByteArray& aPublicKeyOfPublisher,
145 quint32* aTimeOfPublish = NULL ) ;
169 const QByteArray& aContent,
170 const QByteArray& aSignature,
171 const QList<quint32>& aBangPath,
172 const QByteArray& aKeyOfPublisher,
173 const unsigned char aFlags,
174 const quint32 aTimeStamp,
175 const Hash& aFromNode ) ;
191 const QByteArray& aContent,
192 const QByteArray& aSignature,
193 const QByteArray& aKeyOfPublisher,
194 const unsigned char aFlags,
195 const quint32 aTimeStamp,
196 const Hash& aFromNode ) ;
225 void fillBucket(QList<SendQueueItem>& aSendQueue,
226 const Hash& aStartOfBucket,
227 const Hash& aEndOfBucket,
228 quint32 aLastMutualConnectTime,
229 const Hash& aForNode );
246 QList<QPair<Hash,quint32> >& aResultingArticles,
247 const Hash& aRequestingNode ) ;
263 const Hash& aRequestingNode,
264 const Hash& aClassification) ;
272 const QString& aExplanation) ;
280 const Hash& aHashOfClassification,
289 const QByteArray& aContent,
290 const QByteArray& aSignature,
291 const QList<quint32>& aBangPath,
292 const QByteArray& aKeyOfPublisher,
293 const unsigned char aFlags,
294 const quint32 aTimeStamp,
296 const Hash& aFromNode ) ;
ClassifiedAdsModel(MController *aMController, const MModelProtocolInterface &aModel)
void fillBucket(QList< SendQueueItem > &aSendQueue, const Hash &aStartOfBucket, const Hash &aEndOfBucket, quint32 aLastMutualConnectTime, const Hash &aForNode)
virtual void newCaReceived(const CA &aNewCa)=0
const MModelProtocolInterface & iModel
Definition: camodel.h:299
QList< CAObserver * > * iNewCaObservers
Definition: camodel.h:300
ConcernOfAd
Definition: camodel.h:58
bool caListingByClassificationReceived(QList< QPair< Hash, quint32 > > &aReceivedArticles, const Hash &aRequestingNode, const Hash &aClassification)
Hash is class that carries 160-bit digest.
Definition: hash.h:37
CAErrorSituation
Definition: mcontroller.h:48
CA caByHash(const Hash &aFingerPrint)
QString localizedConcernOfAdString(ConcernOfAd aConcern) const
bool caDataForPublish(const Hash &aFingerPrint, QByteArray &aResultingCaData, QByteArray &aResultingSignature, QByteArray &aPublicKeyOfPublisher, quint32 *aTimeOfPublish=NULL)
ProtocolItemType
Definition: protocol.h:124
This is part of datamodel for storage/retrieval of classified ads.
Definition: camodel.h:38
bool sentCAReceived(const Hash &aFingerPrint, const QByteArray &aContent, const QByteArray &aSignature, const QByteArray &aKeyOfPublisher, const unsigned char aFlags, const quint32 aTimeStamp, const Hash &aFromNode)
bool doHandleReceivedCA(const Hash &aFingerPrint, const QByteArray &aContent, const QByteArray &aSignature, const QList< quint32 > &aBangPath, const QByteArray &aKeyOfPublisher, const unsigned char aFlags, const quint32 aTimeStamp, bool aWasPublish, const Hash &aFromNode)
Carrier-class for classified ad.
Definition: ca.h:34
Pure-virtual interface of datamodel for message parser to use.
Definition: mmodelprotocolinterface.h:44
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:39
datamodel-parts common part. this is inherited and contains common funcs
Definition: datamodelbase.h:38
bool publishedCAReceived(const Hash &aFingerPrint, const QByteArray &aContent, const QByteArray &aSignature, const QList< quint32 > &aBangPath, const QByteArray &aKeyOfPublisher, const unsigned char aFlags, const quint32 aTimeStamp, const Hash &aFromNode)
void reIndexAllAdsIntoFTS()
const QString & concernOfAdString(ConcernOfAd aConcern) const
void removeCAObserver(CAObserver *aObserver)
void caListingByClassification(const Hash &aClassificationHash, quint32 aStartDate, quint32 aEndDate, QList< QPair< Hash, quint32 > > &aResultingArticles, const Hash &aRequestingNode)
MController * iController
Definition: camodel.h:298
void installCAObserver(CAObserver *aObserver)
void contentReceived(const Hash &aHashOfContent, const Hash &aHashOfClassification, const ProtocolItemType aTypeOfReceivdContent)
const QString & purposeOfAdString(PurposeOfAd aPurpose) const
Hash publishClassifiedAd(const Profile &aPublishingProfile, CA &aAd)
Carrier-class for user-profile data.
Definition: profile.h:36
QString localizedPurposeOfAdString(PurposeOfAd aPurpose) const
void error(MController::CAErrorSituation aError, const QString &aExplanation)
PurposeOfAd
Definition: camodel.h:46