CMPXMediaArray Class Reference

class CMPXMediaArray : public CMPXMediaBase

Array of media objects.

mpxcommon.lib

Inherits from

Public Member Functions
~CMPXMediaArray ()
IMPORT_C void AppendL (const CMPXMedia *)
IMPORT_C void AppendL (const CMPXMedia &)
IMPORT_C CMPXMedia * AtL ( TInt )
IMPORT_C TInt Count ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C TInt Insert (const CMPXMedia *, TInt )
IMPORT_C TInt Insert (const CMPXMedia &, TInt )
IMPORT_C void InsertL (const CMPXMedia *, TInt )
IMPORT_C void InsertL (const CMPXMedia &, TInt )
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C CMPXMediaArray * NewL ()
IMPORT_C CMPXMediaArray * NewL (const CMPXMediaArray &)
IMPORT_C void Remove ( TInt )
IMPORT_C void Reset ()
IMPORT_C void Set (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,
TInt aPos,
TBool aReplace = 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 void AppendL ( const CMPXMedia * aMedia )

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

Since
S60 3.2.3

Parameters

const CMPXMedia * aMedia object to add to the array

AppendL(const CMPXMedia &)

IMPORT_C void AppendL ( 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 & aMedia object to add to the array

AtL(TInt)

IMPORT_C CMPXMedia * AtL ( TInt aIndex ) 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 aIndex index into the array

Count()

IMPORT_C TInt Count ( ) const

Total number of objects contained in array.

Since
S60 3.2.3

ExternalizeL(RWriteStream &)

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

Parameters

RWriteStream & aStream write stream

Insert(const CMPXMedia *, TInt)

IMPORT_C TInt Insert ( const CMPXMedia * aMedia,
TInt aPos
)

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 * aMedia object to be inserted to the array
TInt aPos the 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 TInt Insert ( const CMPXMedia & aMedia,
TInt aPos
)

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 & aMedia object to be inserted to the array
TInt aPos the 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 void InsertL ( const CMPXMedia * aMedia,
TInt aPos
)

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 * aMedia object to be inserted to the array
TInt aPos the 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 void InsertL ( const CMPXMedia & aMedia,
TInt aPos
)

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 & aMedia object to be inserted to the array
TInt aPos the 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 void InternalizeL ( RReadStream & aStream )

Internalize media objects.

Since
S60 3.2.3

Parameters

RReadStream & aStream read 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 & aArray array to copy

Remove(TInt)

IMPORT_C void Remove ( TInt aIndex )

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 aIndex The 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 void Reset ( )

Resets the media array.

Since
S60 3.2.3

Set(const CMPXMedia &, TInt)

IMPORT_C void Set ( const CMPXMedia & aMedia,
TInt aPos
)

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

Since
S60 3.2.3

Parameters

const CMPXMedia & aMedia object to be set to the array
TInt aPos the 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 ( TInt aIndex ) const [private]

Value at a specific index.

Since
S60 3.2.3

Parameters

TInt aIndex

ValueL(TInt)

CMPXMedia * ValueL ( TInt aIndex ) const [private]

Value at a specific index.

Since
S60 3.2.3

Parameters

TInt aIndex

operator[](TInt)

IMPORT_C CMPXMedia * operator[] ( TInt aIndex ) 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 aIndex index into the array