gi-gio-2.0.32: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | Safe-Inferred
Language | Haskell2010

GI.Gio.Objects.FilterInputStream

Contents

- Exported types
- Methods
  - getBaseStream
  - getCloseBaseStream
  - setCloseBaseStream
- Properties
  - baseStream
  - closeBaseStream

Description

Base class for input stream implementations that perform some kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping.

Synopsis

- newtype FilterInputStream = FilterInputStream (ManagedPtr FilterInputStream)
- class (GObject o, IsDescendantOf FilterInputStream o) => IsFilterInputStream o
- toFilterInputStream :: (MonadIO m, IsFilterInputStream o) => o -> m FilterInputStream
- filterInputStreamGetBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> m InputStream
- filterInputStreamGetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> m Bool
- filterInputStreamSetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> Bool -> m ()
- constructFilterInputStreamBaseStream :: (IsFilterInputStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o)
- getFilterInputStreamBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m InputStream
- constructFilterInputStreamCloseBaseStream :: (IsFilterInputStream o, MonadIO m) => Bool -> m (GValueConstruct o)
- getFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m Bool
- setFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> Bool -> m ()

# Exported types

newtype FilterInputStream Source #

Memory-managed wrapper type.

Constructors

FilterInputStream (ManagedPtr FilterInputStream) |

#### Instances

Instances details

Eq FilterInputStream Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream Methods (==) :: FilterInputStream -> FilterInputStream -> Bool Source # (/=) :: FilterInputStream -> FilterInputStream -> Bool Source #
GObject FilterInputStream Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream
ManagedPtrNewtype FilterInputStream Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream Methods toManagedPtr :: FilterInputStream -> ManagedPtr FilterInputStream Source #
TypedObject FilterInputStream Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream Methods glibType :: IO GType Source #
HasParentTypes FilterInputStream Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream
IsGValue (Maybe FilterInputStream) Source # | Convert `FilterInputStream` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.FilterInputStream Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe FilterInputStream -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe FilterInputStream) Source #
type ParentTypes FilterInputStream Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream type ParentTypes FilterInputStream = '[InputStream, Object]

class (GObject o, IsDescendantOf FilterInputStream o) => IsFilterInputStream o Source #

Type class for types which can be safely cast to `FilterInputStream`, for instance with `toFilterInputStream`.

#### Instances

Instances details

(GObject o, IsDescendantOf FilterInputStream o) => IsFilterInputStream o Source # |
Instance details Defined in GI.Gio.Objects.FilterInputStream

toFilterInputStream :: (MonadIO m, IsFilterInputStream o) => o -> m FilterInputStream Source #

Cast to `FilterInputStream`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, clearPending, close, closeAsync, closeFinish, forceFloating, freezeNotify, getv, hasPending, isClosed, isFloating, notify, notifyByPspec, read, readAll, readAllAsync, readAllFinish, readAsync, readBytes, readBytesAsync, readBytesFinish, readFinish, ref, refSink, runDispose, skip, skipAsync, skipFinish, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getBaseStream, getCloseBaseStream, getData, getProperty, getQdata.

#### Setters

setCloseBaseStream, setData, setDataFull, setPending, setProperty.

## getBaseStream

filterInputStreamGetBaseStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsFilterInputStream a) |
=> a | `stream`: a `FilterInputStream`.
-> m InputStream | Returns: a `InputStream`.

Gets the base stream for the filter stream.

## getCloseBaseStream

filterInputStreamGetCloseBaseStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsFilterInputStream a) |
=> a | `stream`: a `FilterInputStream`.
-> m Bool | Returns: `True` if the base stream will be closed.

Returns whether the base stream will be closed when `stream` is closed.

## setCloseBaseStream

filterInputStreamSetCloseBaseStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsFilterInputStream a) |
=> a | `stream`: a `FilterInputStream`.
-> Bool | `closeBase`: `True` to close the base stream.
-> m () |

Sets whether the base stream will be closed when `stream` is closed.

# Properties

## baseStream

The underlying base stream on which the I/O ops will be done.

constructFilterInputStreamBaseStream :: (IsFilterInputStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`base-stream`” property. This is rarely needed directly, but it is used by `new`.

getFilterInputStreamBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m InputStream Source #

Get the value of the “`base-stream`” property. When overloading is enabled, this is equivalent to

    get filterInputStream #baseStream

## closeBaseStream

Whether the base stream should be closed when the filter stream is closed.

constructFilterInputStreamCloseBaseStream :: (IsFilterInputStream o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`close-base-stream`” property. This is rarely needed directly, but it is used by `new`.

getFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m Bool Source #

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

    get filterInputStream #closeBaseStream

setFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> Bool -> m () Source #

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

    set filterInputStream [ #closeBaseStream := value ]