Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.UnixOutputStream
Description
GUnixOutputStream
implements OutputStream
for writing to a UNIX
file descriptor, including asynchronous operations. (If the file
descriptor refers to a socket or pipe, this will use poll()
to do
asynchronous I/O. If it refers to a regular file, it will fall back
to doing asynchronous I/O in another thread.)
Note that <gio/gunixoutputstream.h>
belongs to the UNIX-specific GIO
interfaces, thus you have to use the gio-unix-2.0.pc
pkg-config file
file or the GioUnix-2.0
GIR namespace when using it.
Synopsis
- newtype UnixOutputStream = UnixOutputStream (ManagedPtr UnixOutputStream)
- class (GObject o, IsDescendantOf UnixOutputStream o) => IsUnixOutputStream o
- toUnixOutputStream :: (MonadIO m, IsUnixOutputStream o) => o -> m UnixOutputStream
- type family ResolveUnixOutputStreamMethod (t :: Symbol) o where ...
- data UnixOutputStreamGetCloseFdMethodInfo
- unixOutputStreamGetCloseFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> m Bool
- data UnixOutputStreamGetFdMethodInfo
- unixOutputStreamGetFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> m Int32
- unixOutputStreamNew :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m UnixOutputStream
- data UnixOutputStreamSetCloseFdMethodInfo
- unixOutputStreamSetCloseFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> Bool -> m ()
- data UnixOutputStreamCloseFdPropertyInfo
- constructUnixOutputStreamCloseFd :: (IsUnixOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o)
- getUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Bool
- setUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> Bool -> m ()
- unixOutputStreamCloseFd :: AttrLabelProxy "closeFd"
- data UnixOutputStreamFdPropertyInfo
- constructUnixOutputStreamFd :: (IsUnixOutputStream o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getUnixOutputStreamFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Int32
- unixOutputStreamFd :: AttrLabelProxy "fd"
Exported types
newtype UnixOutputStream Source #
Memory-managed wrapper type.
Constructors
UnixOutputStream (ManagedPtr UnixOutputStream) |
Instances
class (GObject o, IsDescendantOf UnixOutputStream o) => IsUnixOutputStream o Source #
Type class for types which can be safely cast to UnixOutputStream
, for instance with toUnixOutputStream
.
Instances
(GObject o, IsDescendantOf UnixOutputStream o) => IsUnixOutputStream o Source # | |
Defined in GI.Gio.Objects.UnixOutputStream |
toUnixOutputStream :: (MonadIO m, IsUnixOutputStream o) => o -> m UnixOutputStream Source #
Cast to UnixOutputStream
, 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, canPoll, clearPending, close, closeAsync, closeFinish, createSource, flush, flushAsync, flushFinish, forceFloating, freezeNotify, getv, hasPending, isClosed, isClosing, isFloating, isWritable, notify, notifyByPspec, ref, refSink, runDispose, splice, spliceAsync, spliceFinish, stealData, stealQdata, thawNotify, unref, watchClosure, write, writeAll, writeAllAsync, writeAllFinish, writeAsync, writeBytes, writeBytesAsync, writeBytesFinish, writeFinish, writeNonblocking, writev, writevAll, writevAllAsync, writevAllFinish, writevAsync, writevFinish, writevNonblocking.
Getters
getCloseFd, getData, getFd, getProperty, getQdata.
Setters
type family ResolveUnixOutputStreamMethod (t :: Symbol) o where ... Source #
Equations
getCloseFd
data UnixOutputStreamGetCloseFdMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsUnixOutputStream a) => OverloadedMethod UnixOutputStreamGetCloseFdMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.UnixOutputStream Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo UnixOutputStreamGetCloseFdMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.UnixOutputStream Methods |
unixOutputStreamGetCloseFd Source #
Arguments
:: (HasCallStack, MonadIO m, IsUnixOutputStream a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the file descriptor of stream
will be
closed when the stream is closed.
Since: 2.20
getFd
data UnixOutputStreamGetFdMethodInfo Source #
Instances
(signature ~ m Int32, MonadIO m, IsUnixOutputStream a) => OverloadedMethod UnixOutputStreamGetFdMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.UnixOutputStream Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo UnixOutputStreamGetFdMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.UnixOutputStream Methods |
unixOutputStreamGetFd Source #
Arguments
:: (HasCallStack, MonadIO m, IsUnixOutputStream a) | |
=> a |
|
-> m Int32 | Returns: The file descriptor of |
Return the UNIX file descriptor that the stream writes to.
Since: 2.20
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Bool |
|
-> m UnixOutputStream | Returns: a new |
Creates a new UnixOutputStream
for the given fd
.
If closeFd
, is True
, the file descriptor will be closed when
the output stream is destroyed.
setCloseFd
data UnixOutputStreamSetCloseFdMethodInfo Source #
Instances
(signature ~ (Bool -> m ()), MonadIO m, IsUnixOutputStream a) => OverloadedMethod UnixOutputStreamSetCloseFdMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.UnixOutputStream Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo UnixOutputStreamSetCloseFdMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.UnixOutputStream Methods |
unixOutputStreamSetCloseFd Source #
Arguments
:: (HasCallStack, MonadIO m, IsUnixOutputStream a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the file descriptor of stream
shall be closed
when the stream is closed.
Since: 2.20
Properties
closeFd
Whether to close the file descriptor when the stream is closed.
Since: 2.20
data UnixOutputStreamCloseFdPropertyInfo Source #
Instances
constructUnixOutputStreamCloseFd :: (IsUnixOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “close-fd
” property. This is rarely needed directly, but it is used by new
.
getUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Bool Source #
Get the value of the “close-fd
” property.
When overloading is enabled, this is equivalent to
get
unixOutputStream #closeFd
setUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> Bool -> m () Source #
Set the value of the “close-fd
” property.
When overloading is enabled, this is equivalent to
set
unixOutputStream [ #closeFd:=
value ]
unixOutputStreamCloseFd :: AttrLabelProxy "closeFd" Source #
fd
The file descriptor that the stream writes to.
Since: 2.20
data UnixOutputStreamFdPropertyInfo Source #
Instances
AttrInfo UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.UnixOutputStream Associated Types
Methods attrGet :: AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo o => o -> IO (AttrGetType UnixOutputStreamFdPropertyInfo) # attrSet :: (AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo o, AttrSetTypeConstraint UnixOutputStreamFdPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo o, AttrSetTypeConstraint UnixOutputStreamFdPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo o, AttrTransferTypeConstraint UnixOutputStreamFdPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType UnixOutputStreamFdPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.UnixOutputStream | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.UnixOutputStream | |||||||||||||||||||||||||||||||||
type AttrLabel UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.UnixOutputStream | |||||||||||||||||||||||||||||||||
type AttrOrigin UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.UnixOutputStream | |||||||||||||||||||||||||||||||||
type AttrTransferType UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.UnixOutputStream | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint UnixOutputStreamFdPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructUnixOutputStreamFd :: (IsUnixOutputStream o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “fd
” property. This is rarely needed directly, but it is used by new
.
getUnixOutputStreamFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Int32 Source #
Get the value of the “fd
” property.
When overloading is enabled, this is equivalent to
get
unixOutputStream #fd
unixOutputStreamFd :: AttrLabelProxy "fd" Source #