gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

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

Exported types

newtype UnixOutputStream Source #

Memory-managed wrapper type.

Instances

Instances details
Eq UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

GObject UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

ManagedPtrNewtype UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

TypedObject UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

Methods

glibType :: IO GType #

HasParentTypes UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

HasAttributeList UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

(info ~ ResolveUnixOutputStreamMethod t UnixOutputStream, OverloadedMethod info UnixOutputStream p, HasField t UnixOutputStream p) => HasField (t :: Symbol) UnixOutputStream (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

Methods

getField :: UnixOutputStream -> p #

(info ~ ResolveUnixOutputStreamMethod t UnixOutputStream, OverloadedMethodInfo info UnixOutputStream) => IsLabel t (MethodProxy info UnixOutputStream) Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

(info ~ ResolveUnixOutputStreamMethod t UnixOutputStream, OverloadedMethod info UnixOutputStream p) => IsLabel t (UnixOutputStream -> p) Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

IsGValue (Maybe UnixOutputStream) Source #

Convert UnixOutputStream to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttributeList UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type ParentTypes UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type SignalList UnixOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

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

Instances details
(GObject o, IsDescendantOf UnixOutputStream o) => IsUnixOutputStream o Source # 
Instance details

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

type family ResolveUnixOutputStreamMethod (t :: Symbol) o where ... Source #

Equations

ResolveUnixOutputStreamMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveUnixOutputStreamMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveUnixOutputStreamMethod "canPoll" o = PollableOutputStreamCanPollMethodInfo 
ResolveUnixOutputStreamMethod "clearPending" o = OutputStreamClearPendingMethodInfo 
ResolveUnixOutputStreamMethod "close" o = OutputStreamCloseMethodInfo 
ResolveUnixOutputStreamMethod "closeAsync" o = OutputStreamCloseAsyncMethodInfo 
ResolveUnixOutputStreamMethod "closeFinish" o = OutputStreamCloseFinishMethodInfo 
ResolveUnixOutputStreamMethod "createSource" o = PollableOutputStreamCreateSourceMethodInfo 
ResolveUnixOutputStreamMethod "flush" o = OutputStreamFlushMethodInfo 
ResolveUnixOutputStreamMethod "flushAsync" o = OutputStreamFlushAsyncMethodInfo 
ResolveUnixOutputStreamMethod "flushFinish" o = OutputStreamFlushFinishMethodInfo 
ResolveUnixOutputStreamMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveUnixOutputStreamMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveUnixOutputStreamMethod "getv" o = ObjectGetvMethodInfo 
ResolveUnixOutputStreamMethod "hasPending" o = OutputStreamHasPendingMethodInfo 
ResolveUnixOutputStreamMethod "isClosed" o = OutputStreamIsClosedMethodInfo 
ResolveUnixOutputStreamMethod "isClosing" o = OutputStreamIsClosingMethodInfo 
ResolveUnixOutputStreamMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveUnixOutputStreamMethod "isWritable" o = PollableOutputStreamIsWritableMethodInfo 
ResolveUnixOutputStreamMethod "notify" o = ObjectNotifyMethodInfo 
ResolveUnixOutputStreamMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveUnixOutputStreamMethod "ref" o = ObjectRefMethodInfo 
ResolveUnixOutputStreamMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveUnixOutputStreamMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveUnixOutputStreamMethod "splice" o = OutputStreamSpliceMethodInfo 
ResolveUnixOutputStreamMethod "spliceAsync" o = OutputStreamSpliceAsyncMethodInfo 
ResolveUnixOutputStreamMethod "spliceFinish" o = OutputStreamSpliceFinishMethodInfo 
ResolveUnixOutputStreamMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveUnixOutputStreamMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveUnixOutputStreamMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveUnixOutputStreamMethod "unref" o = ObjectUnrefMethodInfo 
ResolveUnixOutputStreamMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveUnixOutputStreamMethod "write" o = OutputStreamWriteMethodInfo 
ResolveUnixOutputStreamMethod "writeAll" o = OutputStreamWriteAllMethodInfo 
ResolveUnixOutputStreamMethod "writeAllAsync" o = OutputStreamWriteAllAsyncMethodInfo 
ResolveUnixOutputStreamMethod "writeAllFinish" o = OutputStreamWriteAllFinishMethodInfo 
ResolveUnixOutputStreamMethod "writeAsync" o = OutputStreamWriteAsyncMethodInfo 
ResolveUnixOutputStreamMethod "writeBytes" o = OutputStreamWriteBytesMethodInfo 
ResolveUnixOutputStreamMethod "writeBytesAsync" o = OutputStreamWriteBytesAsyncMethodInfo 
ResolveUnixOutputStreamMethod "writeBytesFinish" o = OutputStreamWriteBytesFinishMethodInfo 
ResolveUnixOutputStreamMethod "writeFinish" o = OutputStreamWriteFinishMethodInfo 
ResolveUnixOutputStreamMethod "writeNonblocking" o = PollableOutputStreamWriteNonblockingMethodInfo 
ResolveUnixOutputStreamMethod "writev" o = OutputStreamWritevMethodInfo 
ResolveUnixOutputStreamMethod "writevAll" o = OutputStreamWritevAllMethodInfo 
ResolveUnixOutputStreamMethod "writevAllAsync" o = OutputStreamWritevAllAsyncMethodInfo 
ResolveUnixOutputStreamMethod "writevAllFinish" o = OutputStreamWritevAllFinishMethodInfo 
ResolveUnixOutputStreamMethod "writevAsync" o = OutputStreamWritevAsyncMethodInfo 
ResolveUnixOutputStreamMethod "writevFinish" o = OutputStreamWritevFinishMethodInfo 
ResolveUnixOutputStreamMethod "writevNonblocking" o = PollableOutputStreamWritevNonblockingMethodInfo 
ResolveUnixOutputStreamMethod "getCloseFd" o = UnixOutputStreamGetCloseFdMethodInfo 
ResolveUnixOutputStreamMethod "getData" o = ObjectGetDataMethodInfo 
ResolveUnixOutputStreamMethod "getFd" o = UnixOutputStreamGetFdMethodInfo 
ResolveUnixOutputStreamMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveUnixOutputStreamMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveUnixOutputStreamMethod "setCloseFd" o = UnixOutputStreamSetCloseFdMethodInfo 
ResolveUnixOutputStreamMethod "setData" o = ObjectSetDataMethodInfo 
ResolveUnixOutputStreamMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveUnixOutputStreamMethod "setPending" o = OutputStreamSetPendingMethodInfo 
ResolveUnixOutputStreamMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveUnixOutputStreamMethod l o = MethodResolutionFailed l o :: Type 

getCloseFd

unixOutputStreamGetCloseFd Source #

Arguments

:: (HasCallStack, MonadIO m, IsUnixOutputStream a) 
=> a

stream: a UnixOutputStream

-> m Bool

Returns: True if the file descriptor is closed when done

Returns whether the file descriptor of stream will be closed when the stream is closed.

Since: 2.20

getFd

unixOutputStreamGetFd Source #

Arguments

:: (HasCallStack, MonadIO m, IsUnixOutputStream a) 
=> a

stream: a UnixOutputStream

-> m Int32

Returns: The file descriptor of stream

Return the UNIX file descriptor that the stream writes to.

Since: 2.20

new

unixOutputStreamNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

fd: a UNIX file descriptor

-> Bool

closeFd: True to close the file descriptor when done

-> m UnixOutputStream

Returns: a new OutputStream

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

unixOutputStreamSetCloseFd Source #

Arguments

:: (HasCallStack, MonadIO m, IsUnixOutputStream a) 
=> a

stream: a UnixOutputStream

-> Bool

closeFd: True to close the file descriptor when done

-> 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

Instances details
AttrInfo UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

Associated Types

type AttrAllowedOps UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrBaseTypeConstraint UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrGetType UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrSetTypeConstraint UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrTransferTypeConstraint UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrTransferType UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrLabel UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrOrigin UnixOutputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrAllowedOps UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrBaseTypeConstraint UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrGetType UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrLabel UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrOrigin UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrSetTypeConstraint UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrTransferType UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrTransferTypeConstraint UnixOutputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

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 ]

fd

The file descriptor that the stream writes to.

Since: 2.20

data UnixOutputStreamFdPropertyInfo Source #

Instances

Instances details
AttrInfo UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrAllowedOps UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrGetType UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrLabel UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrOrigin UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrSetTypeConstraint UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrTransferType UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

type AttrTransferTypeConstraint UnixOutputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixOutputStream

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