From ddbb71d1c8c78183fa92a981fef9856afff67bce Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 16 Mar 2015 03:16:18 -0300 Subject: [PATCH] Add files to unsupported platform. --- unsupported/Battery.c | 8 +++++++ unsupported/Battery.h | 9 ++++++++ unsupported/UnsupportedProcess.c | 37 ++++++++++++++++++++++++++++++++ unsupported/UnsupportedProcess.h | 24 +++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 unsupported/Battery.c create mode 100644 unsupported/Battery.h create mode 100644 unsupported/UnsupportedProcess.c create mode 100644 unsupported/UnsupportedProcess.h diff --git a/unsupported/Battery.c b/unsupported/Battery.c new file mode 100644 index 00000000..6d6e94bd --- /dev/null +++ b/unsupported/Battery.c @@ -0,0 +1,8 @@ + +#include "BatteryMeter.h" + +void Battery_getData(double* level, ACPresence* isOnAC) { + *level = -1; + *isOnAC = AC_ERROR; +} + diff --git a/unsupported/Battery.h b/unsupported/Battery.h new file mode 100644 index 00000000..8dc0cef6 --- /dev/null +++ b/unsupported/Battery.h @@ -0,0 +1,9 @@ +/* Do not edit this file. It was automatically generated. */ + +#ifndef HEADER_Battery +#define HEADER_Battery + +void Battery_getData(double* level, ACPresence* isOnAC); + + +#endif diff --git a/unsupported/UnsupportedProcess.c b/unsupported/UnsupportedProcess.c new file mode 100644 index 00000000..be41a4b9 --- /dev/null +++ b/unsupported/UnsupportedProcess.c @@ -0,0 +1,37 @@ +/* +htop - UnsupportedProcess.c +(C) 2015 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ + +#include "Process.h" +#include "UnsupportedProcess.h" +#include + +/*{ + +typedef struct UnsupportedProcess_ { + Process super; + // add platform-specific fields here +} UnsupportedProcess; + +#define Process_delete UnsupportedProcess_delete + +}*/ + +UnsupportedProcess* UnsupportedProcess_new(Settings* settings) { + UnsupportedProcess* this = calloc(sizeof(UnsupportedProcess), 1); + Object_setClass(this, Class(Process)); + Process_init(&this->super, settings); + return this; +} + +void UnsupportedProcess_delete(Object* cast) { + UnsupportedProcess* this = (UnsupportedProcess*) cast; + Object_setClass(this, Class(Process)); + Process_done((Process*)cast); + // free platform-specific fields here + free(this); +} + diff --git a/unsupported/UnsupportedProcess.h b/unsupported/UnsupportedProcess.h new file mode 100644 index 00000000..68995665 --- /dev/null +++ b/unsupported/UnsupportedProcess.h @@ -0,0 +1,24 @@ +/* Do not edit this file. It was automatically generated. */ + +#ifndef HEADER_UnsupportedProcess +#define HEADER_UnsupportedProcess +/* +htop - UnsupportedProcess.h +(C) 2015 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ + + +typedef struct UnsupportedProcess_ { + Process super; + // add platform-specific fields here +} UnsupportedProcess; + +#define Process_delete UnsupportedProcess_delete + + +void UnsupportedProcess_delete(Object* cast); + + +#endif