20 #ifndef CLASSIFIED_BINARYFILEMODEL_H
21 #define CLASSIFIED_BINARYFILEMODEL_H
22 #include <QSqlDatabase>
23 #include "../mcontroller.h"
24 #include "../net/connection.h"
80 const QString& aFileName,
81 const QString& aDescription,
82 const QString& aMimeType,
83 const QByteArray& aContents,
85 bool aNoEncryption =
false,
86 const QList<Hash>* aBinaryRecipientList = NULL ) ;
121 const Hash& aPresumedSender,
122 QByteArray& aResultingBinaryFileData,
123 QByteArray& aResultingSignature,
124 bool* aIsBinaryFilePrivate ) ;
145 const QByteArray& aContent,
146 const QByteArray& aSignature,
147 const QList<quint32>& aBangPath,
148 const QByteArray& aKeyOfPublisher,
149 const unsigned char aFlags,
150 const quint32 aTimeStamp,
151 const Hash& aFromNode ) ;
167 const QByteArray& aContent,
168 const QByteArray& aSignature,
169 const QByteArray& aKeyOfPublisher,
170 const unsigned char aFlags,
171 const quint32 aTimeStamp,
172 const Hash& aFromNode ) ;
181 QByteArray& aResultingBinaryFileData,
182 QByteArray& aResultingSignature,
183 QByteArray& aPublicKeyOfPublisher,
184 bool* aIsBinaryFilePrivate,
185 bool* iIsBinaryFileCompressed ) ;
193 QByteArray& aResultingBinaryFileData,
194 QByteArray& aResultingSignature,
195 QByteArray& aPublicKeyOfPublisher,
196 bool* aIsBinaryFilePrivate,
197 bool* aIsBinaryFileCompressed,
198 quint32* aTimeOfPublish) ;
222 void fillBucket(QList<SendQueueItem>& aSendQueue,
223 const Hash& aStartOfBucket,
224 const Hash& aEndOfBucket,
225 quint32 aLastMutualConnectTime,
226 const Hash& aForNode );
229 const QString& aExplanation) ;
235 QByteArray& aResultingBinaryFileData,
236 QByteArray& aResultingSignature,
237 QByteArray& aPublicKeyOfPublisher,
238 bool* aIsBinaryFilePrivate,
239 bool* aIsBinaryFileCompressed,
240 quint32* aTimeOfPublish) ;
245 const QByteArray& aContent,
246 const QByteArray& aSignature,
247 const QList<quint32>& aBangPath,
248 const QByteArray& aKeyOfPublisher,
249 const unsigned char aFlags,
250 const quint32 aTimeStamp,
251 const bool aWasPublish,
252 const Hash& aFromNode ) ;
bool binaryFileDataByFingerPrint(const Hash &aFingerPrint, const Hash &aPresumedSender, QByteArray &aResultingBinaryFileData, QByteArray &aResultingSignature, bool *aIsBinaryFilePrivate)
MController * iController
Definition: binaryfilemodel.h:254
bool sentBinaryFileReceived(const Hash &aFingerPrint, const QByteArray &aContent, const QByteArray &aSignature, const QByteArray &aKeyOfPublisher, const unsigned char aFlags, const quint32 aTimeStamp, const Hash &aFromNode)
bool doFindBinaryFileForPublishOrSend(const Hash &aFingerPrint, QByteArray &aResultingBinaryFileData, QByteArray &aResultingSignature, QByteArray &aPublicKeyOfPublisher, bool *aIsBinaryFilePrivate, bool *aIsBinaryFileCompressed, quint32 *aTimeOfPublish)
Hash is class that carries 160-bit digest.
Definition: hash.h:37
CAErrorSituation
Definition: mcontroller.h:48
void error(MController::CAErrorSituation aError, const QString &aExplanation)
ProtocolItemType
Definition: protocol.h:124
Carrier-class for binary blob.
Definition: binaryfile.h:36
bool binaryFileDataForSend(const Hash &aFingerPrint, QByteArray &aResultingBinaryFileData, QByteArray &aResultingSignature, QByteArray &aPublicKeyOfPublisher, bool *aIsBinaryFilePrivate, bool *aIsBinaryFileCompressed, quint32 *aTimeOfPublish)
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
void contentReceived(const Hash &aHashOfContent, const ProtocolItemType aTypeOfReceivdContent)
Hash publishBinaryFile(const Profile &aPublishingProfile, const QString &aFileName, const QString &aDescription, const QString &aMimeType, const QByteArray &aContents, bool aIsCompressed, bool aNoEncryption=false, const QList< Hash > *aBinaryRecipientList=NULL)
const MModelProtocolInterface & iModel
Definition: binaryfilemodel.h:255
bool binaryFileDataForPublish(const Hash &aFingerPrint, QByteArray &aResultingBinaryFileData, QByteArray &aResultingSignature, QByteArray &aPublicKeyOfPublisher, bool *aIsBinaryFilePrivate, bool *iIsBinaryFileCompressed)
BinaryFile * binaryFileByFingerPrint(const Hash &aFingerPrint)
bool doHandleReceivedFile(const Hash &aFingerPrint, const QByteArray &aContent, const QByteArray &aSignature, const QList< quint32 > &aBangPath, const QByteArray &aKeyOfPublisher, const unsigned char aFlags, const quint32 aTimeStamp, const bool aWasPublish, const Hash &aFromNode)
bool publishedBinaryFileReceived(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)
Carrier-class for user-profile data.
Definition: profile.h:36
BinaryFileModel(MController *aMController, const MModelProtocolInterface &aModel)
void fillBucket(QList< SendQueueItem > &aSendQueue, const Hash &aStartOfBucket, const Hash &aEndOfBucket, quint32 aLastMutualConnectTime, const Hash &aForNode)
This is part of datamodel for any binary blobs.
Definition: binaryfilemodel.h:38