#include <apmstd.h>
class TDataType |
Public Member Functions | |
---|---|
TDataType() | |
TDataType(const TDataType &) | |
TDataType(const TDesC8 &) | |
TDataType(TUid) | |
IMPORT_C TBuf< KMaxDataTypeLength > | Des() |
IMPORT_C TPtrC8 | Des8() |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C TBool | IsNative() |
IMPORT_C TUid | Uid() |
IMPORT_C TInt | operator!=(const TDataType &) |
IMPORT_C TInt | operator==(const TDataType &) |
A data type.
The class maintains a string that describes the data type and an associated UID.
A data type is also referred to as a MIME type.
IMPORT_C | TDataType | ( | ) |
Default constructor.
Sets an empty data type string and sets the associated UID to KNullUid.
IMPORT_C | TDataType | ( | const TDataType & | aDataType | ) |
Copy constructor.
Parameter | Description |
---|---|
aDataType | The data type to be copied. |
IMPORT_C | TDataType | ( | const TDesC8 & | aDataType | ) |
Constructor taking a descriptor.
The data type string is copied from the specified descriptor. By default, the associated UID is set to KNullUid.
If the data type string begins with the characters "x-epoc/x-app", identifying data as a native Symbian type, then the associated UID is set to the UID value which is expected to follow the characters "x-epoc/x-app".
If no sensible UID can be extracted from the characters following: "x-epoc/x-app", then the associated UID is set to KNullUid.
Parameter | Description |
---|---|
aDataType | The source for the data type string. Note that this is an 8 bit descriptor. |
IMPORT_C | TDataType | ( | TUid | aUid | ) |
Constructor taking a UID.
The data type string is set to "x-epoc/x-app" concatenated with the decimal character representation of the specified UID value. The data type is assumed to identify data as a native Symbian type.
Parameter | Description |
---|---|
aUid | The associated UID. |
IMPORT_C TBuf< KMaxDataTypeLength > | Des | ( | ) | const |
Gets a copy of the data type string.
Returns: A modifiable buffer descriptor containing a copy of the data type string. Note that this descriptor is a build independent type.
IMPORT_C TPtrC8 | Des8 | ( | ) | const |
Gets an 8 bit non-modifiable pointer descriptor to the data type string.
Returns: A pointer descriptor to the data type string.
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aWriteStream | ) | const |
Externalizes the data type to a stream.
The presence of this function means that the standard templated stream operator<<() is available to externalise objects of this class.
Parameter | Description |
---|---|
aWriteStream | The write stream. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aReadStream | ) |
Internalizes the data type from a stream.
The presence of this function means that the standard templated stream operator>>() is available to internalize objects of this class.
Parameter | Description |
---|---|
aReadStream | The read stream. |
IMPORT_C TBool | IsNative | ( | ) | const |
Tests whether the data type is a native Symbian type.
Returns: True, if the data type is a native Symbian type; false, otherwise.
Compares this data type for inequality with the specified data type.
Two data types are only equal if their data type strings are the same. Text is folded for the purpose of the comparison, removing accents and converting letters to a common case form.
Parameter | Description |
---|---|
aDataType | The data type taking part in the comparison. |
Returns: True, if the data types are not equal; false, otherwise.
Compares this data type for equality with the specified data type.
Two data types are equal if their data type strings are the same. Text is folded for the purpose of the comparison, removing accents and converting letters to a common case form.
Parameter | Description |
---|---|
aDataType | The data type taking part in the comparison. |
Returns: True, if the data types are equal; false, otherwise.