case message WrapperObject kDocumentobj auto pObject std make_unique M

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
case message::WrapperObject::kDocumentobj: {
auto pObject = std::make_unique<Model::Message>(Contract::MessageType::CrawlerObject, Contract::MessageCategory::Object); // FIXME: ???!!!
auto &ref = obj.documentobj();
pObject->AddProperty(Contract::PropertyType::Time, (uint32_t )ref.time());
pObject->AddProperty(Contract::PropertyType::SourceAddr, ref.workplacename());
pObject->AddProperty(Contract::PropertyType::SessionId, (uint32_t)ref.policyid());
pObject->AddProperty(Contract::PropertyType::Guid, ref.documentid());
pObject->AddProperty(Contract::PropertyType::Path, ref.path());
pObject->AddProperty(Contract::PropertyType::Size, (uint32_t)ref.size());
pObject->AddProperty(Contract::PropertyType::DateModified, (uint32_t)ref.modificationtime());
pObject->AddProperty(Contract::PropertyType::DateCreated, (uint32_t)ref.creationtime());
pObject->AddProperty(Contract::PropertyType::IsShared, (uint32_t)ref.isshared());
pObject->AddProperty(Contract::PropertyType::Content, convertToChunk(ref.content()));
return pObject;
}