Zero Install .NET API 2.20.0
ZeroInstall.Store.Feeds.IFeedCache Interface Reference

A disk-based cache of Feeds that were downloaded via HTTP(S). Once a feed has been added to this cache it is considered trusted (signatures are not checked again). More...

Inheritance diagram for ZeroInstall.Store.Feeds.IFeedCache:
ZeroInstall.Store.Feeds.FeedCache

Public Member Functions

bool Contains (FeedUri feedUri)
 Determines whether this cache contains a local copy of a Feed identified by a specific URL. More...
 
IEnumerable< FeedUriListAll ()
 Returns a list of all Feeds stored in this cache. More...
 
Feed GetFeed (FeedUri feedUri)
 Gets a specific Feed from this cache. More...
 
IEnumerable< OpenPgpSignatureGetSignatures (FeedUri feedUri)
 Determines which signatures a Feed from this cache is signed with. More...
 
string GetPath (FeedUri feedUri)
 Gets the file path of the on-disk representation of a specific Feed. More...
 
void Add (FeedUri feedUri, byte[] data)
 Adds a new Feed to the cache. Only do this after the feed source has been verified and trusted and replay attacks filtered! More...
 
void Remove (FeedUri feedUri)
 Removes a specific Feed from this cache. No exception is thrown if the specified Feed is not in the cache. More...
 

Detailed Description

A disk-based cache of Feeds that were downloaded via HTTP(S). Once a feed has been added to this cache it is considered trusted (signatures are not checked again).

Implementations of this interface are immutable and thread-safe.

Member Function Documentation

◆ Add()

void ZeroInstall.Store.Feeds.IFeedCache.Add ( FeedUri  feedUri,
byte[]  data 
)

Adds a new Feed to the cache. Only do this after the feed source has been verified and trusted and replay attacks filtered!

Parameters
feedUriThe canonical ID used to identify the feed. Must not be a local path.
dataThe content of the feed file as a byte array.
Exceptions
IOExceptionA problem occurred while writing the feed file.
UnauthorizedAccessExceptionWrite access to the cache is not permitted.
InvalidDataExceptionThe feed file could not be parsed.
InvalidOperationExceptionfeedUri is a a local path.

Implemented in ZeroInstall.Store.Feeds.FeedCache.

◆ Contains()

bool ZeroInstall.Store.Feeds.IFeedCache.Contains ( FeedUri  feedUri)

Determines whether this cache contains a local copy of a Feed identified by a specific URL.

Parameters
feedUriThe canonical ID used to identify the feed.
Returns
true if the specified feed is available in this cache; false if the specified feed is not available in this cache.

Implemented in ZeroInstall.Store.Feeds.FeedCache.

◆ GetFeed()

Feed ZeroInstall.Store.Feeds.IFeedCache.GetFeed ( FeedUri  feedUri)

Gets a specific Feed from this cache.

Parameters
feedUriThe canonical ID used to identify the feed.
Returns
The parsed Feed object. Do not modify this object! It may be a reference to an in-memory cache entry.
Exceptions
KeyNotFoundExceptionThe requested feedUri was not found in the cache.
IOExceptionA problem occurred while reading the feed file.
UnauthorizedAccessExceptionRead access to the cache is not permitted.
InvalidDataExceptionThe feed file could not be parsed.

Implemented in ZeroInstall.Store.Feeds.FeedCache.

◆ GetPath()

string ZeroInstall.Store.Feeds.IFeedCache.GetPath ( FeedUri  feedUri)

Gets the file path of the on-disk representation of a specific Feed.

Parameters
feedUriThe canonical ID used to identify the feed.
Exceptions
IOExceptionA problem occurred while reading the feed file.
UnauthorizedAccessExceptionRead access to the cache is not permitted.
Returns
The fully qualified path to the feed file.
Exceptions
KeyNotFoundExceptionThe requested feedUri was not found in the cache.
UnauthorizedAccessExceptionRead access to the cache is not permitted.

Implemented in ZeroInstall.Store.Feeds.FeedCache.

◆ GetSignatures()

IEnumerable< OpenPgpSignature > ZeroInstall.Store.Feeds.IFeedCache.GetSignatures ( FeedUri  feedUri)

Determines which signatures a Feed from this cache is signed with.

Parameters
feedUriThe canonical ID used to identify the feed.
Returns
A list of signatures found, both valid and invalid.
Exceptions
KeyNotFoundExceptionThe requested feedUri was not found in the cache.
IOExceptionA problem occurred while reading the feed file.
UnauthorizedAccessExceptionRead access to the cache is not permitted.
SignatureExceptionThere is no valid signature data embedded in the feed data.

Implemented in ZeroInstall.Store.Feeds.FeedCache.

◆ ListAll()

IEnumerable< FeedUri > ZeroInstall.Store.Feeds.IFeedCache.ListAll ( )

Returns a list of all Feeds stored in this cache.

Returns
A list of feed URIs (e.g. "http://somedomain.net/interface.xml"). Usually these can also be considered interface URIs.
Exceptions
IOExceptionA problem occurred while reading from the cache.
UnauthorizedAccessExceptionRead access to the cache is not permitted.

Implemented in ZeroInstall.Store.Feeds.FeedCache.

◆ Remove()

void ZeroInstall.Store.Feeds.IFeedCache.Remove ( FeedUri  feedUri)

Removes a specific Feed from this cache. No exception is thrown if the specified Feed is not in the cache.

Parameters
feedUriThe canonical ID used to identify the feed.
Exceptions
KeyNotFoundExceptionThe requested feedUri was not found in the cache.
IOExceptionThe feed could not be deleted.
UnauthorizedAccessExceptionWrite access to the cache is not permitted.

Implemented in ZeroInstall.Store.Feeds.FeedCache.


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