diff options
author | Ken Moore <moorekou@gmail.com> | 2014-09-08 08:42:16 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2014-09-08 08:42:16 -0400 |
commit | c1837380904c5fee9d700168f6372dbd13f8bef1 (patch) | |
tree | 7f9414bba3a737d3dbfbc1419ea31062ceb40c09 /libLumina/LuminaOS-template.cpp | |
parent | Oops, forgot to add the new OSD background image to GIT. (diff) | |
parent | The following features have been added to the Linux port: (diff) | |
download | lumina-c1837380904c5fee9d700168f6372dbd13f8bef1.tar.gz lumina-c1837380904c5fee9d700168f6372dbd13f8bef1.tar.bz2 lumina-c1837380904c5fee9d700168f6372dbd13f8bef1.zip |
Merge pull request #3 from slicer69/linux
Audio volume and screen brightness added for Linux
Diffstat (limited to 'libLumina/LuminaOS-template.cpp')
-rw-r--r-- | libLumina/LuminaOS-template.cpp | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/libLumina/LuminaOS-template.cpp b/libLumina/LuminaOS-template.cpp new file mode 100644 index 00000000..be70e1a5 --- /dev/null +++ b/libLumina/LuminaOS-template.cpp @@ -0,0 +1,87 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2014, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifdef __OSNAME__ +#include "LuminaOS.h" +#include <unistd.h> +#include <stdio.h> // Needed for BUFSIZ + +// ==== ExternalDevicePaths() ==== +QStringList LOS::ExternalDevicePaths(){ + //Returns: QStringList[<type>::::<filesystem>::::<path>] + //Note: <type> = [USB, HDRIVE, DVD, SDCARD, UNKNOWN] + + //Not implemented yet for Linux + return QStringList(); +} + +//Read screen brightness information +int LOS::ScreenBrightness(){ + //Returns: Screen Brightness as a percentage (0-100, with -1 for errors) + return -1; //not implemented yet for Linux +} + +//Set screen brightness +void LOS::setScreenBrightness(int percent){ + //not implemented yet for Linux +} + +//Read the current volume +int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 for errors) + return -1; //Not implemented yet for Linux +} + +//Set the current volume +void LOS::setAudioVolume(int percent){ + //not implemented yet for Linux +} + +//Change the current volume a set amount (+ or -) +void LOS::changeAudioVolume(int percentdiff){ + //not implemented yet for Linux +} + +//Check if a graphical audio mixer is installed +bool LOS::hasMixerUtility(){ + return false; //not implemented yet for Linux +} + +//Launch the graphical audio mixer utility +void LOS::startMixerUtility(){ + //not implemented yet for Linux +} + +//System Shutdown +void LOS::systemShutdown(){ //start poweroff sequence + QProcess::startDetached("shutdown -h now"); +} + +//System Restart +void LOS::systemRestart(){ //start reboot sequence + QProcess::startDetached("shutdown -r now"); +} + +//Battery Availability +bool LOS::hasBattery(){ + return false; //not implemented yet for Linux +} + +//Battery Charge Level +int LOS::batteryCharge(){ //Returns: percent charge (0-100), anything outside that range is counted as an error + return -1; //not implemented yet for Linux +} + +//Battery Charging State +bool LOS::batteryIsCharging(){ + return false; //not implemented yet for Linux +} + +//Battery Time Remaining +int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining + return 0; //not implemented yet for Linux +} + +#endif |