gio-0.12.4: Binding to the GIO.

Portabilityportable (depends on GHC)
Stabilityalpha
Maintainergtk2hs-devel@lists.sourceforge.net
Safe HaskellNone

System.GIO.File.MountOperation

Contents

Description

 

Synopsis

Details

MountOperation provides a mechanism for interacting with the user. It can be used for authenticating mountable operations, such as loop mounting files, hard drive partitions or server locations. It can also be used to ask the user questions or show a list of applications preventing unmount or eject operations from completing.

Note that MountOperation is used for more than just Mount objects – for example it is also used in driveStart.

Users should instantiate a subclass of this that implements all the various callbacks to show the required dialogs, such as MountOperation. If no user interaction is desired (for example when automounting filesystems at login time), usually Nothing can be passed, see each method taking a MountOperation for details.

Types

Enums

Methods

mountOperationNew :: IO MountOperationSource

Creates a new mount operation.

Attributes

mountOperationAnonymous :: MountOperationClass op => Attr op BoolSource

Whether to use an anonymous user when authenticating.

Default value: False

mountOperationChoice :: MountOperationClass op => Attr op IntSource

The index of the user's choice when a question is asked during the mount operation. See the askQuestion signal.

Allowed values: >= 0

Default value: 0

mountOperationDomain :: MountOperationClass op => Attr op StringSource

The domain to use for the mount operation.

Default value: ""

mountOperationPassword :: MountOperationClass op => Attr op StringSource

The password that is used for authentication when carrying out the mount operation.

Default value: ""

mountOperationPasswordSave :: MountOperationClass op => Attr op PasswordSaveSource

Determines if and how the password information should be saved.

Default value: PasswordSaveNever

mountOperationUsername :: MountOperationClass op => Attr op StringSource

The user name that is used for authentication when carrying out the mount operation.

Default value: ""

Signals

mountOperationAborted :: MountOperationClass op => Signal op (IO ())Source

Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.

Implementations of MountOperation should handle this signal by dismissing open password dialogs.

Since 2.20

mountOperationAskPassword :: MountOperationClass op => Signal op (String -> String -> String -> AskPasswordFlags -> IO ())Source

Emitted when a mount operation asks the user for a password.

If the message contains a line break, the first line should be presented as a heading. For example, it may be used as the primary text in a MessageDialog.

mountOperationReplySignal :: MountOperationClass op => Signal op (MountOperationResult -> IO ())Source

Emitted when asking the user a question and gives a list of choices for the user to choose from.

If the message contains a line break, the first line should be presented as a heading. For example, it may be used as the primary text in a MessageDialog. askQuestion :: MountOperationClass op => Signal op (String -> [String] -> IO ()) askQuestion Signal (after obj user -> connect_STRING_BOXED__NONE ask-question after obj (message choicesPtr -> do choices <- peekUTFString choicesPtr user str choices))

Emitted when the user has replied to the mount operation.