Logo Search packages:      
Sourcecode: zeroinstall-injector version File versions

zeroinstall::injector::policy::Policy Class Reference

Inherited by gui::GUIPolicy, and zeroinstall::injector::autopolicy::AutoPolicy.

List of all members.


Detailed Description

Chooses a set of implementations based on a policy.
Typical use:
 1. Create a Policy object, giving it the URI of the program to be run and a handler.
 2. Call L{recalculate}. If more information is needed, the handler will be used to download it.
 3. When all downloads are complete, the L{implementation} map contains the chosen versions.
 4. Use L{get_uncached_implementations} to find where to get these versions and download them
    using L{begin_impl_download}.

@ivar root: URI of the root interface
@ivar implementation: chosen implementations
@type implementation: {model.Interface: model.Implementation or None}
@ivar watchers: callbacks to invoke after recalculating
@ivar help_with_testing: default stability policy
@type help_with_testing: bool
@ivar network_use: one of the model.network_* values
@ivar freshness: seconds allowed since last update
@type freshness: int
@ivar ready: whether L{implementation} is complete enough to run the program
@type ready: bool
@ivar handler: handler for main-loop integration
@type handler: L{handler.Handler}
@ivar restrictions: Currently known restrictions for each interface.
@type restrictions: {model.Interface -> [model.Restriction]}
@ivar src: whether we are looking for source code
@type src: bool

Definition at line 76 of file policy.py.


Public Member Functions

def __init__
def add_to_cache
def begin_archive_download
def begin_icon_download
def begin_iface_download
def begin_impl_download
def compare
def get_best_source
def get_cached
def get_feed_targets
def get_icon_path
def get_implementation
def get_implementation_path
def get_interface
def get_ranked_implementations
def get_uncached_implementations
def get_unusable_reason
def interface_changed
def is_unusable
def process_pending
def recalculate
def refresh_all
def save_config
def set_root
def store_icon
def usable_feeds
def walk_interfaces

Public Attributes

 freshness
 handler
 help_with_testing
 implementation
 network_use
 ready
 restrictions
 root
 root_restrictions
 src
 watchers

Private Member Functions

def _get_best_implementation
def _keys_ready

Private Attributes

 _warned_offline

Static Private Attributes

list __slots__

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index