Class DefaultProgram
- Namespace
- ZeroInstall.DesktopIntegration.Unix
- Assembly
- ZeroInstall.DesktopIntegration.dll
Contains control logic for applying DefaultProgram and DefaultProgram on GNOME or KDE systems.
public static class DefaultProgram
- Inheritance
-
DefaultProgram
- Inherited Members
Methods
Register(FeedTarget, DefaultProgram, IIconStore, bool, bool)
Registers an application as a candidate for a default program for some service in the current system.
public static void Register(FeedTarget target, DefaultProgram defaultProgram, IIconStore iconStore, bool machineWide, bool accessPoint = false)
Parameters
target
FeedTargetThe application being integrated.
defaultProgram
DefaultProgramThe default program information to be registered.
iconStore
IIconStoreStores icon files downloaded from the web as local files.
machineWide
boolApply the registration machine-wide instead of just for the current user.
accessPoint
boolIndicates that the program should be set as the current default for the service it provides.
Exceptions
- OperationCanceledException
The user canceled the task.
- IOException
A problem occurred while writing to the filesystem.
- WebException
A problem occurred while downloading additional data (such as icons).
- UnauthorizedAccessException
Write access to the filesystem is not permitted.
Unregister(DefaultProgram, bool, bool)
Unregisters an application as a candidate for a default program in the current system. This can only be applied machine-wide, not per user.
public static void Unregister(DefaultProgram defaultProgram, bool machineWide, bool accessPoint = false)
Parameters
defaultProgram
DefaultProgramThe default program information to be removed.
machineWide
boolApply the registration machine-wide instead of just for the current user.
accessPoint
boolIndicates that the program was set as the current default for the service it provides.
Exceptions
- IOException
A problem occurred while writing to the filesystem.
- UnauthorizedAccessException
Write access to the filesystem is not permitted.