Zero Install .NET API 2.20.0
ZeroInstall.Services.Feeds.CatalogManager Class Reference

Provides access to remote and local Catalogs. Handles downloading, signature verification and caching. More...

Inheritance diagram for ZeroInstall.Services.Feeds.CatalogManager:
ZeroInstall.Services.Feeds.ICatalogManager

Public Member Functions

CatalogGetCached ()
 Loads the last result of GetOnline. More...
 
Catalog GetOnline ()
 Downloads and merges all Catalogs specified by the configuration files. More...
 
Catalog DownloadCatalog (FeedUri source)
 Downloads and parses a remote catalog file. Mainly for internal use. More...
 
bool AddSource (FeedUri uri)
 Adds a new source to download Catalog files from. More...
 
bool RemoveSource (FeedUri uri)
 Removes an existing source of Catalog files. More...
 

Static Public Member Functions

static FeedUri[] GetSources ()
 Returns a list of catalog sources as defined by configuration files. More...
 
static void SetSources (IEnumerable< FeedUri > uris)
 Sets the list of catalog sources in a configuration file. More...
 

Static Public Attributes

static readonly FeedUri DefaultSource = new("https://apps.0install.net/catalog.xml")
 The default Catalog source used if no other is specified.
 

Detailed Description

Provides access to remote and local Catalogs. Handles downloading, signature verification and caching.

Member Function Documentation

◆ AddSource()

bool ZeroInstall.Services.Feeds.CatalogManager.AddSource ( FeedUri  uri)
inline

Adds a new source to download Catalog files from.

Implements ZeroInstall.Services.Feeds.ICatalogManager.

◆ DownloadCatalog()

Catalog ZeroInstall.Services.Feeds.CatalogManager.DownloadCatalog ( FeedUri  source)
inline

Downloads and parses a remote catalog file. Mainly for internal use.

Implements ZeroInstall.Services.Feeds.ICatalogManager.

◆ GetCached()

Catalog? ZeroInstall.Services.Feeds.CatalogManager.GetCached ( )
inline

Loads the last result of GetOnline.

Implements ZeroInstall.Services.Feeds.ICatalogManager.

◆ GetOnline()

Catalog ZeroInstall.Services.Feeds.CatalogManager.GetOnline ( )
inline

Downloads and merges all Catalogs specified by the configuration files.

Implements ZeroInstall.Services.Feeds.ICatalogManager.

◆ GetSources()

static FeedUri[] ZeroInstall.Services.Feeds.CatalogManager.GetSources ( )
inlinestatic

Returns a list of catalog sources as defined by configuration files.

Only the top-most configuration file is processed. I.e., a user config overrides a system config.

Exceptions
IOExceptionThere was a problem accessing a configuration file.
UnauthorizedAccessExceptionAccess to a configuration file was not permitted.
UriFormatExceptionAn invalid catalog source is specified in the configuration file.

◆ RemoveSource()

bool ZeroInstall.Services.Feeds.CatalogManager.RemoveSource ( FeedUri  uri)
inline

Removes an existing source of Catalog files.

Implements ZeroInstall.Services.Feeds.ICatalogManager.

◆ SetSources()

static void ZeroInstall.Services.Feeds.CatalogManager.SetSources ( IEnumerable< FeedUri uris)
inlinestatic

Sets the list of catalog sources in a configuration file.

Parameters
urisThe list of catalog sources to use from now on.
Exceptions
IOExceptionThere was a problem writing a configuration file.
UnauthorizedAccessExceptionAccess to a configuration file was not permitted.

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