aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaOS.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-04-25 13:08:12 -0400
committerKen Moore <moorekou@gmail.com>2016-04-25 13:08:12 -0400
commited5ecf7ea7a482b4649e66ecb35fbc60af680684 (patch)
treeacc0fa17d228259e847f55c678db9fb0a9b50f0c /libLumina/LuminaOS.h
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-ed5ecf7ea7a482b4649e66ecb35fbc60af680684.tar.gz
lumina-ed5ecf7ea7a482b4649e66ecb35fbc60af680684.tar.bz2
lumina-ed5ecf7ea7a482b4649e66ecb35fbc60af680684.zip
Rearrange the Lumina source tree quite a bit:
Now the utilites are arranged by category (core, core-utils, desktop-utils), so all the -utils may be excluded by a package system (or turned into separate packages) as needed.
Diffstat (limited to 'libLumina/LuminaOS.h')
-rw-r--r--libLumina/LuminaOS.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/libLumina/LuminaOS.h b/libLumina/LuminaOS.h
deleted file mode 100644
index c305277a..00000000
--- a/libLumina/LuminaOS.h
+++ /dev/null
@@ -1,93 +0,0 @@
-//===========================================
-// Lumina-DE source code
-// Copyright (c) 2014-15, Ken Moore
-// Available under the 3-clause BSD license
-// See the LICENSE file for full details
-//===========================================
-// This is the main interface for any OS-specific system calls
-// To port Lumina to a different operating system, just create a file
-// called "LuminaOS-<Operating System>.cpp", and use that file in
-// the project (libLumina.pro) instead of LuminaOS-FreeBSD.cpp
-//===========================================
-#ifndef _LUMINA_LIBRARY_OS_H
-#define _LUMINA_LIBRARY_OS_H
-
-#include <QString>
-#include <QStringList>
-#include <QProcess>
-#include <QDir>
-#include <QObject>
-
-#include "LuminaUtils.h"
-
-class LOS{
-public:
- //Return the name of the OS being used
- static QString OSName();
-
- //OS-specific prefix(s)
- static QString LuminaShare(); //Install dir for Lumina share files
- static QString AppPrefix(); //Prefix for applications (/usr/local/ on FreeBSD)
- static QString SysPrefix(); //Prefix for system (/usr/ on FreeBSD)
-
- //OS-specific application shortcuts (*.desktop files)
- static QString ControlPanelShortcut();
- static QString AppStoreShortcut();
-
- //Scan for mounted external devices
- static QStringList ExternalDevicePaths(); //Returns: QStringList[<type>::::<filesystem>::::<path>]
- //Note: <type> = [USB, HDRIVE, DVD, SDCARD, UNKNOWN]
-
- //Read screen brightness information
- static int ScreenBrightness(); //Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
- //Set screen brightness
- static void setScreenBrightness(int percent);
-
- //Read the current volume
- static int audioVolume(); //Returns: audio volume as a percentage (0-100, with -1 for errors)
- //Set the current volume
- static void setAudioVolume(int percent);
- //Modify the current volume by a set amount (+ or -)
- static void changeAudioVolume(int percentdiff);
-
- //Check if a graphical audio mixer is installed
- static bool hasMixerUtility();
- //Launch the graphical audio mixer utility
- static void startMixerUtility();
-
- //Check for user system permission (shutdown/restart)
- static bool userHasShutdownAccess();
- static bool systemPerformingUpdates();
- //System Shutdown
- static void systemShutdown(); //start poweroff sequence
- //System Restart
- static void systemRestart(); //start reboot sequence
- //Check for suspend support
- static bool systemCanSuspend();
- //Put the system into the suspend state
- static void systemSuspend();
-
-
- //Battery Availability
- static bool hasBattery();
- //Battery Charge Level
- static int batteryCharge(); //Returns: percent charge (0-100), anything outside that range is counted as an error
- //Battery Charging State
- static bool batteryIsCharging();
- //Battery Time Remaining
- static int batterySecondsLeft(); //Returns: estimated number of seconds remaining
-
- //Get the checksum for a file
- static QStringList Checksums(QStringList filepaths); //Return: checksum of each input file (same order)
-
- //Get the filesystem capacity
- static QString FileSystemCapacity(QString dir) ; //Return: percentage capacity as give by the df command
-
- //System CPU Information
- static QStringList CPUTemperatures(); //Returns: List containing the temperature of any CPU's ("50C" for example)
- static int CPUUsagePercent(); //Returns: Overall percentage of the amount of CPU cycles in use (-1 for errors)
- static int MemoryUsagePercent(); //Returns: Overall percentage of the amount of available memory in use (-1 for errors)
- static QStringList DiskUsage(); //Returns: List of current read/write stats for each device
-};
-
-#endif
bgstack15