Index: src/OFSystemInfo.m ================================================================== --- src/OFSystemInfo.m +++ src/OFSystemInfo.m @@ -38,11 +38,11 @@ #import "OFDictionary.h" #import "OFApplication.h" #import "OFNotImplementedException.h" -#if defined(OF_MAC_OS_X) +#if defined(OF_MAC_OS_X) || defined(OF_IOS) # ifdef HAVE_SYSDIR_H # include # else # include # endif @@ -149,12 +149,11 @@ return OF_STRING_ENCODING_UTF_8; } + (OFString*)userDataPath { - /* TODO: Return something more sensible for iOS */ -#if defined(OF_MAC_OS_X) +#if defined(OF_MAC_OS_X) || defined(OF_IOS) void *pool = objc_autoreleasePoolPush(); char pathC[PATH_MAX]; OFMutableString *path; OFString *home; @@ -213,11 +212,11 @@ pathC, PATH_MAX) != B_OK) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; return [OFString stringWithUTF8String: pathC]; -#else +#elif !defined(OF_IOS) void *pool = objc_autoreleasePoolPush(); OFDictionary *env = [OFApplication environment]; OFString *var; if ((var = [env objectForKey: @"XDG_DATA_HOME"]) != nil && @@ -235,17 +234,19 @@ var, @".local", @"share", nil]]; [var retain]; objc_autoreleasePoolPop(pool); return [var autorelease]; +#else + @throw [OFNotImplementedException exceptionWithSelector: _cmd + object: self]; #endif } + (OFString*)userConfigPath { - /* TODO: Return something more sensible for iOS */ -#if defined(OF_MAC_OS_X) +#if defined(OF_MAC_OS_X) || defined(OF_IOS) void *pool = objc_autoreleasePoolPush(); char pathC[PATH_MAX]; OFMutableString *path; OFString *home; @@ -306,11 +307,11 @@ pathC, PATH_MAX) != B_OK) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; return [OFString stringWithUTF8String: pathC]; -#else +#elif !defined(OF_IOS) void *pool = objc_autoreleasePoolPush(); OFDictionary *env = [OFApplication environment]; OFString *var; if ((var = [env objectForKey: @"XDG_CONFIG_HOME"]) != nil && @@ -327,10 +328,13 @@ var = [var stringByAppendingPathComponent: @".config"]; [var retain]; objc_autoreleasePoolPop(pool); return [var autorelease]; +#else + @throw [OFNotImplementedException OFNotImplementedException: _cmd + object: self]; #endif } + (OFString*)CPUVendor {