Diffusion Baloo 191b40317957

[FileIndexScheduler] Add new state for Idle on battery

Authored by bruns on Jun 2 2019, 10:17 AM.

Description

[FileIndexScheduler] Add new state for Idle on battery

Summary:
When the system is running on battery, the content indexing is suspended
to conserve power. Expose the state for balooctl monitor and
balooctl status:

Press ctrl+c to stop monitoring
File indexer is running
Idle
  (AC power disconnected)
Idle (Powersave)
Indexing modified files
Idle (Powersave)
  (AC power reconnected)
Indexing file content
Indexing: /home/stefan/logs/freenode_#kde-devel.log: Ok
Idle
Baloo File Indexer is running
Indexer state: Idle (Powersave)
Total files indexed: 4561
Files waiting for content indexing: 1

Depends on D21540

Test Plan: run balooctl monitor, unplug/plug AC power

Reviewers: Baloo, ngraham, astippich

Reviewed By: Baloo, ngraham

Subscribers: kde-frameworks-devel

Tags: Frameworks, Baloo

Differential Revision: https://phabricator.kde.org/D21541

Details