blip
0.1
|
A container for device configuration information. More...
#include <DeviceConfiguration.hpp>
Public Member Functions | |
DeviceConfiguration () | |
Construct a new device configuration with default values. More... | |
DeviceConfiguration (const DeviceConfiguration &other) | |
Copy constructor. More... | |
~DeviceConfiguration () | |
Destructor. More... | |
DeviceConfiguration & | operator= (const DeviceConfiguration &other) |
Assignment operator. More... | |
int32_t | getMCC () const |
Get the ISMI MCC (Mobile Country Code). More... | |
void | setMCC (int32_t value) |
Set the ISMI MCC (Mobile Country Code). More... | |
int32_t | getMNC () const |
Get the IMSI MNC (Mobile Network Code). More... | |
void | setMNC (int32_t value) |
Set the IMSI MNC (Mobile Network Code). More... | |
ccxx::String | getLanguage () const |
Get the two-character language code. More... | |
void | setLanguage (const ccxx::String &language) |
Set the two-character language code. More... | |
ccxx::String | getCountry () const |
Get the two-character country code. More... | |
void | setCountry (const ccxx::String &country) |
Set the two-character country code. More... | |
const DisplayMetrics & | getDisplayMetrics () const |
Get the display metrics. More... | |
ScreenOrient | getScreenOrientation () const |
Get the screen orientation. More... | |
void | setScreenOrientation (ScreenOrient value) |
Set the screen orientation. More... | |
ScreenType | getScreenType () const |
Get the touchscreen type. More... | |
void | setScreenType (ScreenType value) |
Set the touchscreen type. More... | |
ScreenSize | getScreenSize () const |
Get the screen size category. More... | |
void | setScreenSize (ScreenSize value) |
Set the screen size category. More... | |
ScreenDensity | getScreenDensity () const |
Get the screen density category. More... | |
void | setScreenDensity (ScreenDensity value) |
Set the screen density category. More... | |
ScreenAspect | getScreenAspect () const |
Get the screen aspect ratio category. More... | |
void | setScreenAspect (ScreenAspect value) |
Set the screen aspect ratio category. More... | |
int | getScreenWidthDP () const |
Get the screen width, in dp units. More... | |
void | setScreenWidthDP (int dp) |
Set the screen width, in dp units. More... | |
int | getScreenHeightDP () const |
Get the screen height, in dp units. More... | |
void | setScreenHeightDP (int dp) |
Set the screen height, in dp units. More... | |
int | getSmallestScreenWidthDP () const |
Get the smallest screen width, in dp units. More... | |
void | setSmallestScreenWidthDP (int dp) |
Set the smallest screen width, in dp units. More... | |
KeyboardType | getKeyboardType () const |
Get the keyboard type. More... | |
void | setKeyboardType (KeyboardType value) |
Set the keyboard type. More... | |
NavigationType | getNavigationType () const |
Get the navigation controls type. More... | |
void | setNavigationType (NavigationType value) |
Set the navigation controls type. More... | |
NavigationHidden | getNavigationHidden () const |
Get the "hidden" state of the navigation controls. More... | |
void | setNavigationHidden (NavigationHidden value) |
Set the "hidden" state of the navigation controls. More... | |
KeyboardHidden | getKeyboardHidden () const |
Get the "hidden" stat eof the keyboard. More... | |
void | setKeyboardHidden (KeyboardHidden value) |
Set the "hidden" stat eof the keyboard. More... | |
UIMode | getUIMode () const |
Get the dock mode. More... | |
void | setUIMode (UIMode value) |
Set the dock mode. More... | |
NightMode | getNightMode () const |
Get the night mode. More... | |
void | setNightMode (NightMode value) |
Set the night mode. More... | |
LayoutDirection | getLayoutDirection () const |
Get the layout direction. More... | |
void | setLayoutDirection (LayoutDirection value) |
Set the layout direction. More... | |
SDKVersion | getSDKVersion () const |
Get the Android SDK version. More... | |
void | setSDKVersion (SDKVersion value) |
Set the Android SDK version. More... | |
bool | isBetterThan (const DeviceConfiguration &other) const |
Determine if this device configuration is better than another. More... | |
bool | isValidFor (const DeviceConfiguration &other) const |
Determine if this device configuration satisfies the requirements specified by another. More... | |
A container for device configuration information.
Each NativeActivity has an immutable instance of this class which represents the device's current configuration.
An application may, create its own instance of this class to represent a desired or minimal configuration, and then compare it against the current device configuration with the isValidFor() or isBetterThan() methods. The "*_Any" value of any of the device configuration enumerations may be used to indicate that any value of that configuration value is acceptable.
Construct a new device configuration with default values.
DeviceConfiguration | ( | const DeviceConfiguration & | other | ) |
Copy constructor.
~DeviceConfiguration | ( | ) |
Destructor.
String getCountry | ( | ) | const |
Get the two-character country code.
|
inline |
Get the display metrics.
KeyboardHidden getKeyboardHidden | ( | ) | const |
Get the "hidden" stat eof the keyboard.
KeyboardType getKeyboardType | ( | ) | const |
Get the keyboard type.
String getLanguage | ( | ) | const |
Get the two-character language code.
LayoutDirection getLayoutDirection | ( | ) | const |
Get the layout direction.
int32_t getMCC | ( | ) | const |
Get the ISMI MCC (Mobile Country Code).
int32_t getMNC | ( | ) | const |
Get the IMSI MNC (Mobile Network Code).
NavigationHidden getNavigationHidden | ( | ) | const |
Get the "hidden" state of the navigation controls.
NavigationType getNavigationType | ( | ) | const |
Get the navigation controls type.
NightMode getNightMode | ( | ) | const |
Get the night mode.
ScreenAspect getScreenAspect | ( | ) | const |
Get the screen aspect ratio category.
ScreenDensity getScreenDensity | ( | ) | const |
Get the screen density category.
int getScreenHeightDP | ( | ) | const |
Get the screen height, in dp units.
Returns 0 if not set.
ScreenOrient getScreenOrientation | ( | ) | const |
Get the screen orientation.
ScreenSize getScreenSize | ( | ) | const |
Get the screen size category.
ScreenType getScreenType | ( | ) | const |
Get the touchscreen type.
int getScreenWidthDP | ( | ) | const |
Get the screen width, in dp units.
Returns 0 if not set.
SDKVersion getSDKVersion | ( | ) | const |
Get the Android SDK version.
int getSmallestScreenWidthDP | ( | ) | const |
Get the smallest screen width, in dp units.
Returns 0 if not set.
UIMode getUIMode | ( | ) | const |
Get the dock mode.
bool isBetterThan | ( | const DeviceConfiguration & | other | ) | const |
Determine if this device configuration is better than another.
bool isValidFor | ( | const DeviceConfiguration & | other | ) | const |
Determine if this device configuration satisfies the requirements specified by another.
DeviceConfiguration & operator= | ( | const DeviceConfiguration & | other | ) |
Assignment operator.
void setCountry | ( | const ccxx::String & | country | ) |
Set the two-character country code.
void setKeyboardHidden | ( | KeyboardHidden | value | ) |
Set the "hidden" stat eof the keyboard.
void setKeyboardType | ( | KeyboardType | value | ) |
Set the keyboard type.
void setLanguage | ( | const ccxx::String & | language | ) |
Set the two-character language code.
void setLayoutDirection | ( | LayoutDirection | value | ) |
Set the layout direction.
void setMCC | ( | int32_t | value | ) |
Set the ISMI MCC (Mobile Country Code).
void setMNC | ( | int32_t | value | ) |
Set the IMSI MNC (Mobile Network Code).
void setNavigationHidden | ( | NavigationHidden | value | ) |
Set the "hidden" state of the navigation controls.
void setNavigationType | ( | NavigationType | value | ) |
Set the navigation controls type.
void setNightMode | ( | NightMode | value | ) |
Set the night mode.
void setScreenAspect | ( | ScreenAspect | value | ) |
Set the screen aspect ratio category.
void setScreenDensity | ( | ScreenDensity | value | ) |
Set the screen density category.
void setScreenHeightDP | ( | int | dp | ) |
Set the screen height, in dp units.
void setScreenOrientation | ( | ScreenOrient | value | ) |
Set the screen orientation.
void setScreenSize | ( | ScreenSize | value | ) |
Set the screen size category.
void setScreenType | ( | ScreenType | value | ) |
Set the touchscreen type.
void setScreenWidthDP | ( | int | dp | ) |
Set the screen width, in dp units.
void setSDKVersion | ( | SDKVersion | value | ) |
Set the Android SDK version.
void setSmallestScreenWidthDP | ( | int | dp | ) |
Set the smallest screen width, in dp units.
void setUIMode | ( | UIMode | value | ) |
Set the dock mode.