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 ( TCLFFieldId aFieldId ) const [pure virtual]
Get data type of the field. Data type can be text, time or integer.
Since
S60 3.1

Parameters

TCLFFieldId aFieldId ID of the field (TCLFDefaultFieldId)

Extension()

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

This member is internal and not intended for use.

GetField(TCLFFieldId, TPtrC &)

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

Parameters

TCLFFieldId aFieldId ID of the field (TCLFDefaultFieldId)
TPtrC & aData Data of the field

GetField(TCLFFieldId, TInt32 &)

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

Parameters

TCLFFieldId aFieldId ID of the field (TCLFDefaultFieldId)
TInt32 & aData Data of the field

GetField(TCLFFieldId, TTime &)

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

Parameters

TCLFFieldId aFieldId ID of the field (TCLFDefaultFieldId)
TTime & aData Data of the field

ItemId()

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