MCPcopy Create free account
hub / github.com/DFIR-ORC/dfir-orc / SetOutputSpec

Method SetOutputSpec

src/OrcLib/Configuration/ConfigFile.cpp:413–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413HRESULT ConfigFile::SetOutputSpec(ConfigItem& item, const OutputSpec& outputSpec)
414{
415
416 switch (outputSpec.Type)
417 {
418 case OutputSpec::Kind::File:
419 item.strData = outputSpec.Path;
420 item.Status = ConfigItem::PRESENT;
421 break;
422 case OutputSpec::Kind::Archive:
423 item.strData = outputSpec.Path;
424 if (outputSpec.ArchiveFormat != ArchiveFormat::Unknown)
425 {
426 item.SubItems[CONFIG_OUTPUT_FORMAT].strData =
427 OrcArchive::GetArchiveFormatString(outputSpec.ArchiveFormat);
428 item.SubItems[CONFIG_OUTPUT_FORMAT].Status = ConfigItem::PRESENT;
429 }
430 if (!outputSpec.Compression.empty())
431 {
432 item.SubItems[CONFIG_OUTPUT_COMPRESSION].strData = outputSpec.Compression;
433 item.SubItems[CONFIG_OUTPUT_COMPRESSION].Status = ConfigItem::PRESENT;
434 }
435 if (!outputSpec.Password.empty())
436 {
437 item.SubItems[CONFIG_OUTPUT_PASSWORD].strData = outputSpec.Password;
438 item.SubItems[CONFIG_OUTPUT_PASSWORD].Status = ConfigItem::PRESENT;
439 }
440 item.Status = ConfigItem::PRESENT;
441 break;
442 case OutputSpec::Kind::TableFile:
443 return E_NOTIMPL;
444 }
445
446 DBG_UNREFERENCED_PARAMETER(outputSpec);
447 DBG_UNREFERENCED_PARAMETER(item);
448 return S_OK;
449}
450
451HRESULT ConfigFile::GetOutputDir(const ConfigItem& item, std::wstring& outputDir, OutputSpec::Encoding& anEncoding)
452{

Callers 1

WriteGetThisConfigMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected