Zero Install .NET API 2.20.0
ZeroInstall.Services.Feeds.IFeedManager Interface Reference

Provides access to remote and local Feeds. Handles downloading and signature verification. More...

Inheritance diagram for ZeroInstall.Services.Feeds.IFeedManager:
ZeroInstall.Services.Feeds.FeedManager

Public Member Functions

FeedPreferences GetPreferences (FeedUri feedUri)
 Returns FeedPreferences for a specific feed. More...
 
bool IsStale (FeedUri feedUri)
 Determines whether there is a stale cached copy of a particular feed. More...
 
bool RateLimit (FeedUri feedUri)
 Ensures that operations regarding a specific feed do not happen to often in a row. More...
 
void ImportFeed (string path)
 Imports a remote Feed into the IFeedCache after verifying its signature. More...
 
void Clear ()
 Clears any in-memory caches. More...
 

Properties

bool Refresh [getset]
 Set to true to re-download Feeds even if they are already in the IFeedCache.
 
bool Stale [getset]
 Is set to true if any Feed returned by this is getting stale and should be updated by setting Refresh to true. More...
 
bool ShouldRefresh [get]
 Indicates whether Stale is true and Config.NetworkUse is NetworkLevel.Full.
 
Feed this[FeedUri feedUri] [get]
 Returns a specific Feed. Automatically handles downloading, calling Feed.Normalize and caching. Updates the Stale indicator. More...
 

Detailed Description

Provides access to remote and local Feeds. Handles downloading and signature verification.

Member Function Documentation

◆ Clear()

void ZeroInstall.Services.Feeds.IFeedManager.Clear ( )

Clears any in-memory caches.

Implemented in ZeroInstall.Services.Feeds.FeedManager.

◆ GetPreferences()

FeedPreferences ZeroInstall.Services.Feeds.IFeedManager.GetPreferences ( FeedUri  feedUri)

Returns FeedPreferences for a specific feed.

Parameters
feedUriThe URI of the feed.

Implemented in ZeroInstall.Services.Feeds.FeedManager.

◆ ImportFeed()

void ZeroInstall.Services.Feeds.IFeedManager.ImportFeed ( string  path)

Imports a remote Feed into the IFeedCache after verifying its signature.

Parameters
pathThe path of a local copy of the feed.
Exceptions
IOExceptionA problem occurred while reading the feed file.
UnauthorizedAccessExceptionAccess to the feed file or the cache is not permitted.
SignatureExceptionThe signature data of the feed file could not be handled or no signatures were trusted.
InvalidDataExceptionFeed.Uri is missing.

Implemented in ZeroInstall.Services.Feeds.FeedManager.

◆ IsStale()

bool ZeroInstall.Services.Feeds.IFeedManager.IsStale ( FeedUri  feedUri)

Determines whether there is a stale cached copy of a particular feed.

Parameters
feedUriThe URI of the feed.
Returns
true if there is a stale copy in the cache or no copy at all; false if there is a fresh copy in the cache.

Implemented in ZeroInstall.Services.Feeds.FeedManager.

◆ RateLimit()

bool ZeroInstall.Services.Feeds.IFeedManager.RateLimit ( FeedUri  feedUri)

Ensures that operations regarding a specific feed do not happen to often in a row.

Parameters
feedUriThe URI of the feed.
Returns
true if the operation should be skipped due to rate limiting; false if the operation may proceed.

Implemented in ZeroInstall.Services.Feeds.FeedManager.

Property Documentation

◆ Stale

bool ZeroInstall.Services.Feeds.IFeedManager.Stale
getset

Is set to true if any Feed returned by this is getting stale and should be updated by setting Refresh to true.

Config.Freshness controls the time span after which a feed is considered stale.

◆ this[FeedUri feedUri]

Feed ZeroInstall.Services.Feeds.IFeedManager.this[FeedUri feedUri]
get

Returns a specific Feed. Automatically handles downloading, calling Feed.Normalize and caching. Updates the Stale indicator.

Parameters
feedUriThe URI of the feed.
Returns
The parsed Feed object.

Feeds are always served from the IFeedCache if possible, unless Refresh is set to true.

Exceptions
UriFormatExceptionFeed.Uri is missing or does not match feedUri .
OperationCanceledExceptionThe user canceled the task.
WebExceptionA problem occurred while fetching the feed file.
IOExceptionA problem occurred while reading the feed file.
UnauthorizedAccessExceptionAccess to the cache is not permitted.
SignatureExceptionThe signature data of a remote feed file could not be verified.
InvalidDataExceptionA required property on the feed is not set or invalid.

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