mpdata/tsrc/unittest_mpcollectiondatamodel/stub/inc/mpmpxcollectiondata.h
changeset 51 560ce2306a17
parent 35 fdb31ab341af
child 55 f3930dda3342
equal deleted inserted replaced
47:4cc1412daed0 51:560ce2306a17
    17 
    17 
    18 #ifndef MPMPXCOLLECTIONDATA_H
    18 #ifndef MPMPXCOLLECTIONDATA_H
    19 #define MPMPXCOLLECTIONDATA_H
    19 #define MPMPXCOLLECTIONDATA_H
    20 
    20 
    21 #include <QObject>
    21 #include <QObject>
       
    22 #include <QAbstractListModel>
    22 
    23 
    23 #include "mpmpxcollectionviewdefs.h"
    24 #include "mpmpxcollectionviewdefs.h"
    24 
    25 
    25 
    26 
    26 class MpMpxCollectionData : public QObject
    27 class MpMpxCollectionData : public QObject
    33         Title,
    34         Title,
    34         Artist,
    35         Artist,
    35         Album,
    36         Album,
    36         Count,
    37         Count,
    37         AlbumArtUri
    38         AlbumArtUri
       
    39     };
       
    40     
       
    41     enum DataProperty {
       
    42            Corrupted,
       
    43            DrmExpired
    38     };
    44     };
    39 
    45 
    40     // Test utility functions
    46     // Test utility functions
    41     static int getInitCounter();
    47     static int getInitCounter();
    42     static void resetInitCounter();
    48     static void resetInitCounter();
    55     TCollectionContext context() const;
    61     TCollectionContext context() const;
    56 
    62 
    57     int count() const;
    63     int count() const;
    58     QString collectionTitle() const;
    64     QString collectionTitle() const;
    59     QString itemData( int index, MpMpxCollectionData::DataType type ) const;
    65     QString itemData( int index, MpMpxCollectionData::DataType type ) const;
       
    66     bool hasItemProperty( int index, MpMpxCollectionData:: DataProperty type ) const;
       
    67     bool hasAlbumSongProperty( int index, MpMpxCollectionData:: DataProperty type ) const;
    60 
    68 
    61     int containerId();
    69     int containerId();
    62     int itemId(int index);
    70     int itemId(int index);
    63     void removeItem(int index);
    71     void removeItem(int index);
    64     bool testCachedItem( int itemId );
    72     bool testCachedItem( int itemId );
    65     void insertCachedItem(int index);
    73     void insertCachedItem(int index);
    66 
    74 
    67     void setContext( TCollectionContext context );
    75     void setContext( TCollectionContext context );
       
    76     QList<int> songIndex( int songUniqueId );
       
    77     void setCorruptValue(QModelIndex index, bool tBone );
       
    78     void setReloadAlbumContent( bool reloadAlbum );
    68 
    79 
    69 signals:
    80 signals:
    70 
    81 
    71     void contextChanged( TCollectionContext context );
    82     void contextChanged( TCollectionContext context );
    72 
    83