CMPXMediaArray Class Reference

class CMPXMediaArray : public CMPXMediaBase

Array of media objects.

mpxcommon.lib

Inherits from

Public Member Functions
~CMPXMediaArray()
IMPORT_C voidAppendL(const CMPXMedia *)
IMPORT_C voidAppendL(const CMPXMedia &)
IMPORT_C CMPXMedia *AtL(TInt)
IMPORT_C TIntCount()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C TIntInsert(const CMPXMedia *, TInt)
IMPORT_C TIntInsert(const CMPXMedia &, TInt)
IMPORT_C voidInsertL(const CMPXMedia *, TInt)
IMPORT_C voidInsertL(const CMPXMedia &, TInt)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C CMPXMediaArray *NewL()
IMPORT_C CMPXMediaArray *NewL(const CMPXMediaArray &)
IMPORT_C voidRemove(TInt)
IMPORT_C voidReset()
IMPORT_C voidSet(const CMPXMedia &, TInt)
IMPORT_C CMPXMedia *operator[](TInt)
Private Member Functions
TInt AddToArray(const CMPXMedia &, TInt, TBool)
CMPXMedia *Value(TInt)
CMPXMedia *ValueL(TInt)
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()
CMPXMediaBase::CMPXMediaBase()
CMPXMediaBase::Clear()
CMPXMediaBase::ConstructL()
CMPXMediaBase::ConstructL(TInt)
CMPXMediaBase::ConstructL(TInt,MMPXData &)
CMPXMediaBase::ConstructL(const CMPXMediaBase &)
CMPXMediaBase::CopyConstructL(const CMPXMediaBase &)
CMPXMediaBase::DeleteLocal(TInt)
CMPXMediaBase::DeletePtr(TAny *,TMPXAttributeType)
CMPXMediaBase::DoExternalizeL(RWriteStream &,MMPXData::TMPXObjectType)const
CMPXMediaBase::DoInternalizeL(RReadStream &,MMPXData::TMPXObjectType)
CMPXMediaBase::LocalValue(TInt)const
CMPXMediaBase::LockHeapLC()const
CMPXMediaBase::ResetLocal()
CMPXMediaBase::SetLocal(const TValue &)
CMPXMediaBase::UnlockHeap(TAny *)
CMPXMediaBase::~CMPXMediaBase()
Inherited Attributes
CMPXMediaBase::iClientHandle
CMPXMediaBase::iData
CMPXMediaBase::iDataHandle

Constructor & Destructor Documentation

~CMPXMediaArray()

IMPORT_C~CMPXMediaArray()

Destructor.

Since
S60 3.2.3

Member Functions Documentation

AddToArray(const CMPXMedia &, TInt, TBool)

TInt AddToArray(const CMPXMedia &aMedia,
TIntaPos,
TBoolaReplace = EFalse
)[private]

Inserts/Updates a value at aPos.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMedia
TInt aPos
TBool aReplace = EFalse

AppendL(const CMPXMedia *)

IMPORT_C voidAppendL(const CMPXMedia *aMedia)

Appends media object to array. Note: Ownership of aMedia transferred.

Since
S60 3.2.3

Parameters

const CMPXMedia * aMediaobject to add to the array

AppendL(const CMPXMedia &)

IMPORT_C voidAppendL(const CMPXMedia &aMedia)

Appends media object to array. A new media object will be copied from aMedia. The new media object created on global heap and added into the array.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMediaobject to add to the array

AtL(TInt)

IMPORT_C CMPXMedia *AtL(TIntaIndex)const

Get a pointer to the media object at the specified position within the array.

Since
S60 3.2.3
leave
KErrNoMemory if local heap is out of memory or other system error. User 0 is the aIndex is out of bound

Parameters

TInt aIndexindex into the array

Count()

IMPORT_C TIntCount()const

Total number of objects contained in array.

Since
S60 3.2.3

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const
Externalize media objects.
Since
S60 3.2.3

Parameters

RWriteStream & aStreamwrite stream

Insert(const CMPXMedia *, TInt)

IMPORT_C TIntInsert(const CMPXMedia *aMedia,
TIntaPos
)

Inserts the object pointer into the array at the specified position. Note: Ownership of aMedia transferred.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes,

Parameters

const CMPXMedia * aMediaobject to be inserted to the array
TInt aPosthe position within the array where the object pointer is to be inserted. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. USER 131, if aPos is negative, or is greater than the number of object pointers currently in the array.

Insert(const CMPXMedia &, TInt)

IMPORT_C TIntInsert(const CMPXMedia &aMedia,
TIntaPos
)

Inserts the object pointer into the array at the specified position. A new media object will be copied from aMedia. The new media object created on global heap and added into the array.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes,

Parameters

const CMPXMedia & aMediaobject to be inserted to the array
TInt aPosthe position within the array where the object pointer is to be inserted. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. USER 131, if aPos is negative, or is greater than the number of object pointers currently in the array.

InsertL(const CMPXMedia *, TInt)

IMPORT_C voidInsertL(const CMPXMedia *aMedia,
TIntaPos
)

Inserts the object pointer into the array at the specified position. The function leaves with one of the system wide error codes, if the operation fails. Note: Ownership of aMedia transferred.

Since
S60 3.2.3

Parameters

const CMPXMedia * aMediaobject to be inserted to the array
TInt aPosthe position within the array where the object pointer is to be inserted. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. USER 131, if aPos is negative, or is greater than the number of object pointers currently in the array.

InsertL(const CMPXMedia &, TInt)

IMPORT_C voidInsertL(const CMPXMedia &aMedia,
TIntaPos
)

Inserts the object pointer into the array at the specified position. The function leaves with one of the system wide error codes, if the operation fails. A new media object will be copied from aMedia. The new media object created on global heap and added into the array.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMediaobject to be inserted to the array
TInt aPosthe position within the array where the object pointer is to be inserted. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. USER 131, if aPos is negative, or is greater than the number of object pointers currently in the array.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalize media objects.

Since
S60 3.2.3

Parameters

RReadStream & aStreamread stream

NewL()

IMPORT_C CMPXMediaArray *NewL()[static]

Two-phased constructor.

Since
S60 3.2.3

NewL(const CMPXMediaArray &)

IMPORT_C CMPXMediaArray *NewL(const CMPXMediaArray &aArray)[static]

Two-phased constructor.

Since
S60 3.2.3

Parameters

const CMPXMediaArray & aArrayarray to copy

Remove(TInt)

IMPORT_C voidRemove(TIntaIndex)

Removes the object pointer at the specified position from the array and deletes the object whose pointer is removed.

Since
S60 3.2.3

Parameters

TInt aIndexThe position within the array from where the object pointer is to be removed. The position is relative to zero, i.e. zero implies that a pointer at the beginning of the array is to be removed.

Reset()

IMPORT_C voidReset()

Resets the media array.

Since
S60 3.2.3

Set(const CMPXMedia &, TInt)

IMPORT_C voidSet(const CMPXMedia &aMedia,
TIntaPos
)

Sets the value at a specified position; the previous value is deleted.

Since
S60 3.2.3

Parameters

const CMPXMedia & aMediaobject to be set to the array
TInt aPosthe position within the array where the object pointer is to be set. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. USER 131, if aPos is negative, or is greater than the number of objects currently in the array.

Value(TInt)

CMPXMedia *Value(TIntaIndex)const [private]

Value at a specific index.

Since
S60 3.2.3

Parameters

TInt aIndex

ValueL(TInt)

CMPXMedia *ValueL(TIntaIndex)const [private]

Value at a specific index.

Since
S60 3.2.3

Parameters

TInt aIndex

operator[](TInt)

IMPORT_C CMPXMedia *operator[](TIntaIndex)const

Array assessor. This method returns NULL if local heap is out of memory. Clients should check returned pointer before using it.

Since
S60 3.2.3

Parameters

TInt aIndexindex into the array