case message WrapperObject kAppobj auto pObject std make_unique Model

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
case message::WrapperObject::kAppobj: {
auto pObject = std::make_unique<Model::Message>(Contract::MessageType::Process, Contract::MessageCategory::Object);
auto &ref = obj.appobj();
pObject->AddProperty(Contract::PropertyType::Account, ref.account());
pObject->AddProperty(Contract::PropertyType::Time, ref.time());
if(ref.action() == "RUN") {
pObject->AddProperty(Contract::PropertyType::NotifyType,(uint32_t)0);
} else if(ref.action() == "EXIT") {
pObject->AddProperty(Contract::PropertyType::NotifyType,(uint32_t)1);
}
pObject->AddProperty(Contract::PropertyType::ProcessName, ref.processname());
pObject->AddProperty(Contract::PropertyType::ProcessId, ref.processid());
pObject->AddProperty(Contract::PropertyType::Path, ref.filepath());
pObject->AddProperty(Contract::PropertyType::SourceAddr, ref.machinename()); // FIXME: SourceAddr ??!!!
return pObject;
}