Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
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
- noUnixCredentialsMessage :: Maybe 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, IsCredentials a) => a -> IO (GValueConstruct o)
- getUnixCredentialsMessageCredentials :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m Credentials
Exported types
newtype UnixCredentialsMessage Source #
Memory-managed wrapper type.
Instances
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
(GObject o, IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o Source # | |
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
.
noUnixCredentialsMessage :: Maybe UnixCredentialsMessage Source #
A convenience alias for Nothing
:: Maybe
UnixCredentialsMessage
.
Methods
getCredentials
unixCredentialsMessageGetCredentials Source #
:: (HasCallStack, MonadIO m, IsUnixCredentialsMessage a) | |
=> a |
|
-> m Credentials | Returns: A |
Gets the credentials stored in message
.
Since: 2.26
isSupported
unixCredentialsMessageIsSupported Source #
:: (HasCallStack, MonadIO m) | |
=> m Bool |
Checks if passing Credentials
on a Socket
is supported on this platform.
Since: 2.26
new
unixCredentialsMessageNew Source #
:: (HasCallStack, MonadIO m) | |
=> m UnixCredentialsMessage | Returns: a new |
Creates a new UnixCredentialsMessage
with credentials matching the current processes.
Since: 2.26
newWithCredentials
unixCredentialsMessageNewWithCredentials Source #
:: (HasCallStack, MonadIO m, IsCredentials a) | |
=> a |
|
-> m UnixCredentialsMessage | Returns: a new |
Creates a new UnixCredentialsMessage
holding credentials
.
Since: 2.26
Properties
credentials
The credentials stored in the message.
Since: 2.26
constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, IsCredentials a) => a -> IO (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