CPbk2ImageManager Class Reference

class CPbk2ImageManager : public CBase

Phonebook 2 image manager. Contains operations for attaching, removing and querying images connected to Phonebook 2 contacts.

For all thumbnail images all the Set* operations convert the image to full color (24 bits/pixel) JPEG format and scale it to KPbk2PersonalImageSize before connecting the image to a contact. Scaling does not change image's aspect ratio. If the original image is in JPEG format and its size is <=KPbk2PersonalImageSize a copy of the original image is stored directly.

For all call object images all the Set* operations convert the image to full color (24 bits/pixel) JPEG format and scale it to the total area of the screen available to the application before connecting the image to a contact. Scaling does not change image's aspect ratio. If the original image is in JPEG format and its size is <= the application screen area a copy of the original image is stored directly.

MPbk2ImageGetObserver MPbk2ImageSetObserver

Inherits from

Constructor & Destructor Documentation

CPbk2ImageManager(CVPbkContactManager &)

CPbk2ImageManager(CVPbkContactManager &aContactManager)[private, inline]

Parameters

CVPbkContactManager & aContactManager

~CPbk2ImageManager()

~CPbk2ImageManager()

Destructor.

Member Functions Documentation

ConstructL()

voidConstructL()[private, inline]

GetImageAsyncL(TPbk2ImageManagerParams *, MVPbkBaseContact &, const MVPbkFieldType &, MPbk2ImageGetObserver &)

IMPORT_C MPbk2ImageOperation *GetImageAsyncL(TPbk2ImageManagerParams *aParams,
MVPbkBaseContact &aContact,
const MVPbkFieldType &aFieldType,
MPbk2ImageGetObserver &aObserver
)

Gets a image bitmap from a contact asynchronously.

Parameters

TPbk2ImageManagerParams * aParamsOperation parameters. Not used if NULL.
MVPbkBaseContact & aContactA contact from where the image will be get.
const MVPbkFieldType & aFieldTypeA field type from where the image will be get.
MPbk2ImageGetObserver & aObserverObserver for this operation.

HasImage(const MVPbkBaseContact &, const MVPbkFieldType &)

IMPORT_C TBoolHasImage(const MVPbkBaseContact &aContact,
const MVPbkFieldType &aFieldType
)const

Returns true if a contact has an image attached to it in a specified field.

Parameters

const MVPbkBaseContact & aContactContact that is queried for the image.
const MVPbkFieldType & aFieldTypeA field type from where to look for the image.

NewL(CVPbkContactManager &)

IMPORT_C CPbk2ImageManager *NewL(CVPbkContactManager &aContactManager)[static]

Creates new instance of this class.

Parameters

CVPbkContactManager & aContactManagerContact manager

RemoveImage(MVPbkStoreContact &, const MVPbkFieldType &)

IMPORT_C voidRemoveImage(MVPbkStoreContact &aContact,
const MVPbkFieldType &aFieldType
)

Removes any image from a contact at the specified field.

Parameters

MVPbkStoreContact & aContactContact whose image is removed.
const MVPbkFieldType & aFieldTypeField type from where the image should be removed.

SetImageAsyncL(MVPbkStoreContact &, const MVPbkFieldType &, MPbk2ImageSetObserver &, const CFbsBitmap &)

IMPORT_C MPbk2ImageOperation *SetImageAsyncL(MVPbkStoreContact &aContact,
const MVPbkFieldType &aFieldType,
MPbk2ImageSetObserver &aObserver,
const CFbsBitmap &aBitmap
)

Sets a image for a contact asynchronously.

Parameters

MVPbkStoreContact & aContactA contact to where the image will be set.
const MVPbkFieldType & aFieldTypeA field type to where the image will be set.
MPbk2ImageSetObserver & aObserverObserver for this operation.
const CFbsBitmap & aBitmapBitmap to set as the image for contact.

SetImageAsyncL(MVPbkStoreContact &, const MVPbkFieldType &, MPbk2ImageSetObserver &, const TDesC8 &)

IMPORT_C MPbk2ImageOperation *SetImageAsyncL(MVPbkStoreContact &aContact,
const MVPbkFieldType &aFieldType,
MPbk2ImageSetObserver &aObserver,
const TDesC8 &aImageBuffer
)

Sets a image for a contact asynchronously.

Parameters

MVPbkStoreContact & aContactA contact to where the image will be set.
const MVPbkFieldType & aFieldTypeA field type to where the image will be set.
MPbk2ImageSetObserver & aObserverObserver for this operation.
const TDesC8 & aImageBufferImage buffer to set as the image for contact.

SetImageAsyncL(MVPbkStoreContact &, const MVPbkFieldType &, MPbk2ImageSetObserver &, const TDesC &)

IMPORT_C MPbk2ImageOperation *SetImageAsyncL(MVPbkStoreContact &aContact,
const MVPbkFieldType &aFieldType,
MPbk2ImageSetObserver &aObserver,
const TDesC &aFileName
)

Sets a image for a contact asynchronously.

Parameters

MVPbkStoreContact & aContactA contact to where the image will be set.
const MVPbkFieldType & aFieldTypeA field type to where the image will be set.
MPbk2ImageSetObserver & aObserverObserver for this operation.
const TDesC & aFileNameFile name for a image to set as the image for contact.

Member Data Documentation

CVPbkContactManager & iContactManager

CVPbkContactManager &iContactManager[private]