CVPbkContactLinkArray Class Reference

class CVPbkContactLinkArray : public CBase

A read-only array of contact links. VPbkEng.lib

Inherits from

Public Member Functions
~CVPbkContactLinkArray ()
IMPORT_C void AppendL ( MVPbkContactLink *)
const MVPbkContactLink & At ( TInt )
TInt Count ()
IMPORT_C void Delete ( TInt )
TInt Find (const MVPbkContactLink &)
IMPORT_C void InsertL ( MVPbkContactLink *, TInt )
IMPORT_C CVPbkContactLinkArray * NewL ()
IMPORT_C CVPbkContactLinkArray * NewLC ()
IMPORT_C CVPbkContactLinkArray * NewLC (const TDesC8 &, const MVPbkContactStoreList &)
IMPORT_C CVPbkContactLinkArray * NewLC ( RReadStream &, const MVPbkContactStoreList &)
CVPbkContactLinkArray * NewLC ( RReadStream &, MVPbkContactStoreLoader &)
HBufC8 * PackLC ()
IMPORT_C TInt PackedBufferSize ()
IMPORT_C void Remove ( TInt )
IMPORT_C void Reset ()
IMPORT_C void ResetAndDestroy ()
const MVPbkStreamable * Streamable ()
Private Member Functions
CVPbkContactLinkArray ()
void ConstructL ()
void ConstructL (const TDesC8 &, const MVPbkContactStoreList &)
void ConstructL ( RReadStream &, const MVPbkContactStoreList &)
TInt DoCalculatePackedBufferSizeV2 ()
void DoFillPackedBufferV2L ( RWriteStream &)
void DoInternalizeFromBufferL ( RReadStream &, const MVPbkContactStoreList &)
void DoInternalizeFromBufferV2L ( RReadStream &, const MVPbkContactStoreList &)
void InternalizeFromBufferL ( RReadStream &, const MVPbkContactStoreList &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
RPointerArray < MVPbkContactLink > iLinks
MVPbkContactStoreLoader * iStoreLoader
CStoreUris * iStoreUris

Constructor & Destructor Documentation

CVPbkContactLinkArray()

CVPbkContactLinkArray ( ) [private, inline]

~CVPbkContactLinkArray()

~CVPbkContactLinkArray ( )

Destructor.

Member Functions Documentation

AppendL(MVPbkContactLink *)

IMPORT_C void AppendL ( MVPbkContactLink * aLink )

Appends a link to this array.

Pre-condition
aLink != NULL
Post-condition
Array count is increased by one and the link is in the last element of the array.

Parameters

MVPbkContactLink * aLink the link object to append. This array takes ownership of the link if append is succesful.

At(TInt)

const MVPbkContactLink & At ( TInt aIndex ) const

Parameters

TInt aIndex

ConstructL()

void ConstructL ( ) [private, inline]

ConstructL(const TDesC8 &, const MVPbkContactStoreList &)

void ConstructL ( const TDesC8 & aPackedLinks,
const MVPbkContactStoreList & aOperations
) [private, inline]

Parameters

const TDesC8 & aPackedLinks
const MVPbkContactStoreList & aOperations

ConstructL(RReadStream &, const MVPbkContactStoreList &)

void ConstructL ( RReadStream & aStream,
const MVPbkContactStoreList & aOperations
) [private, inline]

Parameters

RReadStream & aStream
const MVPbkContactStoreList & aOperations

Count()

TInt Count ( ) const

Delete(TInt)

IMPORT_C void Delete ( TInt aIndex )

Removes and deletes a link at aIndex from this array.

Pre-condition
aIndex >= 0 && aIndex <= Count()
Post-condition
The array count is decreased by one.

Parameters

TInt aIndex

DoCalculatePackedBufferSizeV2()

TInt DoCalculatePackedBufferSizeV2 ( ) const [private]

DoFillPackedBufferV2L(RWriteStream &)

void DoFillPackedBufferV2L ( RWriteStream & aWriteStream ) const [private]

Parameters

RWriteStream & aWriteStream

DoInternalizeFromBufferL(RReadStream &, const MVPbkContactStoreList &)

void DoInternalizeFromBufferL ( RReadStream & aReadStream,
const MVPbkContactStoreList & aStoreList
) [private]

Parameters

RReadStream & aReadStream
const MVPbkContactStoreList & aStoreList

DoInternalizeFromBufferV2L(RReadStream &, const MVPbkContactStoreList &)

void DoInternalizeFromBufferV2L ( RReadStream & aReadStream,
const MVPbkContactStoreList & aStoreList
) [private]

Parameters

RReadStream & aReadStream
const MVPbkContactStoreList & aStoreList

Find(const MVPbkContactLink &)

TInt Find ( const MVPbkContactLink & aLink ) const

Parameters

const MVPbkContactLink & aLink

InsertL(MVPbkContactLink *, TInt)

IMPORT_C void InsertL ( MVPbkContactLink * aLink,
TInt aIndex
)

Inserts a link to this array.

Exceptions
KErrNoMemory

if out of memory.

Pre-condition
aLink != NULL
aIndex >= 0 && aIndex <= Count()
Post-condition
Array count is increased by one and the link is in the position marked by the aIndex element of the array.

Parameters

MVPbkContactLink * aLink the link object to insert. This array takes ownership of the link if insertion is succesful.
TInt aIndex position where to insert the link.

InternalizeFromBufferL(RReadStream &, const MVPbkContactStoreList &)

void InternalizeFromBufferL ( RReadStream & aReadStream,
const MVPbkContactStoreList & aStoreList
) [private]

Parameters

RReadStream & aReadStream
const MVPbkContactStoreList & aStoreList

NewL()

IMPORT_C CVPbkContactLinkArray * NewL ( ) [static]

Creates an empty link array.

NewLC()

IMPORT_C CVPbkContactLinkArray * NewLC ( ) [static]

Creates an empty link array. Leaves the created array object on the cleanup stack.

NewLC(const TDesC8 &, const MVPbkContactStoreList &)

IMPORT_C CVPbkContactLinkArray * NewLC ( const TDesC8 & aPackedLinks,
const MVPbkContactStoreList & aStoreList
) [static]

Creates a link array from a packed descriptor of links.

Parameters

const TDesC8 & aPackedLinks a buffer that was created using PackLC of MVPbkContactLinkArray or MVPbkContactLink
const MVPbkContactStoreList & aStoreList the list of stores that contain the stores that links belong.

NewLC(RReadStream &, const MVPbkContactStoreList &)

IMPORT_C CVPbkContactLinkArray * NewLC ( RReadStream & aStream,
const MVPbkContactStoreList & aStoreList
) [static]

Creates a link array from a stream of links.

Parameters

RReadStream & aStream a stream of contact link that was created using MVPbkStreamable interface of MVPbkContactLink
const MVPbkContactStoreList & aStoreList the list of stores that contain the stores that links belong.

NewLC(RReadStream &, MVPbkContactStoreLoader &)

CVPbkContactLinkArray * NewLC ( RReadStream & aStream,
MVPbkContactStoreLoader & aLoader
) [static]

Creates a link array from a stream of links. Uses aLoader to find and load stores. aLoader must exist the life time of this object.

Parameters

RReadStream & aStream a stream of contact link that was created using MVPbkStreamable interface of MVPbkContactLink
MVPbkContactStoreLoader & aLoader the contact store loader for internalization.

PackLC()

HBufC8 * PackLC ( ) const

PackedBufferSize()

IMPORT_C TInt PackedBufferSize ( ) const

Returns the size of the packed link array

Remove(TInt)

IMPORT_C void Remove ( TInt aIndex )

Removes a link at aIndex from this array.

Pre-condition
aIndex >= 0 && aIndex <= Count()
Post-condition
The array count is decreased by one.

Parameters

TInt aIndex

Reset()

IMPORT_C void Reset ( )

Resets this array but doesn't destroy links

Post-condition
Count() == 0

ResetAndDestroy()

IMPORT_C void ResetAndDestroy ( )

Resets the array and destroys the links

Streamable()

const MVPbkStreamable * Streamable ( ) const

Member Data Documentation

RPointerArray< MVPbkContactLink > iLinks

RPointerArray < MVPbkContactLink > iLinks [private]

MVPbkContactStoreLoader * iStoreLoader

MVPbkContactStoreLoader * iStoreLoader [private]

CStoreUris * iStoreUris

CStoreUris * iStoreUris [private]