TCheckedUid Class Reference

#include <e32std.h>

class TCheckedUid
Public Member Functions
TCheckedUid()
TCheckedUid(const TUidType &)
TCheckedUid(const TDesC8 &)
IMPORT_C TPtrC8Des()
IMPORT_C voidSet(const TUidType &)
IMPORT_C voidSet(const TDesC8 &)
const TUidType &UidType()
Protected Member Functions
IMPORT_C TUintCheck()

Detailed Description

Packages a Uid type together with a checksum.

See also: TUidType

Constructor & Destructor Documentation

TCheckedUid ( )

IMPORT_CTCheckedUid()

Default constructor.

Initialises the object to binary zeroes.

TCheckedUid ( const TUidType & )

IMPORT_CTCheckedUid(const TUidType &aUidType)

Constructor taking an existing Uid type.

The constructor calculates a checksum.

Parameters
aUidTypeThe Uid type to be packaged.

TCheckedUid ( const TDesC8 & )

IMPORT_CTCheckedUid(const TDesC8 &aPtr)

Constructor taking an existing TCheckedUid object encapsulated within a descriptor.

The checksum is recalculated and must match the checksum value passed in the encapsulated TCheckedUid object, otherwise the content of this object is reset to binary zeroes.

Parameters
aPtrA pointer to a descriptor containing an existing TCheckedUid object.
Panic Codes
USER38 If the length of the descriptor is not the same as the size of a

Member Function Documentation

Check ( )

IMPORT_C TUintCheck()const [protected]

Calculates the checksum of the UIDs.

Return Value
The checksum.

Des ( )

IMPORT_C TPtrC8Des()const

Gets a pointer descriptor to represent this object's data.

Return Value
The pointer descriptor for this object's data. The descriptor's length is the same as the length of a TCheckedUid object.

Set ( const TUidType & )

IMPORT_C voidSet(const TUidType &aUidType)

Sets the specified Uid type to be packaged, and recalculates the checksum.

Parameters
aUidTypeThe Uid type to be packaged.

Set ( const TDesC8 & )

IMPORT_C voidSet(const TDesC8 &aPtr)

Sets an existing TCheckedUid object encapsulated within a descriptor.

The checksum is recalculated and must match the checksum value passed in the encapsulated TCheckedUid object, otherwise the content of this object is reset to binary zeroes.

Parameters
aPtrA pointer to a descriptor containing an existing TCheckedUid object.
Panic Codes
USER38 If the length of the descriptor is not the same as the size of a

UidType ( )

const TUidType &UidType()const [inline]

Gets the Uid type contained in this object.

Return Value
The Uid type.