source: lumina/libLumina/LuminaOS-Linux.cpp @ 733da14

enter/10releng/10.0.3releng/10.1releng/10.1.1releng/10.1.2
Last change on this file since 733da14 was 733da14, checked in by Ken Moore <ken@…>, 11 months ago

Move all the OS-specific functions into the LuminaOS class (LOS), and create the shell for the Linux version with all the previous submissions to make it work on Linux.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1//===========================================
2//  Lumina-DE source code
3//  Copyright (c) 2014, Ken Moore
4//  Available under the 3-clause BSD license
5//  See the LICENSE file for full details
6//===========================================
7#include "LuminaOS.h"
8#include <unistd.h>
9#include <stdio.h> // Needed for BUFSIZ
10
11// ==== ExternalDevicePaths() ====
12QStringList LOS::ExternalDevicePaths(){
13    //Returns: QStringList[<type>::::<filesystem>::::<path>]
14      //Note: <type> = [USB, HDRIVE, DVD, SDCARD, UNKNOWN]
15       
16  //Not implemented yet for Linux
17  return QStringList();
18}
19
20//Read screen brightness information
21int LOS::ScreenBrightness(){
22  //Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
23  return -1;  //not implemented yet for Linux
24}
25
26//Set screen brightness
27void LOS::setScreenBrightness(int percent){
28  //not implemented yet for Linux
29}
30
31//Read the current volume
32int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 for errors)
33  return -1; //Not implemented yet for Linux
34}
35
36//Set the current volume
37void LOS::setAudioVolume(int percent){
38  //not implemented yet for Linux
39}
40
41//Change the current volume a set amount (+ or -)
42void LOS::changeAudioVolume(int percentdiff){
43  //not implemented yet for Linux       
44}
45
46//System Shutdown
47void LOS::systemShutdown(){ //start poweroff sequence
48  QProcess::startDetached("shutdown -h now");
49}
50
51//System Restart
52void LOS::systemRestart(){ //start reboot sequence
53  QProcess::startDetached("shutdown -r now");
54}
55
56//Battery Availability
57bool LOS::hasBattery(){
58  return false; //not implemented yet for Linux
59}
60
61//Battery Charge Level
62int LOS::batteryCharge(){ //Returns: percent charge (0-100), anything outside that range is counted as an error
63  return -1;  //not implemented yet for Linux
64}
65
66//Battery Charging State
67bool LOS::batteryIsCharging(){
68  return false; //not implemented yet for Linux
69}
70
71//Battery Time Remaining
72int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining
73  return 0; //not implemented yet for Linux
74}
Note: See TracBrowser for help on using the repository browser.