Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <CNTITEM.H>
Link against: cntmodel.lib

Class CContactOwnCard

class CContactOwnCard : public CContactItemPlusGroup;

Description

Own card.

An own card is a contact card which contains information about the device's owner. This can be sent to another compatible electronic device as a vCard. The contact database recognises a single own card, referred to as the current own card; its ID is returned by CContactDatabase::OwnCardId(). Like a contact card, an own card can be a member of one or more contact card groups. The own card type is identified by a UID of KUidContactOwnCard.

Own cards can be constructed using either CContactDatabase::CreateOwnCardLC() or CreateOwnCardL(). These functions create an own card, based on the system template, add it to the database, set it as the database's current own card and return a pointer to it. To change the database's current own card, use CContactDatabase::SetOwnCardL().

Derivation

Members

Defined in CContactOwnCard:

Inherited from CBase:

Inherited from CContactItem:

Inherited from CContactItemPlusGroup:


Construction and destruction


~CContactOwnCard()

IMPORT_C ~CContactOwnCard();

Description

Frees all resources owned by the own card, prior to its destruction.


NewL()

static IMPORT_C CContactOwnCard *NewL();

Description

Allocates and constructs a new own card.

Note: own cards should normally be constructed using the factory functions provided in class CContactDatabase, for example CreateOwnCardL().

Return value

CContactOwnCard *

Pointer to the newly created own card.


NewLC()

static IMPORT_C CContactOwnCard *NewLC();

Description

Allocates and constructs a new own card.

Note: own cards should normally be constructed using the factory functions provided in class CContactDatabase, for example CreateOwnCardL().

Return value

CContactOwnCard *

Pointer to the newly created own card. This is left on the cleanup stack.


NewL()

static IMPORT_C CContactOwnCard *NewL(const CContactItem *aTemplate);

Description

Allocates and constructs a new own card whose field set is seeded from a template.

Note: own cards should normally be constructed using the factory functions provided in class CContactDatabase, for example CreateOwnCardL().

Parameters

const CContactItem *aTemplate

Pointer to the template whose field set and field data are copied into the new own card.

Return value

CContactOwnCard *

Pointer to the newly created own card.


NewLC()

static IMPORT_C CContactOwnCard *NewLC(const CContactItem *aTemplate);

Description

Allocates and constructs a new own card whose field set is seeded from a template.

Note: own cards should normally be constructed using the factory functions provided in class CContactDatabase, for example CreateOwnCardL().

Parameters

const CContactItem *aTemplate

Pointer to the template whose field set and field data are copied into the new own card.

Return value

CContactOwnCard *

Pointer to the newly created own card. This is left on the cleanup stack.

[Top]


Member functions


Type()

virtual IMPORT_C TUid Type() const;

Description

Implements CContactItem::Type().

Return value

TUid

KUidContactOwnCard.


GroupsJoinedLC()

IMPORT_C CContactIdArray *GroupsJoinedLC() const;

Description

Returns a pointer to a list of contact item IDs which identify the groups to which the current own card belongs.

Return value

CContactIdArray *

A pointer to a copy of the array of groups IDs to which this own card belongs. This array is empty if the own card is not a member of any groups. The caller takes ownership of this object, so is responsible for its deletion.