Skip to content

new worker API

Harald Sitter requested to merge work/workerbase into master

this pulls the new Result return system implemented in ftp and sftp into the actual base class. seeing as we need to change return types we need a completely separate set of symbols anyway, so I figure we can easily combine this with the kf6 task of changing to a less contentious name for the concept.

here's to the new WorkerBase

until kf6 SlaveBase still stays in charge of dispatching so we can easily drive both the new and old API using the same code. this requires a two-way bridging intermediary. the bridge implements a SlaveBase and then indeed forwards all virtual function calls to the new WorkerBase implementation, translating the returned WorkerResults back to the implicit signal expectations of the legacy SlaveBase. conversely the WorkerBase forwards non-virtual (i.e. business logic) function calls into the bridge (i.e. the SlaveBase)

all this then allows us to implement modern Workers already while still keeping legacy Slaves completely unchanged and also allowing both of them to be driven by the same dispatching logic.

the ftp worker has been moved to the new workerbase with minimal diff to demonstrate this working in principal; ftptest still passes.

I've also dropped all existing deprecations in favor of their modern variants. seems pointless to drag along legacy functions when we redo the class API anyway.

Edited by Harald Sitter

Merge request reports