21 #ifndef CLASSIFIED_BINARYFILEMODEL_H 22 #define CLASSIFIED_BINARYFILEMODEL_H 23 #include <QSqlDatabase> 24 #include "../mcontroller.h" 25 #include "../net/connection.h" 84 const QString& aFileName,
85 const QString& aDescription,
86 const QString& aMimeType,
87 const QString& aOwner,
88 const QString& aLicense,
89 const QByteArray& aContents,
91 bool aNoEncryption =
false,
92 const QList<Hash>* aBinaryRecipientList = NULL ) ;
127 const Hash& aPresumedSender,
128 QByteArray& aResultingBinaryFileData,
129 QByteArray& aResultingSignature,
130 bool* aIsBinaryFilePrivate ) ;
151 const QByteArray& aContent,
152 const QByteArray& aSignature,
153 const QList<quint32>& aBangPath,
154 const QByteArray& aKeyOfPublisher,
155 const unsigned char aFlags,
156 const quint32 aTimeStamp,
157 const Hash& aFromNode ) ;
173 const QByteArray& aContent,
174 const QByteArray& aSignature,
175 const QByteArray& aKeyOfPublisher,
176 const unsigned char aFlags,
177 const quint32 aTimeStamp,
178 const Hash& aFromNode ) ;
187 QByteArray& aResultingBinaryFileData,
188 QByteArray& aResultingSignature,
189 QByteArray& aPublicKeyOfPublisher,
190 bool* aIsBinaryFilePrivate,
191 bool* iIsBinaryFileCompressed ) ;
199 QByteArray& aResultingBinaryFileData,
200 QByteArray& aResultingSignature,
201 QByteArray& aPublicKeyOfPublisher,
202 bool* aIsBinaryFilePrivate,
203 bool* aIsBinaryFileCompressed,
204 quint32* aTimeOfPublish) ;
228 void fillBucket(QList<SendQueueItem>& aSendQueue,
229 const Hash& aStartOfBucket,
230 const Hash& aEndOfBucket,
231 quint32 aLastMutualConnectTime,
232 const Hash& aForNode );
235 const QString& aExplanation) ;
241 QByteArray& aResultingBinaryFileData,
242 QByteArray& aResultingSignature,
243 QByteArray& aPublicKeyOfPublisher,
244 bool* aIsBinaryFilePrivate,
245 bool* aIsBinaryFileCompressed,
246 quint32* aTimeOfPublish) ;
251 const QByteArray& aContent,
252 const QByteArray& aSignature,
253 const QList<quint32>& aBangPath,
254 const QByteArray& aKeyOfPublisher,
255 const unsigned char aFlags,
256 const quint32 aTimeStamp,
257 const bool aWasPublish,
258 const Hash& aFromNode ) ;
bool binaryFileDataByFingerPrint(const Hash &aFingerPrint, const Hash &aPresumedSender, QByteArray &aResultingBinaryFileData, QByteArray &aResultingSignature, bool *aIsBinaryFilePrivate)
MController * iController
Definition: binaryfilemodel.h:260
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:38
CAErrorSituation
Definition: mcontroller.h:52
void error(MController::CAErrorSituation aError, const QString &aExplanation)
ProtocolItemType
Definition: protocol.h:150
Carrier-class for binary blob.
Definition: binaryfile.h:37
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:45
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
datamodel-parts common part. this is inherited and contains common funcs
Definition: datamodelbase.h:39
void contentReceived(const Hash &aHashOfContent, const ProtocolItemType aTypeOfReceivdContent)
const MModelProtocolInterface & iModel
Definition: binaryfilemodel.h:261
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:37
BinaryFileModel(MController *aMController, const MModelProtocolInterface &aModel)
Hash publishBinaryFile(const Profile &aPublishingProfile, const QString &aFileName, const QString &aDescription, const QString &aMimeType, const QString &aOwner, const QString &aLicense, const QByteArray &aContents, bool aIsCompressed, bool aNoEncryption=false, const QList< Hash > *aBinaryRecipientList=NULL)
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:39