diff options
author | Ken Moore <ken@ixsystems.com> | 2017-12-05 15:56:47 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-12-05 15:58:09 -0500 |
commit | 5f545e7fe369aa9bc13496fe9e469c33f4219e04 (patch) | |
tree | d59aa90cfb08b16fe14af32b355c4dcfa33bc689 /src-qt5/src-cpp/framework-OSInterface-template.cpp | |
parent | Move the new OSInterface class over to the base-level src-cpp directory. (diff) | |
download | lumina-5f545e7fe369aa9bc13496fe9e469c33f4219e04.tar.gz lumina-5f545e7fe369aa9bc13496fe9e469c33f4219e04.tar.bz2 lumina-5f545e7fe369aa9bc13496fe9e469c33f4219e04.zip |
Rename the OSInterface files according to the new format ("framework-*")
Diffstat (limited to 'src-qt5/src-cpp/framework-OSInterface-template.cpp')
-rw-r--r-- | src-qt5/src-cpp/framework-OSInterface-template.cpp | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src-qt5/src-cpp/framework-OSInterface-template.cpp b/src-qt5/src-cpp/framework-OSInterface-template.cpp new file mode 100644 index 00000000..96b01e60 --- /dev/null +++ b/src-qt5/src-cpp/framework-OSInterface-template.cpp @@ -0,0 +1,100 @@ +//=========================================== +// Lumina desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include <OSInterface.h> + +//=========== +// PUBLIC +//=========== + +//Simple functions used to determine if the current OS supports using this class, and what levels of support +QList<OSInterface::Interface> OSInterface::supportedNotifications(){ + //Which interfaces provide change notifications + return QList< OSInterface::Interface >(); +} + +QList<OSInterface::Interface> OSInterface::supportedStatus(){ + //Which interfaces are available for "status" requests + return QList< OSInterface::Interface >(); +} + +QList<OSInterface::Interface> OSInterface::supportedModify(){ + //Which interfaces are available for "modify" requests + return QList< OSInterface::Interface >(); +} + +//Start/stop interface watchers/notifications (each only called once per session) +void OSInterface::start(){ + //nothing to do +} + +void OSInterface::stop(){ + //nothing to do +} + +//Generic status update +QList<QVariant> OSInterface::status(OSInterface::Interface){ + // ==== Interface status output lists ==== + // Battery: [ float (percent charge), bool (is Charging), double (seconds remaining) ]; + // Volume: [int (percent volume) ] + // Devices: [ QStringList[ name, mountpoint, type (optional)] ] (List length depends on number of devices) + // Network: [bool (network access available)] + // PowerOff: [bool (can power off system)] + // Reboot: [bool (can reboot system)] + // Suspend: [bool (can suspend system)] + // Updates: [bool (is updating), bool (reboot required)] + // ========== + return QList<QVariant>(); +} + +//Individual Interface interactions +bool OSInterface::modify(OSInterface::Interface, QList<QVariant>){ //returns: success/failure + // ==== Interface modification argument lists ==== + // Battery: <NO MODIFICATION> + // Volume: [int (set percent volume) ] + // Devices: <NO MODIFICATION> + // Network: <NO MODIFICATION> + // PowerOff: [bool (skip updates - optional)] + // Reboot: [bool (skip updates - optional)] + // Suspend: [] (No input arguments) + // Updates: <NO MODIFICATION> + // ========== + return false; +} + +//================= +// PRIVATE SLOTS +//================= +//FileSystemWatcher slots +void OSInterface::watcherFileChanged(QString){ + +} + +void OSInterface::watcherDirChanged(QString){ + +} + +//IO Device slots +void OSInterface::iodeviceReadyRead(){ + +} + +void OSInterface::iodeviceAboutToClose(){ + +} + +//NetworkAccessManager slots +void OSInterface::netAccessChanged(QNetworkAccessManager::NetworkAccessibility){ + +} + +void OSInterface::netRequestFinished(QNetworkReply*){ + +} + +void OSInterface::netSslErrors(QNetworkReply*, const QList<QSslError>&){ + +} |