mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 07:41:20 -04:00
basic infrastructure for banning unwanted file content
This commit is contained in:
parent
7bdc61e3e3
commit
50e03a539c
9 changed files with 146 additions and 25 deletions
|
@ -34,11 +34,10 @@
|
|||
|
||||
#include "serialiser/rsserializer.h"
|
||||
|
||||
// These items have "flag type" numbers, but this is not used.
|
||||
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM = 0x01;
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM = 0x02;
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_CONFIG_ITEM = 0x03;
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM = 0x01;
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM = 0x02;
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_CONFIG_ITEM = 0x03;
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_BANNED_HASHES_ITEM = 0x04;
|
||||
|
||||
/*!
|
||||
* Base class for filelist sync items
|
||||
|
@ -103,6 +102,17 @@ public:
|
|||
RsTlvBinaryData directory_content_data ; // encoded binary data. This allows to vary the encoding format, in a way that is transparent to the serialiser.
|
||||
};
|
||||
|
||||
class RsFileListsBannedHashesItem: public RsFileListsItem
|
||||
{
|
||||
public:
|
||||
RsFileListsBannedHashesItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_BANNED_HASHES_ITEM){}
|
||||
|
||||
virtual void clear();
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
std::set<RsFileHash> encrypted_hashes ;// hash of hash for each banned file.
|
||||
};
|
||||
|
||||
class RsFileListsSerialiser : public RsServiceSerializer
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue