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.Interfaces.DebugController

Contents

- Exported types
- Methods
  - getDebugEnabled
  - setDebugEnabled
- Properties
  - debugEnabled

Description

`GDebugController` is an interface to expose control of debugging features and debug output.

It is implemented on Linux using `DebugControllerDBus`, which exposes a D-Bus interface to allow authenticated peers to control debug features in this process.

Whether debug output is enabled is exposed as `DebugController`:`debug-enabled`. This controls `logSetDebugEnabled` by default. Application code may connect to the Object::notify signal for it to control other parts of its debug infrastructure as necessary.

If your application or service is using the default GLib log writer function, creating one of the built-in implementations of `GDebugController` should be all that’s needed to dynamically enable or disable debug output.

Since: 2.72

Synopsis

- newtype DebugController = DebugController (ManagedPtr DebugController)
- class (GObject o, IsDescendantOf DebugController o) => IsDebugController o
- toDebugController :: (MonadIO m, IsDebugController o) => o -> m DebugController
- debugControllerGetDebugEnabled :: (HasCallStack, MonadIO m, IsDebugController a) => a -> m Bool
- debugControllerSetDebugEnabled :: (HasCallStack, MonadIO m, IsDebugController a) => a -> Bool -> m ()
- constructDebugControllerDebugEnabled :: (IsDebugController o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> m Bool
- setDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> Bool -> m ()

# Exported types

newtype DebugController Source #

Memory-managed wrapper type.

Constructors

DebugController (ManagedPtr DebugController) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf DebugController o) => IsDebugController o Source #

Type class for types which can be safely cast to `DebugController`, for instance with `toDebugController`.

#### Instances

Instances details

(GObject o, IsDescendantOf DebugController o) => IsDebugController o Source # |
Instance details Defined in GI.Gio.Interfaces.DebugController

toDebugController :: (MonadIO m, IsDebugController o) => o -> m DebugController Source #

Cast to `DebugController`, 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, forceFloating, freezeNotify, getv, init, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getDebugEnabled, getProperty, getQdata.

#### Setters

setData, setDataFull, setDebugEnabled, setProperty.

## getDebugEnabled

debugControllerGetDebugEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsDebugController a) |
=> a | `self`: a `DebugController`
-> m Bool | Returns: `True` if debug output should be exposed, `False` otherwise

Get the value of `DebugController`:`debug-enabled`.

Since: 2.72

## setDebugEnabled

debugControllerSetDebugEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsDebugController a) |
=> a | `self`: a `DebugController`
-> Bool | `debugEnabled`: `True` if debug output should be exposed, `False` otherwise
-> m () |

Set the value of `DebugController`:`debug-enabled`.

Since: 2.72

# Properties

## debugEnabled

`True` if debug output should be exposed (for example by forwarding it to the journal), `False` otherwise.

Since: 2.72

constructDebugControllerDebugEnabled :: (IsDebugController o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> m Bool Source #

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

    get debugController #debugEnabled

setDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> Bool -> m () Source #

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

    set debugController [ #debugEnabled := value ]