CMPXMedia Class Reference
Encapsulates arbitrary data. The ID is a unique identifier for the type of content contained within this object: there may be several supported IDs. Supported IDs provide a means whereby a client who receives a media object can request additional media objects from the same source using another of the supported IDs. Attributes are referenced by flags which are unique to the type of content contained in the object (i.e ID). The media object may contain the full range of attribute values or some subset, depending both on the attributes requested by the client and the capabilities of the source of the data.
mpxcommon.lib
Constructor & Destructor Documentation
Member Functions Documentation
Attribute(TInt)
The attribute for a specific index.
Parameters
TInt aIndex | the index from 0 to Count()-1, covering all the values provided in this object |
Attributes()
The attributes provided in this media object.
AttributesSet(TInt)
IMPORT_C TUint | AttributesSet | ( | TInt | aContentId | ) | const |
The attributes set for a specific content id.
Parameters
TInt aContentId | content Id |
ConstructL(const TArray< TInt > &)
void | ConstructL | ( | const TArray< TInt > & | aSupportedIds | ) | [private] |
Parameters
const TArray< TInt > & aSupportedIds | support content ids |
ConstructL(RReadStream &)
CopyL(const CMPXMedia &)
Two-phased constructor. Creates new instance of CMPXMedia which duplicates underlying data from aMedia.
Parameters
const CMPXMedia & aMedia | create object from media |
Count()
IMPORT_C TInt | Count | ( | ) | const |
The number of attribute values provided in this media object.
Data()
TInt
| Data | ( | ) | const [inline] |
A representation (handle) of the data stored in this object.
Delete(const TMPXAttribute &)
Deletes a given attribute and its value; No effect if attribute is not present.
Delete(TInt)
IMPORT_C void | Delete | ( | TInt | aIndex | ) | |
Deletes a given attribute and its value; No effect if attribute is not present.
Parameters
TInt aIndex | the index from 0 to Count()-1 |
Error(const TMPXAttribute &)
Get the error code of an attribute.
Parameters
const TMPXAttribute & aAttribute | the attribute whose error code is retrieved. |
ExternalizeL(RWriteStream &)
GetValue(const TMPXAttribute &, TDes8 &)
Get the binary value for a specific attribute.
HeapMemoryInfoL(TInt &, TInt &)
IMPORT_C void | HeapMemoryInfoL | ( | TInt & | aTotal, |
| TInt & | aUsed |
| ) | [static] |
Gets the total size and the currently used size of the global heap.
Parameters
TInt & aTotal | Total size of memory (out parameter) |
TInt & aUsed | Used size of memory (out parameter) |
Index(const TMPXAttribute &)
The index of a given attribute.
InternalizeL(RReadStream &)
IsSupported(const TMPXAttribute &)
Checks if this object contains the value for a given attribute.
Match(const CMPXMedia &, const TMPXAttribute &)
Compares if the specified media's attribute matches this one.
MergeMediaL(const CMPXMedia &)
IMPORT_C void | MergeMediaL | ( | const CMPXMedia & | aMedia | ) | |
Merges in the attributes of the provided media.
Parameters
const CMPXMedia & aMedia | Media object with attributes to merge in |
NewL(const TArray< TInt > &)
NewL()
Two-phased constructor.
- Since
- S60 3.2.3
NewL(const CMPXMedia &)
Two-phased constructor. Creates new instance of CMPXMedia which shares underlying data from aMedia; lifetime of data is reference counted, i.e. all CMPXMedia instances which reference same data must be deleted before underlying data is deleted.
Parameters
const CMPXMedia & aMedia | create object from media |
NewL(TInt)
Two-phased constructor. Creates object from existing data handle. The data handle is used to indentify the data in a media object.
Parameters
TInt aDataHandle | handle to the data |
RefreshAttributes()
void | RefreshAttributes | ( | ) | [private] |
Reconstructs local attribute array.
Reset()
Clears all the attributes and values.
ResetLocal()
void | ResetLocal | ( | ) | [private] |
SetCObjectValueL(const TMPXAttribute &, C *)
void | SetCObjectValueL | ( | const TMPXAttribute & | aAttribute, |
| C * | aValue |
| ) | [inline] |
Add a new attribute value to this object, or modifies existing value if already present. Uses CTypeObject::NewL( RReadStream& aStream ).
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is added/modified |
C * aValue | pointer to the C object |
SetErrorL(const TMPXAttribute &, TInt)
Set an error code to an attribute.
Parameters
const TMPXAttribute & aAttribute | the attribute whose error code is setted. |
TInt aError | error code of the attribute. Note: if error code is set for an attribute, call to Value<T> for the attribute will return NULL. You MUST be careful to check the return value of Value<T>. The Value<T> is deprecated for this reason and you should use ValueTObject instead. |
SetNoNewLCObjectL(const TMPXAttribute &, C *)
void | SetNoNewLCObjectL | ( | const TMPXAttribute & | aAttribute, |
| C * | aValue |
| ) | [inline] |
Add a new attribute value to this object, or modifies existing value if already present.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is added/modified |
C * aValue | pointer to the C object |
SetTObjectValueL(const TMPXAttribute &, T)
void | SetTObjectValueL | ( | const TMPXAttribute & | aAttribute, |
| T | aValue |
| ) | [inline] |
Add a new attribute value to this object, or modifies existing value if already present.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is added/modified |
T aValue | attribute value of the T object. |
SetTextValueL(const TMPXAttribute &, const TDesC &)
Add a new attribute value to this object, or modifies existing value if already present.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is added/modified |
const TDesC & aValue | text value to be set |
SetValueL(const TMPXAttribute &, const TDesC8 &, TMPXAttributeType)
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
const TDesC8 & aValue | the value of the media attribute |
TMPXAttributeType aType | object type of the media attribute |
SupportedIds()
Possible content IDs that denote the type of content the source of this object can supply.
Type(TInt)
The type of data stored for the index.
Parameters
TInt aIndex | the index whose type of value is queried |
Type(const TMPXAttribute &)
The type of data stored for the attribute.
Parameters
const TMPXAttribute & aAttribute | the attribute whose type of value is queried |
Value(const TMPXAttribute &)
The value for a specific attribute. it may return NULL
This method supports all T types and CMPXMediaBase classes like CMPXMedia and CMPXMediaArray.
This method returns NULL (ASSERT happens on UDEB image) for CBase objects other than CMPXMedia, CMPXMediaArray.
- Since
- S60 3.2.3
if an error code is set for the attribue, use method: CMPXMedia::ValueTObjectL(const TMPXAttribute& aAttribute), CMPXMedia::ValueNoNewLCObjectL(const TMPXAttribute& aAttribute), CMPXMedia::ValueCObjectL(const TMPXAttribute& aAttribute).
For CMPXCollectionPath, use method: CMPXMedia::ValueCObjectL(const TMPXAttribute& aAttribute).
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
ValueCObjectL(const TMPXAttribute &)
Copy an object out of media object. Note: class C must implement the function NewL() and streamable.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
ValueCObjectL(const TDesC8 &)
TAny * | ValueCObjectL | ( | const TDesC8 & | aData | ) | const [private] |
Copy an object out of media object.
ValueL(const TDesC8 &)
T * | ValueL | ( | const TDesC8 & | aData | ) | const [private, inline] |
Copy an object out of a descriptor buffer. Note: Cbased class must implement the function NewL().
ValueNoNewLCObjectL(const TMPXAttribute &)
C * | ValueNoNewLCObjectL | ( | const TMPXAttribute & | aAttribute | ) | const [inline] |
Copy an object out of media object. Note: C++ default contructor of class C must be public.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
ValuePtr(const TMPXAttribute &)
The value for a specific attribute.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
ValueTObjectL(const TMPXAttribute &)
A copy of the value for a specific attribute. If the media attribute does not exist, the default T object will be returned.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
ValueText(const TMPXAttribute &)
The value for a specific attribute.
Parameters
const TMPXAttribute & aAttribute | the attribute whose value is queried |
operator=(const CMPXMedia &)
Assignment operator. It copies data handle and increase the reference count of the aMedia only.
Member Data Documentation
RArray< TMPXAttribute > iAttributes
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.