Class: DInstaller::DBus::Software::Manager
- Inherits:
-
BaseObject
- Object
- DBus::Object
- BaseObject
- DInstaller::DBus::Software::Manager
- Defined in:
- lib/dinstaller/dbus/software/manager.rb
Overview
D-Bus object to manage software installation
Constant Summary
Constants included from Interfaces::ServiceStatus
Interfaces::ServiceStatus::SERVICE_STATUS_BUSY, Interfaces::ServiceStatus::SERVICE_STATUS_IDLE, Interfaces::ServiceStatus::SERVICE_STATUS_INTERFACE
Constants included from Interfaces::Progress
Interfaces::Progress::PROGRESS_INTERFACE
Instance Method Summary collapse
- #available_base_products ⇒ Object
- #finish ⇒ Object
-
#initialize(backend, logger) ⇒ Manager
constructor
Constructor.
- #install ⇒ Object
- #probe ⇒ Object
- #propose ⇒ Object
- #select_product(product_id) ⇒ Object
-
#selected_base_product ⇒ String
Returns the selected base product.
Methods included from Interfaces::ServiceStatus
included, #register_service_status_callbacks, #service_status_all, #service_status_current
Methods included from Interfaces::Progress
included, #progress_current_step, #progress_finished, #progress_properties, #progress_total_steps, #register_progress_callbacks
Methods included from WithServiceStatus
Methods inherited from BaseObject
Constructor Details
#initialize(backend, logger) ⇒ Manager
Constructor
45 46 47 48 49 50 51 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 45 def initialize(backend, logger) super(PATH, logger: logger) @backend = backend register_callbacks register_progress_callbacks register_service_status_callbacks end |
Instance Method Details
#available_base_products ⇒ Object
83 84 85 86 87 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 83 def available_base_products backend.products.map do |id, data| [id, data["name"], { "description" => data["description"] }].freeze end end |
#finish ⇒ Object
112 113 114 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 112 def finish busy_while { backend.finish } end |
#install ⇒ Object
108 109 110 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 108 def install busy_while { backend.install } end |
#probe ⇒ Object
100 101 102 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 100 def probe busy_while { backend.probe } end |
#propose ⇒ Object
104 105 106 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 104 def propose busy_while { backend.propose } end |
#select_product(product_id) ⇒ Object
96 97 98 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 96 def select_product(product_id) backend.select_product(product_id) end |
#selected_base_product ⇒ String
Returns the selected base product
92 93 94 |
# File 'lib/dinstaller/dbus/software/manager.rb', line 92 def selected_base_product backend.product || "" end |