PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXDevice
Class which makes the AEEDeviceInfo structure easy to use.
#include <SFXDevice.h.hpp>
class SFXDevice;
SFMTYPEDEFCLASS(SFXDevice)

Description

Device information can be obtained with ease using the SFXDevice instance without the need to inquire the IShell Interface.

SFXDevice device;

UInt16 n1 = device.GetScreenWidth();            // get screen width in pixels
UInt16 n2 = device.GetScreenHeight();           // get screen height in pixels
SFXSize size1 = device.GetScreenSize();         // get screen width and height in pixels
UInt16 n3 = device.GetAlternateScreenWidth();   // get width of second screen in pixels
UInt16 n4 = device.GetAlternateScreenHeight();  // get height of second screen in pixels
SFXSize size2 = device.GetAlternateScreenSize();// get width and height of second screen in pixels
UInt16 n5 = device.GetScrollBarWidth();         // get width of standard scroll bar in pixels
UInt16 n6 = device.GetEncoding();               // get encoding method of character set
UInt16 n7 = device.GetMenuTextScrollingTime();  // get value of wMenuTextScroll member of AEEDeviceInfo structure
UInt16 n8 = device.GetColorDepth();             // get depth of screen color
UInt16 n9 = device.GetMenuImageDelay();         // get value of wMenuImageDelay member of AEEDeviceInfo structure
UInt16 n10 = device.GetRAMSize();               // get capacity of RAM 
Bool b1 = device.HasAlternateDisplay();         // check whether device has an alternative display(pager) or not
Bool b2 = device.HasFlip();                     // check whether mobile phone is flip type or not
Bool b3 = device.HasVibrator();                 // check whether vibrator is available or not
Bool b4 = device.HasExternalSpeaker();          // check whether an external speaker is available or not
Bool b5 = device.SupportsVoiceRecognition();    // check whether voice recognition is supported or not
Bool b6 = device.SupportsPositionLocation();    // check whether position location is supported or not
Bool b7 = device.SupportsMIDI();                // check whether MIDI file format is supported or not
Bool b8 = device.SupportsCMX();                 // check whether CMX audio is supported or not
Bool b9 = device.SupportsPen();                 // check whether pen device is supported or not
UInt16 n11 = device.GetPromptProperties();      // get properties of default prompt
UInt16 n12 = device.GetCloseAppKey();           // get key that closes the current application
UInt16 n13 = device.GetCloseAllAppsKey();       // get key that closes all applications
UInt16 n14 = device.GetLanguage();              // get language ID defined by ISO
UInt16 n15 = device.GetNetLingerTime();         // get PPP standby time in milliseconds
UInt16 n16 = device.GetSleepDeferTime();        // get time in milliseconds when device enters sleep mode
UInt16 n17 = device.GetMaximumPathLength();     // get maximum length of file name(including path name) supported by device
UInt16 n18 = device.GetPlatformID();            // get ID that uniquely identifies device platform

Reference

BREW API AEEDevice | SFBShell::GetDeviceInfo | SFBShell::GetDeviceInfoEx

Member

Constructor/Destructor
SFXDevice( Void )
Constructor of the SFXDevice class.
Public Functions
UInt16 GetAlternateScreenHeight( Void )
Get the height of the second screen in pixels.
SFXSize GetAlternateScreenSize( Void )
Get the width and height of the second screen in pixels.
UInt16 GetAlternateScreenWidth( Void )
Get the width of the second screen in pixels.
UInt16 GetCloseAllAppsKey( Void )
Get the key that closes all applications.
UInt16 GetCloseAppKey( Void )
Get the key that closes the current application.
UInt16 GetColorDepth( Void )
Get the depth of screen color.
UInt16 GetEncoding( Void )
Get the encoding method of character set.
UInt32 GetLanguage( Void )
Get the language ID defined by ISO.
UInt16 GetMaximumPathLength( Void )
Get the maximum length of file name including path name supported by the device.
UInt32 GetMenuImageDelay( Void )
Get the value of wMenuImageDelay member variable of the AEEDeviceInfo structure.
UInt16 GetMenuTextScrollingTime( Void )
Get the value of wMenuTextScroll member variable of the AEEDeviceInfo structure.
UInt32 GetNetLingerTime( Void )
Get the PPP standby time in milliseconds.
UInt32 GetPlatformID( Void )
Get the ID that uniquely identifies the device platform.
UInt32 GetPromptProperties( Void )
Get the properties of default prompt.
UInt32 GetRAMSize( Void )
Get the capacity of RAM.
UInt16 GetScreenHeight( Void )
Get the screen height in pixels.
SFXSize GetScreenSize( Void )
Get the screen width and height in pixels.
UInt16 GetScreenWidth( Void )
Get the screen width in pixels.
UInt16 GetScrollBarWidth( Void )
Get the width of standard scroll bar in pixels.
UInt32 GetSleepDeferTime( Void )
Get the time the device enters sleep mode in milliseconds.
Bool HasAlternateDisplay( Void )
Check whether the device has an alternative display(pager) or not.
Bool HasExternalSpeaker( Void )
Check whether an external speaker is available or not.
Bool HasFlip( Void )
Check whether the mobile phone is of the flip type or not.
Bool HasVibrator( Void )
Check whether the vibrator is is available or not.
Bool SupportsCMX( Void )
Check whether the CMX audio is supported or not.
Bool SupportsMIDI( Void )
Check whether the MIDI file format is supported or not.
Bool SupportsPen( Void )
Check whether the pen device is supported or not.
Bool SupportsPositionLocation( Void )
Check whether the position location is supported or not.
Bool SupportsVoiceRecognition( Void )
Check whether the voice recognition is supported or not.
static
SFXDeviceConstRef
ZeroInstance( Void )
Get the instance that represents 0.

SFXDevice::SFXDevice
Constructor of the SFXDevice class.
[ public, explicit ]
SFXDevice(Void);

Description

Create the SFXDevice instance for obtaining the device information from the BREW shell. Inside this constructor, get the device information after creating the instance of the BREW shell.

Example

Get the screen size of the device.

SFXDevice devinfo;
SFXSize devSize = devinfo.GetScreenSize();

SFXDevice::GetAlternateScreenHeight
Get the height of the second screen in pixels.
[ public, const ]
UInt16 GetAlternateScreenHeight(Void);

Reference

SFXDevice::GetAlternateScreenWidth


SFXDevice::GetAlternateScreenSize
Get the width and height of the second screen in pixels.
[ public, const ]
SFXSize GetAlternateScreenSize(Void);

Reference

SFXDevice::GetAlternateScreenWidth | SFXDevice::GetAlternateScreenHeight


SFXDevice::GetAlternateScreenWidth
Get the width of the second screen in pixels.
[ public, const ]
UInt16 GetAlternateScreenWidth(Void);

Reference

SFXDevice::GetAlternateScreenHeight


SFXDevice::GetCloseAllAppsKey
Get the key that closes all applications.
[ public, const ]
UInt16 GetCloseAllAppsKey(Void);

Description

Default key is AVK_END.

Reference

SFXDevice::GetCloseAppKey


SFXDevice::GetCloseAppKey
Get the key that closes the current application.
[ public, const ]
UInt16 GetCloseAppKey(Void);

Reference

SFXDevice::GetCloseAllAppsKey


SFXDevice::GetColorDepth
Get the depth of screen color.
[ public, const ]
UInt16 GetColorDepth(Void);

Return value

For example, return 1 if it is monochrome, 2 if it is grayscale, 8 if is 256 colors.


SFXDevice::GetEncoding
Get the encoding method of character set.
[ public, const ]
UInt16 GetEncoding(Void);

Return value

Return value can be one of the follows.

AEE_ENC_UNICODE
AEE_ENC_UNICODE2
AEE_ENC_KSC5601
AEE_ENC_EUC_KR
AEE_ENC_KSC5601
AEE_ENC_S_JIS
AEE_ENC_EUC_CN
OEM_RAW_TEXT
AEE_ENC_UTF8
AEE_ENC_ISOLATIN1

The above values are defined in the AEEShell.h file of the BREW SDK.


SFXDevice::GetLanguage
Get the language ID defined by ISO.
[ public, const ]
UInt32 GetLanguage(Void);

SFXDevice::GetMaximumPathLength
Get the maximum length of file name including path name supported by the device.
[ public, const ]
UInt16 GetMaximumPathLength(Void);

SFXDevice::GetMenuImageDelay
Get the value of wMenuImageDelay member variable of the AEEDeviceInfo structure.
[ public, const ]
UInt32 GetMenuImageDelay(Void);

SFXDevice::GetMenuTextScrollingTime
Get the value of wMenuTextScroll member variable of the AEEDeviceInfo structure.
[ public, const ]
UInt16 GetMenuTextScrollingTime(Void);

SFXDevice::GetNetLingerTime
Get the PPP standby time in milliseconds.
[ public, const ]
UInt32 GetNetLingerTime(Void);

SFXDevice::GetPlatformID
Get the ID that uniquely identifies the device platform.
[ public, const ]
UInt32 GetPlatformID(Void);

SFXDevice::GetPromptProperties
Get the properties of default prompt.
[ public, const ]
UInt32 GetPromptProperties(Void);

SFXDevice::GetRAMSize
Get the capacity of RAM.
[ public, const ]
UInt32 GetRAMSize(Void);

SFXDevice::GetScreenHeight
Get the screen height in pixels.
[ public, const ]
UInt16 GetScreenHeight(Void);

Reference

SFXDevice::GetScreenWidth


SFXDevice::GetScreenSize
Get the screen width and height in pixels.
[ public, const ]
SFXSize GetScreenSize(Void);

Reference

SFXDevice::GetScreenWidth | SFXDevice::GetScreenHeight


SFXDevice::GetScreenWidth
Get the screen width in pixels.
[ public, const ]
UInt16 GetScreenWidth(Void);

Reference

SFXDevice::GetScreenHeight


SFXDevice::GetScrollBarWidth
Get the width of standard scroll bar in pixels.
[ public, const ]
UInt16 GetScrollBarWidth(Void);

SFXDevice::GetSleepDeferTime
Get the time the device enters sleep mode in milliseconds.
[ public, const ]
UInt32 GetSleepDeferTime(Void);

SFXDevice::HasAlternateDisplay
Check whether the device has an alternative display(pager) or not.
[ public, const ]
Bool HasAlternateDisplay(Void);

SFXDevice::HasExternalSpeaker
Check whether an external speaker is available or not.
[ public, const ]
Bool HasExternalSpeaker(Void);

SFXDevice::HasFlip
Check whether the mobile phone is of the flip type or not.
[ public, const ]
Bool HasFlip(Void);

SFXDevice::HasVibrator
Check whether the vibrator is is available or not.
[ public, const ]
Bool HasVibrator(Void);

SFXDevice::SupportsCMX
Check whether the CMX audio is supported or not.
[ public, const ]
Bool SupportsCMX(Void);

SFXDevice::SupportsMIDI
Check whether the MIDI file format is supported or not.
[ public, const ]
Bool SupportsMIDI(Void);

SFXDevice::SupportsPen
Check whether the pen device is supported or not.
[ public, const ]
Bool upportsPen(Void);

SFXDevice::SupportsPositionLocation
Check whether the position location is supported or not.
[ public, const ]
Bool SupportsPositionLocation(Void);

SFXDevice::SupportsVoiceRecognition
Check whether the voice recognition is supported or not.
[ public, const ]
Bool SupportsVoiceRecognition(Void);

SFXDevice::ZeroInstance
Get the instance that represents 0.
[ public, static ]
SFXDeviceConstRef ZeroInstance(Void);

Description

Return the instance where 0 is set to the AEEDeviceInfo managed inside this class.