Changes

Jump to navigation Jump to search
no edit summary
Line 66: Line 66:  
* GetCurrentUpdateStatus(): get information about the current activity being updated: its name, download size, a boolean flag indicating whether the download has completed, and a percentage progress indication (of either the download or the installation).
 
* GetCurrentUpdateStatus(): get information about the current activity being updated: its name, download size, a boolean flag indicating whether the download has completed, and a percentage progress indication (of either the download or the installation).
 
* Cancel(): Cancel the ongoing update session, waiting for a safe point before cancelling (e.g. to avoid aborting halfway through installing an activity). This will return immediately but the cancel will not be complete until indicated by the SessionStatus signal.
 
* Cancel(): Cancel the ongoing update session, waiting for a safe point before cancelling (e.g. to avoid aborting halfway through installing an activity). This will return immediately but the cancel will not be complete until indicated by the SessionStatus signal.
* QueryUpdates(): Start a new update session, querying for available activity updates. Returns a list of activities available. Each list entry will have: (bundle_id, URL, download_size, current_installed_version_number, update_version_number).
+
* FindUpdates(array of activities to check, optional automatic update parameter): Start a new update session, querying for available activity updates. Returns a list of updates available. Each list entry will have: (bundle_id, URL, download_size, current_installed_version_number, update_version_number). An optional parameter can be passed to trigger automatic upgrade to the new activities that are found.
 
* GetDetails(bundle_id): For a given bundle_id already identified as an update, download and return the activity name (localised) and icon.
 
* GetDetails(bundle_id): For a given bundle_id already identified as an update, download and return the activity name (localised) and icon.
* DoUpdate(bundle_id_1, bundle_id_2, ...): For the given bundle_ids already identified as updates, perform the activity update process (download, install).
+
* DoUpdate(bundle_id_1, bundle_id_2, ...): For the given bundle_ids already identified as updates and passed in as parameters, perform the activity update process (download, install).
* StartAutomaticUpdate(): internally perform QueryUpdates() and then run DoUpdates() on all available updates. Returns immediately having kicked off the process internally.
      
* Signal ActivityUpdating(bundle_id, download_size, download_completed, progress): Raised when an activity update is started, and then every 10 seconds until it is completed. The download_completed flag indicates whether the activity is downloading or installing, and the progress parameter indicates the percentage of the download or install.
 
* Signal ActivityUpdating(bundle_id, download_size, download_completed, progress): Raised when an activity update is started, and then every 10 seconds until it is completed. The download_completed flag indicates whether the activity is downloading or installing, and the progress parameter indicates the percentage of the download or install.
Line 82: Line 81:  
This API is intended for internal use only.
 
This API is intended for internal use only.
   −
When Sugar wants to launch an automatic activity update, it will make a dbus method call to StartAutomaticUpdate(), which will return immediately having kicked off an activity update inside activity-updater.
+
When Sugar wants to launch an automatic activity update, it will make a dbus method call to FindUpdates(), requesting that an automatic upgrade is performed.
    
When the user opens the "Software Update" section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.
 
When the user opens the "Software Update" section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.
   −
Activity installation/update will be done with the Sugar bundle registry API (jarabe.model.bundleregistry). The activity updater will instantiate its own bundle registry object in its own process.
+
Activity installation/update will be done with the sugar-toolkit bundle API (like sugar-install-bundle). Sugar will become aware of these events through the way it already watches the filesystem. It might be worth addressing #3707 as part of this implementation effort so that this is fully reliable.
 
  −
Sugar will become aware of these events through the way it already watches the filesystem. Ticket #3707 will be fixed as part of this implementation effort so that this is fully reliable.
      
== Future possibilities ==
 
== Future possibilities ==
105

edits

Navigation menu