Initial work on implementing tasks

This commit is contained in:
2026-09-10 21:36:43 -05:00
parent 79dfa963c2
commit 7a5667a53a
8 changed files with 163 additions and 25 deletions

View File

@@ -65,31 +65,36 @@ module W3DHubLauncher
# request installation of application
#
# periodically reports progress until completion
def self.install_application(app_id, channel_id)
def self.install_application(app_id, channel_id, &block)
Worker::Request.new(:task_install_application, { app_id: app_id, channel_id: channel_id }, &block)
end
# request update of application
#
# periodically reports progress until completion
def self.update_application(app_id, channel_id)
def self.update_application(app_id, channel_id, &block)
Worker::Request.new(:task_update_application, { app_id: app_id, channel_id: channel_id }, &block)
end
# request repair of application
#
# periodically reports progress until completion
def self.repair_application(app_id, channel_id)
def self.repair_application(app_id, channel_id, &block)
Worker::Request.new(:task_repair_application, { app_id: app_id, channel_id: channel_id }, &block)
end
# request relocation of application
#
# periodically reports progress until completion
def self.move_application(app_id, channel_id)
def self.move_application(app_id, channel_id, target_directory, &block)
Worker::Request.new(:task_move_application, { app_id: app_id, channel_id: channel_id, target_directory: target_directory }, &block)
end
# request removal of application
#
# periodically reports progress until completion
def self.uninstall_application(app_id, channel_id)
def self.uninstall_application(app_id, channel_id, &block)
Worker::Request.new(:task_uninstall_application, { app_id: app_id, channel_id: channel_id }, &block)
end
end
end