35
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: MpMpxCollectionData stub for testing MpCollectionDataModel
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MPMPXCOLLECTIONDATA_H
|
|
19 |
#define MPMPXCOLLECTIONDATA_H
|
|
20 |
|
|
21 |
#include <QObject>
|
55
|
22 |
#include <QAbstractListModel>
|
35
|
23 |
|
|
24 |
#include "mpmpxcollectionviewdefs.h"
|
|
25 |
|
|
26 |
|
|
27 |
class MpMpxCollectionData : public QObject
|
|
28 |
{
|
|
29 |
Q_OBJECT
|
|
30 |
|
|
31 |
public:
|
|
32 |
|
|
33 |
enum DataType {
|
|
34 |
Title,
|
|
35 |
Uri,
|
|
36 |
Duration,
|
|
37 |
Count,
|
|
38 |
Artist,
|
|
39 |
Album,
|
|
40 |
Genre,
|
|
41 |
Rating,
|
|
42 |
AlbumArtUri
|
|
43 |
};
|
55
|
44 |
|
|
45 |
enum DataProperty {
|
|
46 |
Corrupted,
|
|
47 |
DrmExpired
|
|
48 |
};
|
35
|
49 |
|
|
50 |
// Test utility functions
|
|
51 |
static int getInitCounter();
|
|
52 |
static void resetInitCounter();
|
|
53 |
|
|
54 |
// Stub functions
|
|
55 |
explicit MpMpxCollectionData( QObject *parent=0 );
|
|
56 |
virtual ~MpMpxCollectionData();
|
|
57 |
|
|
58 |
int albumSongsCount() const;
|
47
|
59 |
int albumSongId( int index );
|
35
|
60 |
QString albumSongData( int index, MpMpxCollectionData::DataType type ) const;
|
55
|
61 |
bool hasAlbumSongProperty( int index, MpMpxCollectionData:: DataProperty type );
|
47
|
62 |
int albumSongIndex( int songUniqueId );
|
55
|
63 |
void setCorruptValue(QModelIndex index, bool tBone );
|
|
64 |
void setReloadAlbumContent( bool );
|
35
|
65 |
signals:
|
|
66 |
|
|
67 |
void contextChanged( TCollectionContext context );
|
|
68 |
void refreshAlbumSongs();
|
55
|
69 |
void dataChanged();
|
35
|
70 |
|
|
71 |
public:
|
|
72 |
|
|
73 |
int mAlbumSongCount;
|
|
74 |
bool mItemDataReturn;
|
55
|
75 |
bool mReloadAlbumContent;
|
|
76 |
bool mHasAlbumSongProperty;
|
|
77 |
QList<int> mCorruptedIndex;
|
35
|
78 |
|
|
79 |
};
|
|
80 |
|
|
81 |
#endif // MPMPXCOLLECTIONDATA_H
|
|
82 |
|