Zero Install .NET API 2.20.0
ZeroInstall.DesktopIntegration.Unix.DefaultProgram Class Reference

Contains control logic for applying Model.Capabilities.DefaultProgram and AccessPoints.DefaultProgram on GNOME or KDE systems. More...

Static Public Member Functions

static void Register (FeedTarget target, Model.Capabilities.DefaultProgram defaultProgram, IIconStore iconStore, bool machineWide, bool accessPoint=false)
 Registers an application as a candidate for a default program for some service in the current system. More...
 
static void Unregister (Model.Capabilities.DefaultProgram defaultProgram, bool machineWide, bool accessPoint=false)
 Unregisters an application as a candidate for a default program in the current system. This can only be applied machine-wide, not per user. More...
 

Detailed Description

Contains control logic for applying Model.Capabilities.DefaultProgram and AccessPoints.DefaultProgram on GNOME or KDE systems.

Member Function Documentation

◆ Register()

static void ZeroInstall.DesktopIntegration.Unix.DefaultProgram.Register ( FeedTarget  target,
Model.Capabilities.DefaultProgram  defaultProgram,
IIconStore  iconStore,
bool  machineWide,
bool  accessPoint = false 
)
inlinestatic

Registers an application as a candidate for a default program for some service in the current system.

Parameters
targetThe application being integrated.
defaultProgramThe default program information to be registered.
machineWideApply the registration machine-wide instead of just for the current user.
iconStoreStores icon files downloaded from the web as local files.
accessPointIndicates that the program should be set as the current default for the service it provides.
Exceptions
OperationCanceledExceptionThe user canceled the task.
IOExceptionA problem occurred while writing to the filesystem.
WebExceptionA problem occurred while downloading additional data (such as icons).
UnauthorizedAccessExceptionWrite access to the filesystem is not permitted.

◆ Unregister()

static void ZeroInstall.DesktopIntegration.Unix.DefaultProgram.Unregister ( Model.Capabilities.DefaultProgram  defaultProgram,
bool  machineWide,
bool  accessPoint = false 
)
inlinestatic

Unregisters an application as a candidate for a default program in the current system. This can only be applied machine-wide, not per user.

Parameters
defaultProgramThe default program information to be removed.
machineWideApply the registration machine-wide instead of just for the current user.
accessPointIndicates that the program was set as the current default for the service it provides.
Exceptions
IOExceptionA problem occurred while writing to the filesystem.
UnauthorizedAccessExceptionWrite access to the filesystem is not permitted.

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