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()

void ConstructL ( ) [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 * aParams Operation parameters. Not used if NULL.
MVPbkBaseContact & aContact A contact from where the image will be get.
const MVPbkFieldType & aFieldType A field type from where the image will be get.
MPbk2ImageGetObserver & aObserver Observer for this operation.

HasImage(const MVPbkBaseContact &, const MVPbkFieldType &)

IMPORT_C TBool HasImage ( 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 & aContact Contact that is queried for the image.
const MVPbkFieldType & aFieldType A 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 & aContactManager Contact manager

RemoveImage(MVPbkStoreContact &, const MVPbkFieldType &)

IMPORT_C void RemoveImage ( MVPbkStoreContact & aContact,
const MVPbkFieldType & aFieldType
)

Removes any image from a contact at the specified field.

Parameters

MVPbkStoreContact & aContact Contact whose image is removed.
const MVPbkFieldType & aFieldType Field 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 & aContact A contact to where the image will be set.
const MVPbkFieldType & aFieldType A field type to where the image will be set.
MPbk2ImageSetObserver & aObserver Observer for this operation.
const CFbsBitmap & aBitmap Bitmap 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 & aContact A contact to where the image will be set.
const MVPbkFieldType & aFieldType A field type to where the image will be set.
MPbk2ImageSetObserver & aObserver Observer for this operation.
const TDesC8 & aImageBuffer Image 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 & aContact A contact to where the image will be set.
const MVPbkFieldType & aFieldType A field type to where the image will be set.
MPbk2ImageSetObserver & aObserver Observer for this operation.
const TDesC & aFileName File name for a image to set as the image for contact.

Member Data Documentation

CVPbkContactManager & iContactManager

CVPbkContactManager & iContactManager [private]