HardwareInfo
#include <bb/device/HardwareInfo>
To link against this class, add the following line to your .pro file: LIBS += -lbbdevice
Provides access to information about the device hardware.
The HardwareInfo class provides access to information about the configuration, availability, or general values about the device hardware. Many of the methods are protected by permissions because they can be used to uniquely identify a device. Be sure to check the description of individual methods before using them, and ensure that the required permissions have been requested.
BlackBerry 10.0.0
Properties Index
| QString | pin [read-only] |
| QString | serialNumber [read-only] |
| QString | imei [read-only] |
| QString | meid [read-only] |
| QString | hardwareId [read-only] |
| QString | deviceName [read-only] |
| QString | modelName [read-only] |
| QString | modelNumber [read-only] |
| bool | isPhysicalKeyboardDevice [read-only] |
| bb::device::HdmiConnector::Type | hdmiConnector [read-only] |
Public Functions Index
| HardwareInfo (QObject *parent=0) | |
| virtual | ~HardwareInfo () |
| QString | pin () const |
| QString | serialNumber () const |
| QString | imei () const |
| QString | meid () const |
| QString | hardwareId () const |
| QString | deviceName () const |
| int | processorCount () const |
| PRIVATE int | processorSpeed (int cpuNumber) const |
| PRIVATE QString | processorModel (int cpuNumber) const |
| PRIVATE QString | modelName () const |
| QString | modelNumber () const |
| bool | isPhysicalKeyboardDevice () const |
| bb::device::HdmiConnector::Type | hdmiConnector () const |
Properties
bool
Indicates if the device is a physical keyboard device or not.
BlackBerry 10.0.0
bb::device::HdmiConnector::Type
Indicates what kind of HDMI connector the device has, if any.
BlackBerry 10.1.0
Public Functions
Constructs a HardwareInfo object.
Constructs a HardwareInfo object that can be used to retrieve information about the device.
| Parameters | |
|---|---|
| parent |
If not 0, the supplied parent is responsible for deleting this instance. |
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
QString
Retrieves the device PIN.
This function lets you retrieve the PIN of the BlackBerry device, which is a unique identifier for the device.
"0x08A34C0A"
"0x31C45EF8"
"0x89912341"
The application must have the read_device_identifying_information permission to access the device PIN.
Returns the PIN of the device, or an empty string if the calling function does not have sufficient permission to read the PIN value.
BlackBerry 10.0.0
QString
Retrieves the device serial number.
This function retrieves the serial number of the device as a QString. When displayed as a string it typically takes the form of a 22 digit base 10 number.
"0000000000134300329165"
"0000000000134300213459"
"0000000000134300118234"
The application must have the read_device_identifying_information permission to access the serial number.
Returns the serial number of the device, or an empty string if the calling function does not have sufficient permission.
BlackBerry 10.0.0
QString
Retrieves the international mobile equipment identity (IMEI) of the device.
The IMEI uniquely identifies a device that connects to a GSM cellular network. The IMEI is composed of 14 decimal digits, plus a check digit. For more information about the structure of the IMEI, see 3GPP TS 23.003.
The application must have the read_device_identifying_information permission to access the deivce's IMEI.
Returns the IMEI of the device encoded as a string, an empty string in the case where either the calling function does not have sufficient permission to read the IMEI, or if the device has no IMEI.
BlackBerry 10.0.0
QString
Retrieves the mobile equipment identifier (MEID) of the device.
The MEID uniquely identifies a device that connects to a CDMA cellular network. The MEID is composed of 14 hexadecimal digits. For more information about the structure of the MEID, see 3GPP2 report S.R0048.
The application must have the read_device_identifying_information permission to access the device's MEID.
The MEID of the device encoded as a string, or an empty string in the case where either the calling function does not have sufficient permission to read the MEID, or if the device has no MEID.
BlackBerry 10.0.0
QString
Retrieves the hardware identifier of the device.
The hardware identifier provides a value that is identical across all devices of similar configuration.
"0x04002607".
All devices with this identifier will have the same characteristics, such as radio, screen size, processor, etc.
The hardware identifier of the device encoded as a string.
BlackBerry 10.0.0
QString
Retrieves the 'name' identifier attached to the device model.
The device name provides a value that helps to identify the device.
The name of the device encoded as a string.
BlackBerry 10.0.0
int
Returns the number of processors on the device.
The number of processors on the device, or 0 on error.
BlackBerry 10.0.0
PRIVATE int
Returns the CPU clock speed of the processor at the supplied index, in MHz.
| Parameters | |
|---|---|
| cpuNumber |
The index of the CPU for which the clock speed is requested. Valid indices are greater than or equal to 0 and less than the number of available processors (as given by HardwareInfo::processorCount()). |
The clock speed of the processor at the provided index, or 0 on error.
BlackBerry 10.0.0
PRIVATE QString
Returns the CPU model of the processor at the supplied index.
| Parameters | |
|---|---|
| cpuNumber |
The index of the CPU for the model requested. Valid indices are greater than or equal to 0 and less than the number of available processors (as given by HardwareInfo::processorCount()). |
Returns the model of the processor at the index provided, and an empty string otherwise.
BlackBerry 10.0.0
PRIVATE QString
Returns the model name of the device.
The application must have the access_device_model_name permission to access the model name of the device.
Returns the model name of the device, or an empty string otherwise.
BlackBerry 10.0.0
QString
Returns the model number of the device.
The application must have the access_device_model_name permission to access the model number of the device.
Returns the model number of the device, or an empty string otherwise.
BlackBerry 10.0.0
bool
Returns whether or not a physical keyboard is present on the device.
Returns true if the device has a physical keyboard, and false otherwise.
BlackBerry 10.0.0
bb::device::HdmiConnector::Type
Indicates whether the device possesses an HDMI connector, and if so what type.
Returns one of bb::device::HdmiConnector::Type.
BlackBerry 10.1.0