From 5ecc2dabc73eaf9cca0a6a547f8910582e496b70 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 29 Apr 2005 08:14:55 +0000 Subject: [PATCH] Undo checkin withbad line endings. svn path=/trunk/boinc/; revision=5974 --- client/hostinfo_unix.C | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/client/hostinfo_unix.C b/client/hostinfo_unix.C index b2af285915..0d014b457c 100644 --- a/client/hostinfo_unix.C +++ b/client/hostinfo_unix.C @@ -72,16 +72,6 @@ using std::string; #ifdef __APPLE__ -#include -#ifdef __cplusplus -extern "C" { -#endif -#include -#include -#ifdef __cplusplus -} // extern "C" -#endif - NXEventHandle gEventHandle; #endif // __APPLE__ @@ -125,31 +115,10 @@ int get_timezone() { // Returns true if the host is currently running off battery power // If you can't figure out, return false // -// TODO: port this to other platforms (Windows, others?) +// TODO: port this to other platforms (Windows, Mac OS X, others?) // bool HOST_INFO::host_is_running_on_batteries() { -#if defined(__APPLE__) - CFDictionaryRef pSource = NULL; - CFStringRef psState; - int i; - bool retval = false; - - CFTypeRef blob = IOPSCopyPowerSourcesInfo(); - CFArrayRef list = IOPSCopyPowerSourcesList(blob); - - for(i = 0; i < CFArrayGetCount(list); i++) { - pSource = IOPSGetPowerSourceDescription(blob, CFArrayGetValueAtIndex(list, i)); - if(!pSource) break; - psState = (CFStringRef)CFDictionaryGetValue(pSource, CFSTR(kIOPSPowerSourceStateKey)); - if(!CFStringCompare(psState,CFSTR(kIOPSBatteryPowerValue),0)) - retval = true; - } - - CFRelease(blob); - CFRelease(list); - return(retval); - -#elif defined(linux) +#ifdef linux bool retval = false; FILE* fapm = fopen("/proc/apm", "r"); @@ -618,4 +587,3 @@ bool HOST_INFO::users_idle(bool check_all_logins, double idle_time_to_run) { const char *BOINC_RCSID_2cf92d205b = "$Id$"; -