sysutil.h File Reference

KSysUtilVersionTextLength

const TIntKSysUtilVersionTextLength

Constant conveying the size of the preallocated descriptor buffers used with the SysUtil version APIs.

See also: SysUtil::GetSWVersion SysUtil::GetLangSWVersion SysUtil::GetLangVersion

NONSHARABLE_CLASS ( CDeviceTypeInformation )

NONSHARABLE_CLASS(CDeviceTypeInformation)

This class is used to hold the device type information attributes and provides member functions to return the attribute values. These values are strings of UTF-16 characters and no format must be assumed or implied as it varies from one device manufacturer to the next. Please note that this information does not identify a unique device but identifies the type of device.

An instance of this class cannot be created by user code. If device type information attributes are required then the user should use SysUtil::GetDeviceTypeInfoL which will return a pointer to an instance of this class. This instance will contain a full set of device type information attributes that have been provisioned by the device creator. For details of how these are provisioned see 'XXX xxx' document in the OS Developer Library.

For standard device type information attributes (attributes which are common to all device creators) named functions have been provided. These functions also offer the advantage of a default value being provided when an attribute has not been provisioned by the device creator. If a default value has been retrieved KDefaultValue will be returned.

Callers who do not care about whether a default value is retrieved or not can use the API as follows:

	TPtrC16 modelNamePtrC;
	User::LeaveIfError( deviceTypeInfo->GetModelName(modelNamePtrC) );

Where callers wish to avoid the default value it can be tested for as follows:

	TPtrC16 modelNamePtrC;
	if (User::LeaveIfError( deviceTypeInfo->GetModelName(modelNamePtrC)) == CDeviceTypeInformation::KDefaultValue)
		{
		// We have a default attribute value, do something else
		...
		}
	else
		{
		// We have a device creator supplied attribute value.
		...
		}

In addition to named functions, two additional generic functions are provided that can be used to retrieve any additional device type information attributes which may be provided by a device creator. These functions can also be used to retrieve the standard attributes; however, it is recommended that the named functions be used instead.

Any code which owns an instance of this class has the responsibility of destroying it. This may be achieved by calling delete on the pointer or using the CleanupStack.