Zero Install .NET API 2.20.0
ZeroInstall.DesktopIntegration.IntegrationManagerBase Class Referenceabstract

Base class for IIntegrationManager implementations using template methods. More...

Inheritance diagram for ZeroInstall.DesktopIntegration.IntegrationManagerBase:
ZeroInstall.Store.ManagerBase ZeroInstall.DesktopIntegration.IIntegrationManager ZeroInstall.DesktopIntegration.IntegrationManager ZeroInstall.DesktopIntegration.CategoryIntegrationManager ZeroInstall.DesktopIntegration.SyncIntegrationManager

Public Member Functions

AppEntry AddApp (FeedTarget target)
 Creates a new unnamed AppEntry and adds it to the AppList. More...
 
AppEntry AddApp (string petName, Requirements requirements, Feed feed)
 Creates a new named AppEntry and adds it to the AppList. More...
 
void RemoveApp (AppEntry appEntry)
 Removes an AppEntry from the AppList while unapplying any remaining AccessPoints. More...
 
void UpdateApp (AppEntry appEntry, Feed feed)
 Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints. More...
 
void UpdateApp (AppEntry appEntry, Feed feed, Requirements requirements)
 Updates a named AppEntry with new Requirements. More...
 
void AddAccessPoints (AppEntry appEntry, Feed feed, IEnumerable< AccessPoint > accessPoints)
 Applies AccessPoints for an application. More...
 
void RemoveAccessPoints (AppEntry appEntry, IEnumerable< AccessPoint > accessPoints)
 Removes already applied AccessPoints for an application. More...
 
void Repair (Converter< FeedUri, Feed > feedRetriever)
 Reapplies all AccessPoints for all AppEntrys. More...
 
- Public Member Functions inherited from ZeroInstall.Store.ManagerBase
void Dispose ()
 Releases the mutex.
 

Protected Member Functions

 IntegrationManagerBase (ITaskHandler handler, bool machineWide=false)
 Creates a new integration manager. More...
 
abstract AppEntry AddAppInternal (FeedTarget target)
 Creates a new unnamed AppEntry and adds it to the AppList. More...
 
abstract AppEntry AddAppInternal (string petName, Requirements requirements, Feed feed)
 Creates a new named AppEntry and adds it to the AppList. More...
 
abstract void AddAppInternal (AppEntry prototype, Converter< FeedUri, Feed > feedRetriever)
 Creates a new AppEntry based on an existing prototype (applying any AccessPoints) and adds it to the AppList. More...
 
abstract void RemoveAppInternal (AppEntry appEntry)
 Removes an AppEntry from the AppList while unapplying any remaining AccessPoints. More...
 
abstract void UpdateAppInternal (AppEntry appEntry, Feed feed)
 Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints. More...
 
abstract void AddAccessPointsInternal (AppEntry appEntry, Feed feed, IReadOnlyCollection< AccessPoint > accessPoints)
 Applies AccessPoints for an application. More...
 
abstract void RemoveAccessPointsInternal (AppEntry appEntry, IEnumerable< AccessPoint > accessPoints)
 Removes already applied AccessPoints for an application. More...
 
abstract void RepairAppInternal (AppEntry appEntry, Feed feed)
 Reapplies all AccessPoints for a specific AppEntry. More...
 
abstract void Finish ()
 To be called after integration operations have been completed to inform the desktop environment and save the DesktopIntegration.AppList. More...
 
- Protected Member Functions inherited from ZeroInstall.Store.ManagerBase
void AcquireMutex ()
 Tries to acquire a mutex with the name MutexName. Call this at the end of your constructors. More...
 

Properties

AppList AppList = default! [get]
 Stores a list of applications and their desktop integrations. Only use for read-access externally! Use this class' methods for any modifications.
 
- Properties inherited from ZeroInstall.Store.ManagerBase
bool MachineWide [get]
 Apply operations machine-wide instead of just for the current user.
 
abstract string MutexName [get]
 The name of the cross-process mutex used by AcquireMutex.
 
- Properties inherited from ZeroInstall.DesktopIntegration.IIntegrationManager
AppList AppList [get]
 Stores a list of applications and their desktop integrations. Only use for read-access externally! Use this class' methods for any modifications.
 
bool MachineWide [get]
 Apply operations machine-wide instead of just for the current user.
 

Additional Inherited Members

- Protected Attributes inherited from ZeroInstall.Store.ManagerBase
readonly ITaskHandler Handler
 A callback object used when the the user needs to be asked questions or informed about download and IO tasks.
 

Detailed Description

Base class for IIntegrationManager implementations using template methods.

Constructor & Destructor Documentation

◆ IntegrationManagerBase()

ZeroInstall.DesktopIntegration.IntegrationManagerBase.IntegrationManagerBase ( ITaskHandler  handler,
bool  machineWide = false 
)
inlineprotected

Creates a new integration manager.

Parameters
handlerA callback object used when the the user is to be informed about the progress of long-running operations such as downloads.
machineWideApply operations machine-wide instead of just for the current user.
Exceptions
IOExceptionA problem occurred while accessing the AppList file.
UnauthorizedAccessExceptionRead or write access to the AppList file is not permitted or another desktop integration class is currently active.
InvalidDataExceptionA problem occurred while deserializing the XML data.

Member Function Documentation

◆ AddAccessPoints()

void ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddAccessPoints ( AppEntry  appEntry,
Feed  feed,
IEnumerable< AccessPoint accessPoints 
)
inline

Applies AccessPoints for an application.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ AddAccessPointsInternal()

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddAccessPointsInternal ( AppEntry  appEntry,
Feed  feed,
IReadOnlyCollection< AccessPoint accessPoints 
)
protectedpure virtual

Applies AccessPoints for an application.

Parameters
appEntryThe application being integrated.
feedThe feed providing additional metadata, icons, etc. for the application.
accessPointsThe access points to apply.
Exceptions
ArgumentExceptionAccessPointList.Entries from appEntry is the same reference as accessPoints .
OperationCanceledExceptionThe user canceled the task.
KeyNotFoundExceptionAn AccessPoint reference to a Capability is invalid.
ConflictExceptionOne or more of the accessPoints would cause a conflict with the existing AccessPoints in IIntegrationManager.AppList.
WebExceptionA problem occurred while downloading additional data (such as icons).
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ AddApp() [1/2]

AppEntry ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddApp ( FeedTarget  target)
inline

Creates a new unnamed AppEntry and adds it to the AppList.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ AddApp() [2/2]

AppEntry ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddApp ( string  petName,
Requirements  requirements,
Feed  feed 
)
inline

Creates a new named AppEntry and adds it to the AppList.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ AddAppInternal() [1/3]

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddAppInternal ( AppEntry  prototype,
Converter< FeedUri, Feed feedRetriever 
)
protectedpure virtual

Creates a new AppEntry based on an existing prototype (applying any AccessPoints) and adds it to the AppList.

Parameters
prototypeAn existing AppEntry to use as a prototype.
feedRetrieverCallback method used to retrieve additional Feeds on demand.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ AddAppInternal() [2/3]

abstract AppEntry ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddAppInternal ( FeedTarget  target)
protectedpure virtual

Creates a new unnamed AppEntry and adds it to the AppList.

Parameters
targetThe application to add.
Returns
The newly created application entry (already added to AppList).
Exceptions
InvalidOperationExceptionThe application is already in the list.
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ AddAppInternal() [3/3]

abstract AppEntry ZeroInstall.DesktopIntegration.IntegrationManagerBase.AddAppInternal ( string  petName,
Requirements  requirements,
Feed  feed 
)
protectedpure virtual

Creates a new named AppEntry and adds it to the AppList.

Parameters
petNameThe user-defined pet-name of the application.
requirementsThe requirements describing the application to add.
feedThe feed providing additional metadata, capabilities, etc. for the application.
Returns
The newly created application entry (already added to AppList).
Exceptions
InvalidOperationExceptionAn application with the same petName is already in the list.
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ Finish()

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.Finish ( )
protectedpure virtual

To be called after integration operations have been completed to inform the desktop environment and save the DesktopIntegration.AppList.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ RemoveAccessPoints()

void ZeroInstall.DesktopIntegration.IntegrationManagerBase.RemoveAccessPoints ( AppEntry  appEntry,
IEnumerable< AccessPoint accessPoints 
)
inline

Removes already applied AccessPoints for an application.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ RemoveAccessPointsInternal()

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.RemoveAccessPointsInternal ( AppEntry  appEntry,
IEnumerable< AccessPoint accessPoints 
)
protectedpure virtual

Removes already applied AccessPoints for an application.

Parameters
appEntryThe AppEntry containing the accessPoints .
accessPointsThe access points to unapply.
Exceptions
KeyNotFoundExceptionAn AccessPoint reference to a Capability is invalid.
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ RemoveApp()

void ZeroInstall.DesktopIntegration.IntegrationManagerBase.RemoveApp ( AppEntry  appEntry)
inline

Removes an AppEntry from the AppList while unapplying any remaining AccessPoints.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ RemoveAppInternal()

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.RemoveAppInternal ( AppEntry  appEntry)
protectedpure virtual

Removes an AppEntry from the AppList while unapplying any remaining AccessPoints.

Parameters
appEntryThe application to remove.
Exceptions
KeyNotFoundExceptionAn AccessPoint reference to a Capability is invalid.
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ Repair()

void ZeroInstall.DesktopIntegration.IntegrationManagerBase.Repair ( Converter< FeedUri, Feed feedRetriever)
inline

Reapplies all AccessPoints for all AppEntrys.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ RepairAppInternal()

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.RepairAppInternal ( AppEntry  appEntry,
Feed  feed 
)
protectedpure virtual

Reapplies all AccessPoints for a specific AppEntry.

Parameters
appEntryThe application entry to repair.
feedThe feed providing additional metadata, capabilities, etc. for the application.
Exceptions
OperationCanceledExceptionThe user canceled the task.
ConflictExceptionappEntry conflicts with the rest of the AppList.
WebExceptionA problem occurred while downloading additional data (such as icons).
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.

◆ UpdateApp() [1/2]

void ZeroInstall.DesktopIntegration.IntegrationManagerBase.UpdateApp ( AppEntry  appEntry,
Feed  feed 
)
inline

Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ UpdateApp() [2/2]

void ZeroInstall.DesktopIntegration.IntegrationManagerBase.UpdateApp ( AppEntry  appEntry,
Feed  feed,
Requirements  requirements 
)
inline

Updates a named AppEntry with new Requirements.

Implements ZeroInstall.DesktopIntegration.IIntegrationManager.

◆ UpdateAppInternal()

abstract void ZeroInstall.DesktopIntegration.IntegrationManagerBase.UpdateAppInternal ( AppEntry  appEntry,
Feed  feed 
)
protectedpure virtual

Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints.

Exceptions
KeyNotFoundExceptionAn AccessPoint reference to a Capability is invalid.
Parameters
appEntryThe application entry to update.
feedThe feed providing additional metadata, capabilities, etc. for the application.

Implemented in ZeroInstall.DesktopIntegration.IntegrationManager.


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