/*
* Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFObject.h"
#import "OFString.h"
/*!
* @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h
*
* @brief A class for querying information about the system.
*/
@interface OFSystemInfo: OFObject
/*!
* @brief Returns the size of a page.
*
* @return The size of a page
*/
+ (size_t)pageSize;
/*!
* @brief Returns the number of CPUs installed in the system.
*
* A CPU with multiple cores counts as multiple CPUs.
*
* @return The number of CPUs installed in the system
*/
+ (size_t)numberOfCPUs;
/*!
* @brief Returns the native 8-bit string encoding of the operating system.
*
* This is useful to encode strings correctly for passing them to operating
* system calls.
*
* @return The native 8-bit string encoding of the operating system
*/
+ (of_string_encoding_t)native8BitEncoding;
/*!
* @brief Returns the path where user data for the application can be stored.
*
* On Unix systems, this adheres to the XDG Base Directory specification.@n
* On Mac OS X and iOS, it uses the `NSApplicationSupportDirectory` directory.@n
* On Windows, it uses the `APPDATA` environment variable.@n
* On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory.
*
* @return The path where user data for the application can be stored
*/
+ (OFString*)userDataPath;
/*!
* @brief Returns the path where user configuration for the application can be
* stored.
*
* On Unix systems, this adheres to the XDG Base Directory specification.@n
* On Mac OS X and iOS, it uses the `Preferences` directory inside of
* `NSLibraryDirectory` directory.@n
* On Windows, it uses the `APPDATA` environment variable.@n
* On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory.
*
* @return The path where user configuration for the application can be stored
*/
+ (OFString*)userConfigPath;
@end