interface.py
ofrak.component.interface
ComponentInterface (Generic, ABC)
A component is responsible for modifying or create firmware resources. They are categorized as identifiers, unpackers, analyzers, modifiers and packers.
run(self, job_id, resource_id, job_context, resource_context, resource_view_context, config)
async
Parameters:
Name | Type | Description | Default |
---|---|---|---|
job_id |
bytes |
required | |
resource_id |
bytes |
required | |
job_context |
JobRunContext |
required | |
resource_context |
ResourceContext |
required | |
resource_view_context |
ResourceViewContext |
required | |
config |
~CC |
required |
Returns:
Type | Description |
---|---|
ComponentRunResult |
The IDs of all resources modified by this component |
Source code in ofrak/component/interface.py
@abstractmethod
async def run(
self,
job_id: bytes,
resource_id: bytes,
job_context: JobRunContext,
resource_context: ResourceContext,
resource_view_context: ResourceViewContext,
config: CC,
) -> ComponentRunResult:
"""
:param job_id:
:param resource_id:
:param job_context:
:param resource_context:
:param resource_view_context:
:param config:
:return: The IDs of all resources modified by this component
"""
raise NotImplementedError()