Interface ICatalogManager
- Namespace
- ZeroInstall.Services.Feeds
- Assembly
- ZeroInstall.Services.dll
Provides access to remote and local Catalogs. Handles downloading, signature verification and caching.
public interface ICatalogManager
- Extension Methods
Methods
AddSource(FeedUri)
Adds a new source to download Catalog files from.
bool AddSource(FeedUri uri)
Parameters
uri
FeedUriThe URI of the source to add.
Returns
- bool
true
if the source was add;false
if the source was already in the list.
Exceptions
- IOException
There was a problem accessing a configuration file.
- UnauthorizedAccessException
Access to a configuration file was not permitted.
- UriFormatException
An invalid catalog source is specified in the configuration file.
DownloadCatalog(FeedUri)
Downloads and normalizes a remote catalog file.
Catalog DownloadCatalog(FeedUri source)
Parameters
source
FeedUriThe URL to download the catalog file from.
Returns
Exceptions
- WebException
A file could not be downloaded from the internet.
- SignatureException
The signature data of a remote catalog file could not be verified.
- NotSupportedException
The catalog requires a newer version of Zero Install.
- InvalidDataException
A problem occurred while deserializing an XML file.
GetOnline()
Downloads and merges all Catalogs specified by the configuration files.
Catalog GetOnline()
Returns
Exceptions
- IOException
A problem occurred while reading a local catalog file.
- UnauthorizedAccessException
Access to a local catalog file was not permitted.
- WebException
A problem occurred while fetching a remote catalog file.
- NotSupportedException
The catalog requires a newer version of Zero Install.
- InvalidDataException
A problem occurred while deserializing an XML file.
- SignatureException
The signature data of a remote catalog file could not be verified.
- UriFormatException
An invalid catalog source is specified in the configuration file.
GetSources()
Returns a list of catalog sources as defined by configuration files.
FeedUri[] GetSources()
Returns
- FeedUri[]
Exceptions
- IOException
There was a problem accessing a configuration file.
- UnauthorizedAccessException
Access to a configuration file was not permitted.
- UriFormatException
An invalid catalog source is specified in the configuration file.
RemoveSource(FeedUri)
Removes an existing source of Catalog files.
bool RemoveSource(FeedUri uri)
Parameters
uri
FeedUriThe URI of the source to remove.
Returns
- bool
true
if the source was removed;false
if the source was not in the current list.
Exceptions
- IOException
There was a problem accessing a configuration file.
- UnauthorizedAccessException
Access to a configuration file was not permitted.
- UriFormatException
An invalid catalog source is specified in the configuration file.
TryGetCached()
Tries to return a locally cached copy of the merged Catalogs specified by the configuration files, as previously returned by GetOnline().
Catalog? TryGetCached()