ContactGuid Class Reference

#include <app/cntitem.h>

Link against: cntmodel.lib

class ContactGuid

Detailed Description

A globally unique identifier enquiry utility.

Each contact item has a unique identifier, stored as a descriptor. It is referred to as the 'UID string'. This is a combination of the unique identifier of the database in which the contact item was created, the contact item ID and the date/time of the contact item's creation. ContactGuid provides a single static exported function to enquire whether an item was created in a specified database.

Member Function Documentation

CreateGuidLC ( const TDesC &, TContactItemId, TInt64 )

HBufC *CreateGuidLC(const TDesC &aCreationDate,
TContactItemIdaId,
TInt64aMachineUniqueId
)[static]

CreateGuidLC ( const TTime &, TContactItemId, TInt64 )

HBufC *CreateGuidLC(const TTime &aCreationDate,
TContactItemIdaId,
TInt64aMachineUniqueId
)[static]

CreateGuidLC ( TContactItemId, TInt64 )

HBufC *CreateGuidLC(TContactItemIdaId,
TInt64aMachineUniqueId
)[static]

GetCreationDate ( TDes &, TInt64 )

IMPORT_C TBoolGetCreationDate(TDes &aString,
TInt64aMachineUniqueId
)[static]

IsLocalContactUidString ( const TDesC &, TInt64 )

IMPORT_C TContactItemIdIsLocalContactUidString(const TDesC &aString,
TInt64aMachineUniqueId
)[static]

Tests whether a contact item was created in the database with the unique ID specified. If so, the item's contact item ID is returned. If not, returns KErrNotFound.

ParameterDescription
aStringThe contact item's UID string. Use CContactItem::UidStringL() to get a pointer to the item's UID string.
aMachineUniqueIdThe database's unique ID. This can be found by calling CContactDatabase::MachineId().

Returns: KErrNotFound if the database ID specified is not found in the UID string. Otherwise, the contact item's contact item ID.