MCLFItem Class Reference

class MCLFItem
Content Listing Framework item. All items that are fetched from server have got an Item ID number. Item ID is defined in runtime so do not store Item IDs permanently. One item can contain multiple fields. The field consists of a Field ID and field data. Type of the field is defined with Field ID: see TCLFDefaultFieldId in CLFContentListing.hrh. For example, a music file could contain these two fields: ECLFFieldIdSongName (data: title of the song) and ECLFFieldIdArtist (data: name of the artist). Usage:
  // Get file names and sizes of all items
  TInt count( listModel->ItemCount() );
  for( TInt i = 0 ; i < count ; ++i )
      {
      const MCLFItem& myItem = listModel->Item( i );

      // Get file name of an item (string data)
      TPtrC fileName;
      TInt error( myItem.GetField( ECLFFieldIdFileName, fileName ) );

      ...

      // Get file size of an item (integer data)
      TInt32 size( 0 );
      error = myItem.GetField( ECLFFieldIdFileSize, size );

      ...

      }
ContentListingFramwork.lib
Since
S60 3.1

Constructor & Destructor Documentation

~MCLFItem()

~MCLFItem()[inline, virtual]

Destructor.

Member Functions Documentation

DataType(TCLFFieldId)

TCLFItemDataType DataType(TCLFFieldIdaFieldId)const [pure virtual]
Get data type of the field. Data type can be text, time or integer.
Since
S60 3.1

Parameters

TCLFFieldId aFieldIdID of the field (TCLFDefaultFieldId)

Extension()

MCLFItemExt *Extension()[private, inline, virtual]

This member is internal and not intended for use.

GetField(TCLFFieldId, TPtrC &)

TInt GetField(TCLFFieldIdaFieldId,
TPtrC &aData
)const [pure virtual]
Get field data that is a string.
Since
S60 3.1

Parameters

TCLFFieldId aFieldIdID of the field (TCLFDefaultFieldId)
TPtrC & aDataData of the field

GetField(TCLFFieldId, TInt32 &)

TInt GetField(TCLFFieldIdaFieldId,
TInt32 &aData
)const [pure virtual]
Get field data that is an integer.
Since
S60 3.1

Parameters

TCLFFieldId aFieldIdID of the field (TCLFDefaultFieldId)
TInt32 & aDataData of the field

GetField(TCLFFieldId, TTime &)

TInt GetField(TCLFFieldIdaFieldId,
TTime &aData
)const [pure virtual]
Get field data that is a time data.
Since
S60 3.1

Parameters

TCLFFieldId aFieldIdID of the field (TCLFDefaultFieldId)
TTime & aDataData of the field

ItemId()

TCLFItemId ItemId()const [pure virtual]
Get Item ID of the item.
Since
S60 3.1