gi-gio-2.0.27: Gio bindings

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

GI.Gio.Objects.UnixCredentialsMessage

Contents

- Exported types
- Methods
  - Overloaded methods
  - getCredentials
  - isSupported
  - new
  - newWithCredentials
- Properties
  - credentials

Description

This `SocketControlMessage` contains a `Credentials` instance. It may be sent using `socketSendMessage` and received using `socketReceiveMessage` over UNIX sockets (ie: sockets in the `SocketFamilyUnix` family).

For an easier way to send and receive credentials over stream-oriented UNIX sockets, see `unixConnectionSendCredentials` and `unixConnectionReceiveCredentials`. To receive credentials of a foreign process connected to a socket, use `socketGetCredentials`.

Since: 2.26

Synopsis

- newtype UnixCredentialsMessage = UnixCredentialsMessage (ManagedPtr UnixCredentialsMessage)
- class (GObject o, IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o
- toUnixCredentialsMessage :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m UnixCredentialsMessage
- unixCredentialsMessageGetCredentials :: (HasCallStack, MonadIO m, IsUnixCredentialsMessage a) => a -> m Credentials
- unixCredentialsMessageIsSupported :: (HasCallStack, MonadIO m) => m Bool
- unixCredentialsMessageNew :: (HasCallStack, MonadIO m) => m UnixCredentialsMessage
- unixCredentialsMessageNewWithCredentials :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m UnixCredentialsMessage
- constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, MonadIO m, IsCredentials a) => a -> m (GValueConstruct o)
- getUnixCredentialsMessageCredentials :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m Credentials

# Exported types

newtype UnixCredentialsMessage Source #

Memory-managed wrapper type.

Constructors

UnixCredentialsMessage (ManagedPtr UnixCredentialsMessage) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o Source #

Type class for types which can be safely cast to `UnixCredentialsMessage`, for instance with `toUnixCredentialsMessage`.

#### Instances

Instances details

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

toUnixCredentialsMessage :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m UnixCredentialsMessage Source #

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

# Methods

## Overloaded methods

## getCredentials

unixCredentialsMessageGetCredentials Source #

Arguments

:: (HasCallStack, MonadIO m, IsUnixCredentialsMessage a) |
=> a | `message`: A `UnixCredentialsMessage`.
-> m Credentials | Returns: A `Credentials` instance. Do not free, it is owned by `message`.

Gets the credentials stored in `message`.

Since: 2.26

## isSupported

unixCredentialsMessageIsSupported Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Bool | Returns: `True` if supported, `False` otherwise

Checks if passing `Credentials` on a `Socket` is supported on this platform.

Since: 2.26

## new

unixCredentialsMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m UnixCredentialsMessage | Returns: a new `UnixCredentialsMessage`

Creates a new `UnixCredentialsMessage` with credentials matching the current processes.

Since: 2.26

## newWithCredentials

unixCredentialsMessageNewWithCredentials Source #

Arguments

:: (HasCallStack, MonadIO m, IsCredentials a) |
=> a | `credentials`: A `Credentials` object.
-> m UnixCredentialsMessage | Returns: a new `UnixCredentialsMessage`

Creates a new `UnixCredentialsMessage` holding `credentials`.

Since: 2.26

# Properties

## credentials

The credentials stored in the message.

Since: 2.26

constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, MonadIO m, IsCredentials a) => a -> m (GValueConstruct o) Source #

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

getUnixCredentialsMessageCredentials :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m Credentials Source #

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

    get unixCredentialsMessage #credentials