Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
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 G_SOCKET_FAMILY_UNIX
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 GLib 2.72, GUnixCredentialMessage
is available on all platforms. It
requires underlying system support (such as Windows 10 with AF_UNIX
) at run
time.
Before GLib 2.72, <gio/gunixcredentialsmessage.h>
belonged to the UNIX-specific
GIO interfaces, thus you had to use the gio-unix-2.0.pc
pkg-config file
when using it. This is no longer necessary since GLib 2.72.
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.
Instances
Eq UnixCredentialsMessage Source # | |
Defined in GI.Gio.Objects.UnixCredentialsMessage | |
GObject UnixCredentialsMessage Source # | |
Defined in GI.Gio.Objects.UnixCredentialsMessage | |
ManagedPtrNewtype UnixCredentialsMessage Source # | |
TypedObject UnixCredentialsMessage Source # | |
Defined in GI.Gio.Objects.UnixCredentialsMessage | |
HasParentTypes UnixCredentialsMessage Source # | |
Defined in GI.Gio.Objects.UnixCredentialsMessage | |
IsGValue (Maybe UnixCredentialsMessage) Source # | Convert |
Defined in GI.Gio.Objects.UnixCredentialsMessage gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe UnixCredentialsMessage -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe UnixCredentialsMessage) # | |
type ParentTypes UnixCredentialsMessage Source # | |
Defined in GI.Gio.Objects.UnixCredentialsMessage |
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
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, serialize, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCredentials, getData, getLevel, getMsgType, getProperty, getQdata, getSize.
Setters
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, 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