blip  0.1
DeviceConfiguration Class Reference

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...
 
DeviceConfigurationoperator= (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 DisplayMetricsgetDisplayMetrics () 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...
 

Detailed Description

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.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ DeviceConfiguration() [1/2]

Construct a new device configuration with default values.

◆ DeviceConfiguration() [2/2]

Copy constructor.

◆ ~DeviceConfiguration()

Destructor.

Member Function Documentation

◆ getCountry()

String getCountry ( ) const

Get the two-character country code.

◆ getDisplayMetrics()

const DisplayMetrics& getDisplayMetrics ( ) const
inline

Get the display metrics.

◆ getKeyboardHidden()

KeyboardHidden getKeyboardHidden ( ) const

Get the "hidden" stat eof the keyboard.

◆ getKeyboardType()

KeyboardType getKeyboardType ( ) const

Get the keyboard type.

◆ getLanguage()

String getLanguage ( ) const

Get the two-character language code.

◆ getLayoutDirection()

LayoutDirection getLayoutDirection ( ) const

Get the layout direction.

◆ getMCC()

int32_t getMCC ( ) const

Get the ISMI MCC (Mobile Country Code).

◆ getMNC()

int32_t getMNC ( ) const

Get the IMSI MNC (Mobile Network Code).

◆ getNavigationHidden()

NavigationHidden getNavigationHidden ( ) const

Get the "hidden" state of the navigation controls.

◆ getNavigationType()

NavigationType getNavigationType ( ) const

Get the navigation controls type.

◆ getNightMode()

NightMode getNightMode ( ) const

Get the night mode.

◆ getScreenAspect()

ScreenAspect getScreenAspect ( ) const

Get the screen aspect ratio category.

◆ getScreenDensity()

ScreenDensity getScreenDensity ( ) const

Get the screen density category.

◆ getScreenHeightDP()

int getScreenHeightDP ( ) const

Get the screen height, in dp units.

Returns 0 if not set.

◆ getScreenOrientation()

ScreenOrient getScreenOrientation ( ) const

Get the screen orientation.

◆ getScreenSize()

ScreenSize getScreenSize ( ) const

Get the screen size category.

◆ getScreenType()

ScreenType getScreenType ( ) const

Get the touchscreen type.

◆ getScreenWidthDP()

int getScreenWidthDP ( ) const

Get the screen width, in dp units.

Returns 0 if not set.

◆ getSDKVersion()

SDKVersion getSDKVersion ( ) const

Get the Android SDK version.

◆ getSmallestScreenWidthDP()

int getSmallestScreenWidthDP ( ) const

Get the smallest screen width, in dp units.

Returns 0 if not set.

◆ getUIMode()

UIMode getUIMode ( ) const

Get the dock mode.

◆ isBetterThan()

bool isBetterThan ( const DeviceConfiguration other) const

Determine if this device configuration is better than another.

◆ isValidFor()

bool isValidFor ( const DeviceConfiguration other) const

Determine if this device configuration satisfies the requirements specified by another.

◆ operator=()

DeviceConfiguration & operator= ( const DeviceConfiguration other)

Assignment operator.

◆ setCountry()

void setCountry ( const ccxx::String &  country)

Set the two-character country code.

◆ setKeyboardHidden()

void setKeyboardHidden ( KeyboardHidden  value)

Set the "hidden" stat eof the keyboard.

◆ setKeyboardType()

void setKeyboardType ( KeyboardType  value)

Set the keyboard type.

◆ setLanguage()

void setLanguage ( const ccxx::String &  language)

Set the two-character language code.

◆ setLayoutDirection()

void setLayoutDirection ( LayoutDirection  value)

Set the layout direction.

◆ setMCC()

void setMCC ( int32_t  value)

Set the ISMI MCC (Mobile Country Code).

◆ setMNC()

void setMNC ( int32_t  value)

Set the IMSI MNC (Mobile Network Code).

◆ setNavigationHidden()

void setNavigationHidden ( NavigationHidden  value)

Set the "hidden" state of the navigation controls.

◆ setNavigationType()

void setNavigationType ( NavigationType  value)

Set the navigation controls type.

◆ setNightMode()

void setNightMode ( NightMode  value)

Set the night mode.

◆ setScreenAspect()

void setScreenAspect ( ScreenAspect  value)

Set the screen aspect ratio category.

◆ setScreenDensity()

void setScreenDensity ( ScreenDensity  value)

Set the screen density category.

◆ setScreenHeightDP()

void setScreenHeightDP ( int  dp)

Set the screen height, in dp units.

◆ setScreenOrientation()

void setScreenOrientation ( ScreenOrient  value)

Set the screen orientation.

◆ setScreenSize()

void setScreenSize ( ScreenSize  value)

Set the screen size category.

◆ setScreenType()

void setScreenType ( ScreenType  value)

Set the touchscreen type.

◆ setScreenWidthDP()

void setScreenWidthDP ( int  dp)

Set the screen width, in dp units.

◆ setSDKVersion()

void setSDKVersion ( SDKVersion  value)

Set the Android SDK version.

◆ setSmallestScreenWidthDP()

void setSmallestScreenWidthDP ( int  dp)

Set the smallest screen width, in dp units.

◆ setUIMode()

void setUIMode ( UIMode  value)

Set the dock mode.


The documentation for this class was generated from the following files: