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

GI.Gio.Objects.UnixInputStream

Description

GUnixInputStream implements InputStream for reading from 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/gunixinputstream.h> belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file or the GioUnix-2.0 GIR namespace when using it.

Synopsis

Exported types

newtype UnixInputStream Source #

Memory-managed wrapper type.

Instances

Instances details
Eq UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

GObject UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

ManagedPtrNewtype UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

TypedObject UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

Methods

glibType :: IO GType #

HasParentTypes UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

HasAttributeList UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

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

Defined in GI.Gio.Objects.UnixInputStream

Methods

getField :: UnixInputStream -> p #

(info ~ ResolveUnixInputStreamMethod t UnixInputStream, OverloadedMethodInfo info UnixInputStream) => IsLabel t (MethodProxy info UnixInputStream) Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

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

Defined in GI.Gio.Objects.UnixInputStream

Methods

fromLabel :: UnixInputStream -> p #

IsGValue (Maybe UnixInputStream) Source #

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

Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttributeList UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type ParentTypes UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type SignalList UnixInputStream Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

class (GObject o, IsDescendantOf UnixInputStream o) => IsUnixInputStream o Source #

Type class for types which can be safely cast to UnixInputStream, for instance with toUnixInputStream.

Instances

Instances details
(GObject o, IsDescendantOf UnixInputStream o) => IsUnixInputStream o Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

toUnixInputStream :: (MonadIO m, IsUnixInputStream o) => o -> m UnixInputStream Source #

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

Methods

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

Equations

ResolveUnixInputStreamMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveUnixInputStreamMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveUnixInputStreamMethod "canPoll" o = PollableInputStreamCanPollMethodInfo 
ResolveUnixInputStreamMethod "clearPending" o = InputStreamClearPendingMethodInfo 
ResolveUnixInputStreamMethod "close" o = InputStreamCloseMethodInfo 
ResolveUnixInputStreamMethod "closeAsync" o = InputStreamCloseAsyncMethodInfo 
ResolveUnixInputStreamMethod "closeFinish" o = InputStreamCloseFinishMethodInfo 
ResolveUnixInputStreamMethod "createSource" o = PollableInputStreamCreateSourceMethodInfo 
ResolveUnixInputStreamMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveUnixInputStreamMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveUnixInputStreamMethod "getv" o = ObjectGetvMethodInfo 
ResolveUnixInputStreamMethod "hasPending" o = InputStreamHasPendingMethodInfo 
ResolveUnixInputStreamMethod "isClosed" o = InputStreamIsClosedMethodInfo 
ResolveUnixInputStreamMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveUnixInputStreamMethod "isReadable" o = PollableInputStreamIsReadableMethodInfo 
ResolveUnixInputStreamMethod "notify" o = ObjectNotifyMethodInfo 
ResolveUnixInputStreamMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveUnixInputStreamMethod "read" o = InputStreamReadMethodInfo 
ResolveUnixInputStreamMethod "readAll" o = InputStreamReadAllMethodInfo 
ResolveUnixInputStreamMethod "readAllAsync" o = InputStreamReadAllAsyncMethodInfo 
ResolveUnixInputStreamMethod "readAllFinish" o = InputStreamReadAllFinishMethodInfo 
ResolveUnixInputStreamMethod "readAsync" o = InputStreamReadAsyncMethodInfo 
ResolveUnixInputStreamMethod "readBytes" o = InputStreamReadBytesMethodInfo 
ResolveUnixInputStreamMethod "readBytesAsync" o = InputStreamReadBytesAsyncMethodInfo 
ResolveUnixInputStreamMethod "readBytesFinish" o = InputStreamReadBytesFinishMethodInfo 
ResolveUnixInputStreamMethod "readFinish" o = InputStreamReadFinishMethodInfo 
ResolveUnixInputStreamMethod "readNonblocking" o = PollableInputStreamReadNonblockingMethodInfo 
ResolveUnixInputStreamMethod "ref" o = ObjectRefMethodInfo 
ResolveUnixInputStreamMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveUnixInputStreamMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveUnixInputStreamMethod "skip" o = InputStreamSkipMethodInfo 
ResolveUnixInputStreamMethod "skipAsync" o = InputStreamSkipAsyncMethodInfo 
ResolveUnixInputStreamMethod "skipFinish" o = InputStreamSkipFinishMethodInfo 
ResolveUnixInputStreamMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveUnixInputStreamMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveUnixInputStreamMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveUnixInputStreamMethod "unref" o = ObjectUnrefMethodInfo 
ResolveUnixInputStreamMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveUnixInputStreamMethod "getCloseFd" o = UnixInputStreamGetCloseFdMethodInfo 
ResolveUnixInputStreamMethod "getData" o = ObjectGetDataMethodInfo 
ResolveUnixInputStreamMethod "getFd" o = UnixInputStreamGetFdMethodInfo 
ResolveUnixInputStreamMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveUnixInputStreamMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveUnixInputStreamMethod "setCloseFd" o = UnixInputStreamSetCloseFdMethodInfo 
ResolveUnixInputStreamMethod "setData" o = ObjectSetDataMethodInfo 
ResolveUnixInputStreamMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveUnixInputStreamMethod "setPending" o = InputStreamSetPendingMethodInfo 
ResolveUnixInputStreamMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveUnixInputStreamMethod l o = MethodResolutionFailed l o :: Type 

getCloseFd

unixInputStreamGetCloseFd Source #

Arguments

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

stream: a UnixInputStream

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

unixInputStreamGetFd Source #

Arguments

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

stream: a UnixInputStream

-> m Int32

Returns: The file descriptor of stream

Return the UNIX file descriptor that the stream reads from.

Since: 2.20

new

unixInputStreamNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

fd: a UNIX file descriptor

-> Bool

closeFd: True to close the file descriptor when done

-> m UnixInputStream

Returns: a new UnixInputStream

Creates a new UnixInputStream for the given fd.

If closeFd is True, the file descriptor will be closed when the stream is closed.

setCloseFd

unixInputStreamSetCloseFd Source #

Arguments

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

stream: a UnixInputStream

-> 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 UnixInputStreamCloseFdPropertyInfo Source #

Instances

Instances details
AttrInfo UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

Associated Types

type AttrAllowedOps UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrBaseTypeConstraint UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrGetType UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrSetTypeConstraint UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrTransferTypeConstraint UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrTransferType UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrLabel UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrOrigin UnixInputStreamCloseFdPropertyInfo 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrAllowedOps UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrBaseTypeConstraint UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrGetType UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrLabel UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrOrigin UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrSetTypeConstraint UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrTransferType UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrTransferTypeConstraint UnixInputStreamCloseFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

constructUnixInputStreamCloseFd :: (IsUnixInputStream 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.

getUnixInputStreamCloseFd :: (MonadIO m, IsUnixInputStream o) => o -> m Bool Source #

Get the value of the “close-fd” property. When overloading is enabled, this is equivalent to

get unixInputStream #closeFd

setUnixInputStreamCloseFd :: (MonadIO m, IsUnixInputStream o) => o -> Bool -> m () Source #

Set the value of the “close-fd” property. When overloading is enabled, this is equivalent to

set unixInputStream [ #closeFd := value ]

fd

The file descriptor that the stream reads from.

Since: 2.20

data UnixInputStreamFdPropertyInfo Source #

Instances

Instances details
AttrInfo UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrAllowedOps UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrBaseTypeConstraint UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrGetType UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrLabel UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrOrigin UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrSetTypeConstraint UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrTransferType UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

type AttrTransferTypeConstraint UnixInputStreamFdPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.UnixInputStream

constructUnixInputStreamFd :: (IsUnixInputStream 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.

getUnixInputStreamFd :: (MonadIO m, IsUnixInputStream o) => o -> m Int32 Source #

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

get unixInputStream #fd