gi-gio-2.0.35: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | Safe-Inferred
Language | Haskell2010

GI.Gio.Objects.TlsPassword

Contents

- Exported types
- Methods
  - getDescription
  - getFlags
  - getWarning
  - new
  - setDescription
  - setFlags
  - setValue
  - setValueFull
  - setWarning
- Properties
  - description
  - flags
  - warning

Description

An abstract interface representing a password used in TLS. Often used in user interaction such as unlocking a key storage token.

Since: 2.30

Synopsis

- newtype TlsPassword = TlsPassword (ManagedPtr TlsPassword)
- class (GObject o, IsDescendantOf TlsPassword o) => IsTlsPassword o
- toTlsPassword :: (MonadIO m, IsTlsPassword o) => o -> m TlsPassword
- tlsPasswordGetDescription :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m Text
- tlsPasswordGetFlags :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m [TlsPasswordFlags]
- tlsPasswordGetWarning :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m Text
- tlsPasswordNew :: (HasCallStack, MonadIO m) => [TlsPasswordFlags] -> Text -> m TlsPassword
- tlsPasswordSetDescription :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> Text -> m ()
- tlsPasswordSetFlags :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> [TlsPasswordFlags] -> m ()
- tlsPasswordSetValue :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> ByteString -> m ()
- tlsPasswordSetValueFull :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> ByteString -> Maybe DestroyNotify -> m ()
- tlsPasswordSetWarning :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> Text -> m ()
- constructTlsPasswordDescription :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o)
- getTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> m Text
- setTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> Text -> m ()
- constructTlsPasswordFlags :: (IsTlsPassword o, MonadIO m) => [TlsPasswordFlags] -> m (GValueConstruct o)
- getTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> m [TlsPasswordFlags]
- setTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> [TlsPasswordFlags] -> m ()
- constructTlsPasswordWarning :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o)
- getTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> m Text
- setTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> Text -> m ()

# Exported types

newtype TlsPassword Source #

Memory-managed wrapper type.

Constructors

TlsPassword (ManagedPtr TlsPassword) |

#### Instances

Instances details

Eq TlsPassword Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword Methods (==) :: TlsPassword -> TlsPassword -> Bool Source # (/=) :: TlsPassword -> TlsPassword -> Bool Source #
GObject TlsPassword Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword
ManagedPtrNewtype TlsPassword Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword Methods toManagedPtr :: TlsPassword -> ManagedPtr TlsPassword Source #
TypedObject TlsPassword Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword Methods glibType :: IO GType Source #
HasParentTypes TlsPassword Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword
IsGValue (Maybe TlsPassword) Source # | Convert `TlsPassword` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.TlsPassword Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe TlsPassword -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe TlsPassword) Source #
type ParentTypes TlsPassword Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword type ParentTypes TlsPassword = '[Object]

class (GObject o, IsDescendantOf TlsPassword o) => IsTlsPassword o Source #

Type class for types which can be safely cast to `TlsPassword`, for instance with `toTlsPassword`.

#### Instances

Instances details

(GObject o, IsDescendantOf TlsPassword o) => IsTlsPassword o Source # |
Instance details Defined in GI.Gio.Objects.TlsPassword

toTlsPassword :: (MonadIO m, IsTlsPassword o) => o -> m TlsPassword Source #

Cast to `TlsPassword`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getDescription, getFlags, getProperty, getQdata, getWarning.

#### Setters

setData, setDataFull, setDescription, setFlags, setProperty, setValue, setValueFull, setWarning.

## getDescription

tlsPasswordGetDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> m Text | Returns: The description of the password.

Get a description string about what the password will be used for.

Since: 2.30

## getFlags

tlsPasswordGetFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> m [TlsPasswordFlags] | Returns: The flags about the password.

Get flags about the password.

Since: 2.30

## getWarning

tlsPasswordGetWarning Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> m Text | Returns: The warning.

Get a user readable translated warning. Usually this warning is a representation of the password flags returned from `tlsPasswordGetFlags`.

Since: 2.30

## new

tlsPasswordNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [TlsPasswordFlags] | `flags`: the password flags
-> Text | `description`: description of what the password is for
-> m TlsPassword | Returns: The newly allocated password object

Create a new `TlsPassword` object.

## setDescription

tlsPasswordSetDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> Text | `description`: The description of the password
-> m () |

Set a description string about what the password will be used for.

Since: 2.30

## setFlags

tlsPasswordSetFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> [TlsPasswordFlags] | `flags`: The flags about the password
-> m () |

Set flags about the password.

Since: 2.30

## setValue

tlsPasswordSetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> ByteString | `value`: the new password value
-> m () |

Set the value for this password. The `value` will be copied by the password object.

Specify the `length`, for a non-nul-terminated password. Pass -1 as `length` if using a nul-terminated password, and `length` will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.)

Since: 2.30

## setValueFull

tlsPasswordSetValueFull Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> ByteString | `value`: the value for the password
-> Maybe DestroyNotify | `destroy`: a function to use to free the password.
-> m () |

Provide the value for this password.

The `value` will be owned by the password object, and later freed using the `destroy` function callback.

Specify the `length`, for a non-nul-terminated password. Pass -1 as `length` if using a nul-terminated password, and `length` will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.)

Since: 2.30

## setWarning

tlsPasswordSetWarning Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsPassword a) |
=> a | `password`: a `TlsPassword` object
-> Text | `warning`: The user readable warning
-> m () |

Set a user readable translated warning. Usually this warning is a representation of the password flags returned from `tlsPasswordGetFlags`.

Since: 2.30

# Properties

## description

Description of what the password is for.

Since: 2.30

constructTlsPasswordDescription :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`description`” property. This is rarely needed directly, but it is used by `new`.

getTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> m Text Source #

Get the value of the “`description`” property. When overloading is enabled, this is equivalent to

    get tlsPassword #description

setTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> Text -> m () Source #

Set the value of the “`description`” property. When overloading is enabled, this is equivalent to

    set tlsPassword [ #description := value ]

## flags

Flags about the password.

Since: 2.30

constructTlsPasswordFlags :: (IsTlsPassword o, MonadIO m) => [TlsPasswordFlags] -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`flags`” property. This is rarely needed directly, but it is used by `new`.

getTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> m [TlsPasswordFlags] Source #

Get the value of the “`flags`” property. When overloading is enabled, this is equivalent to

    get tlsPassword #flags

setTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> [TlsPasswordFlags] -> m () Source #

Set the value of the “`flags`” property. When overloading is enabled, this is equivalent to

    set tlsPassword [ #flags := value ]

## warning

Warning about the password.

Since: 2.30

constructTlsPasswordWarning :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`warning`” property. This is rarely needed directly, but it is used by `new`.

getTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> m Text Source #

Get the value of the “`warning`” property. When overloading is enabled, this is equivalent to

    get tlsPassword #warning

setTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> Text -> m () Source #

Set the value of the “`warning`” property. When overloading is enabled, this is equivalent to

    set tlsPassword [ #warning := value ]