NAME
Firefox::Marionette::UpdateStatus - Represents the resulting status of an Firefox update
VERSION
Version 1.62
SYNOPSIS
use Firefox::Marionette();
use v5.10;
my $firefox = Firefox::Marionette->new();
my $status = $firefox->update();
while($status->successful()) {
$status = $firefox->update();
}
say "Firefox has been upgraded to " . $status->display_version();
DESCRIPTION
This module handles the implementation of the status of a Firefox update using the Marionette protocol
SUBROUTINES/METHODS
new
accepts a hash as a parameter. Allowed keys are below;
app_version - application version of this update.
build_id - build id of this update. Used to determine a particular build, down to the hour, minute and second of its creation. This allows the system to differentiate between several nightly builds with the same |version|.
channel - channel used to retrieve this update from the Update Service.
details_url - URI offering details about the content of this update. This page is intended to summarise the differences between this update and the previous, which also links to the release notes.
display_version - string to display in the user interface for the version. If you want a real version number use app_version.
elevation_failure - has an elevation failure has been encountered for this update.
error_code - numeric error code that conveys additional information about the state of a failed update. If the update is not in the "failed" state the value is zero.
install_date - when the update was installed.
is_complete_update - is the update a complete replacement of the user's existing installation or a patch representing the difference between the new version and the previous version.
name - name of the update, which should look like "<Application Name> <Update Version>"
number_of_updates - the number of updates available.
patch_count - number of patches supplied by this update.
previous_app_version - application version prior to the application being updated.
prompt_wait_time - allows overriding the default amount of time in seconds before prompting the user to apply an update. If not specified, the value of app.update.promptWaitTime will be used.
selected_patch - currently selected patch for this update.
service_url - the Update Service that supplied this update.
status_text - message associated with this update, if any.
type - either 'minor', 'partial', which means a binary difference between two application versions or 'complete' which is a complete patch containing all of the replacement files to update to the new version
unsupported - is the update no longer supported on this system.
update_state - state of the selected patch;
- + downloading - the update is being downloaded.
- + pending - the update is ready to be applied.
- + pending-service - the update is ready to be applied with the service.
- + pending-elevate - the update is ready to be applied but requires elevation.
- + applying - the update is being applied.
- + applied - the update is ready to be switched to.
- + applied-os - the update is OS update and to be installed.
- + applied-service - the update is ready to be switched to with the service.
- + succeeded - the update was successfully applied.
- + download-failed - the update failed to be downloaded.
- + failed - the update failed to be applied.
update_status_code - a code describing the state of the patch.
This method returns a new update status object.
app_version
returns application version of this update.
build_id
returns the build id of this update. Used to determine a particular build, down to the hour, minute and second of its creation. This allows the system to differentiate between several nightly builds with the same |version|.
channel
returns the channel used to retrieve this update from the Update Service.
details_url
returns a URI offering details about the content of this update. This page is intended to summarise the differences between this update and the previous, which also links to the release notes.
display_version
returns a string to display in the user interface for the version. If you want a real version number use app_version.
elevation_failure
returns a boolean to indicate if an elevation failure has been encountered for this update.
error_code
returns a numeric error code that conveys additional information about the state of a failed update. If the update is not in the "failed" state the value is zero.
install_date
returns when the update was installed.
is_complete_update
returns a boolean to indicate if the update is a complete replacement of the user's existing installation or a patch representing the difference between the new version and the previous version.
name
returns name of the update, which should look like "<Application Name> <Update Version>"
number_of_updates
returns the number of updates available (seems to always be 1).
patch_count
returns the number of patches supplied by this update.
previous_app_version
returns application version prior to the application being updated.
prompt_wait_time
returns the amount of time in seconds before prompting the user to apply an update. If not specified, the value of app.update.promptWaitTime will be used.
selected_patch
returns the currently selected patch for this update.
service_url
returns a URI for the Update Service that supplied this update.
status_text
returns the message associated with this update, if any.
successful
returns a boolean to indicate if an update has been successfully applied.
type
returns either 'minor', 'partial', which means a binary difference between two application versions or 'complete' which is a complete patch containing all of the replacement files to update to the new version
unsupported
returns a boolean to show if the update is supported on this system.
update_state
returns the state of the selected patch;
- + downloading - the update is being downloaded.
- + pending - the update is ready to be applied.
- + pending-service - the update is ready to be applied with the service.
- + pending-elevate - the update is ready to be applied but requires elevation.
- + applying - the update is being applied.
- + applied - the update is ready to be switched to.
- + applied-os - the update is OS update and to be installed.
- + applied-service - the update is ready to be switched to with the service.
- + succeeded - the update was successfully applied.
- + download-failed - the update failed to be downloaded.
- + failed - the update failed to be applied.
The most usual state is "pending"
update_status_code
returns a code describing the state of the patch.
DIAGNOSTICS
None.
CONFIGURATION AND ENVIRONMENT
Firefox::Marionette::UpdateStatus requires no configuration files or environment variables.
DEPENDENCIES
None.
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
To report a bug, or view the current list of bugs, please visit https://github.com/david-dick/firefox-marionette/issues
AUTHOR
David Dick <ddick@cpan.org>
LICENSE AND COPYRIGHT
Copyright (c) 2024, David Dick <ddick@cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.