Ignore:
Timestamp:
07/24/14 06:10:32 (3 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3
Children:
9d0ec76
Parents:
3f98638
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lumina/libLumina/LuminaOS.h

    rd0a927f r733da14  
    55//  See the LICENSE file for full details 
    66//=========================================== 
     7//  This is the main interface for any OS-specific system calls 
     8//    To port Lumina to a different operating system, just create a file  
     9//    called "LuminaOS-<Operating System>.cpp", and use that file in  
     10//    the project (libLumina.pro) instead of LuminaOS-FreeBSD.cpp 
     11//=========================================== 
    712#ifndef _LUMINA_LIBRARY_OS_H 
    813#define _LUMINA_LIBRARY_OS_H 
     
    1015#include <QString> 
    1116#include <QStringList> 
     17#include <QProcess> 
    1218 
    1319#include "LuminaUtils.h" 
     
    3036        //Modify the current volume by a set amount (+ or -) 
    3137        static void changeAudioVolume(int percentdiff); 
     38 
     39        //System Shutdown 
     40        static void systemShutdown(); //start poweroff sequence 
     41        //System Restart 
     42        static void systemRestart(); //start reboot sequence 
     43 
     44        //Battery Availability 
     45        static bool hasBattery(); 
     46        //Battery Charge Level 
     47        static int batteryCharge(); //Returns: percent charge (0-100), anything outside that range is counted as an error 
     48        //Battery Charging State 
     49        static bool batteryIsCharging(); 
     50        //Battery Time Remaining 
     51        static int batterySecondsLeft(); //Returns: estimated number of seconds remaining 
    3252}; 
    3353 
Note: See TracChangeset for help on using the changeset viewer.