package obus

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module UPowerSource

UPower main interface

include OBus_peer.Private
Sourcetype t = private OBus_peer.peer
Sourceval of_peer : OBus_peer.peer -> t
Sourceval to_peer : t -> OBus_peer.peer
Sourceval daemon : unit -> t Lwt.t

daemon () returns the peer object for the upower daemon

Sourceval general_error : OBus_error.name
Methods
Sourceval hibernate_allowed : t -> bool Lwt.t
Sourceval hibernate : t -> unit Lwt.t
Sourceval suspend_allowed : t -> bool Lwt.t
Sourceval suspend : t -> unit Lwt.t
Sourceval about_to_sleep : t -> unit Lwt.t
Sourceval enumerate_devices : t -> UPower_device.t list Lwt.t
Signals
Sourceval resuming : t -> unit OBus_signal.t
Sourceval sleeping : t -> unit OBus_signal.t
Sourceval changed : t -> unit OBus_signal.t
Sourceval device_changed : t -> UPower_device.t OBus_signal.t
Sourceval device_removed : t -> UPower_device.t OBus_signal.t
Sourceval device_added : t -> UPower_device.t OBus_signal.t
Properties
Sourceval lid_is_present : t -> bool OBus_property.r
Sourceval lid_is_closed : t -> bool OBus_property.r
Sourceval on_low_battery : t -> bool OBus_property.r
Sourceval on_battery : t -> bool OBus_property.r
Sourceval can_hibernate : t -> bool OBus_property.r
Sourceval can_suspend : t -> bool OBus_property.r
Sourceval daemon_version : t -> string OBus_property.r
Sourceval properties : t -> OBus_property.group
OCaml

Innovation. Community. Security.