Skip to content

Commit

Permalink
[Dropper] + add dummy integration for Dropper with a multimedia mini …
Browse files Browse the repository at this point in the history
…plugin - PNG #182 #181

Signed-off-by: Gheorghita Mutu <gheorghitamutu@gmail.com>
  • Loading branch information
gheorghitamutu committed Apr 8, 2024
1 parent 2029f47 commit de14263
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
21 changes: 21 additions & 0 deletions GenericPlugins/Dropper/include/Multimedia.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include "IDrop.hpp"

namespace GView::GenericPlugins::Droppper::Multimedia
{
class PNG : public IDrop
{
private:
public:
PNG() = default;

virtual const char* GetName() override;
virtual ObjectCategory GetGroup() override;
virtual const char* GetOutputExtension() override;
virtual Priority GetPriority() override;
virtual bool ShouldGroupInOneFile() override;

virtual Result Check(uint64 offset, DataCache& file, BufferView precachedBuffer, uint64& start, uint64& end) override;
};
} // namespace GView::GenericPlugins::Droppper::Multimedia
3 changes: 2 additions & 1 deletion GenericPlugins/Dropper/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target_sources(Dropper PRIVATE
Dropper.cpp
SpecialStrings/IpAddress.cpp
Executables/MZPE.cpp)
Executables/MZPE.cpp
Multimedia/PNG.cpp)
37 changes: 37 additions & 0 deletions GenericPlugins/Dropper/src/Multimedia/PNG.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "Multimedia.hpp"

namespace GView::GenericPlugins::Droppper::Multimedia
{
constexpr uint32 IMAGE_PNG_MAGIC = 0x474E5089;

const char* PNG::GetName()
{
return "PNG";
}

ObjectCategory PNG::GetGroup()
{
return ObjectCategory::Multimedia;
}

const char* PNG::GetOutputExtension()
{
return "png";
}

Priority PNG::GetPriority()
{
return Priority::Binary;
}

bool PNG::ShouldGroupInOneFile()
{
return false;
}

Result PNG::Check(uint64 offset, DataCache& file, BufferView precachedBuffer, uint64& start, uint64& end)
{
return Result::NotFound;
}

} // namespace GView::GenericPlugins::Droppper::Multimedia

0 comments on commit de14263

Please sign in to comment.