testing/marionette/client/marionette/application_cache.py
author Ryan VanderMeulen <ryanvm@gmail.com>
Wed, 11 Feb 2015 12:15:22 -0500
changeset 228662 fe79362ffaaf4d0e71f2cd9773c328e7c6239001
parent 228653 testing/marionette/driver/marionette_driver/application_cache.py@0d04801bb2f083816da1b290f2247dae4cd82982
child 228737 650863f6987b37f96a4b9b234a6ff00ff4323a1e
permissions -rw-r--r--
Backed out 12 changesets (bug 1107336) for Marionette harness bustage on a CLOSED TREE. Backed out changeset 5075f0063d70 (bug 1107336) Backed out changeset 9ef91d4fcf3b (bug 1107336) Backed out changeset 995911340bf7 (bug 1107336) Backed out changeset 4817d3cd3810 (bug 1107336) Backed out changeset dad798a5e595 (bug 1107336) Backed out changeset 4f60c437140c (bug 1107336) Backed out changeset f92a5c6256fa (bug 1107336) Backed out changeset 399a436c6e5f (bug 1107336) Backed out changeset 0d04801bb2f0 (bug 1107336) Backed out changeset 60d9d4d20971 (bug 1107336) Backed out changeset 9c4b171c23be (bug 1107336) Backed out changeset a07bb95eb209 (bug 1107336)

"""
Copyright 2011 Software Freedom Conservancy.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

class ApplicationCache(object):

    UNCACHED = 0
    IDLE = 1
    CHECKING = 2
    DOWNLOADING = 3
    UPDATE_READY = 4
    OBSOLETE = 5

    def __init__(self, driver):
        self.driver = driver

    @property
    def status(self):
        return self.driver._send_message('getAppCacheStatus', 'value')