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>
|
|
22 |
|
|
23 |
#include "mpmpxcollectionviewdefs.h"
|
|
24 |
|
|
25 |
|
|
26 |
class MpMpxCollectionData : public QObject
|
|
27 |
{
|
|
28 |
Q_OBJECT
|
|
29 |
|
|
30 |
public:
|
|
31 |
|
|
32 |
enum DataType {
|
|
33 |
Title,
|
|
34 |
Uri,
|
|
35 |
Duration,
|
|
36 |
Count,
|
|
37 |
Artist,
|
|
38 |
Album,
|
|
39 |
Genre,
|
|
40 |
Rating,
|
|
41 |
AlbumArtUri
|
|
42 |
};
|
|
43 |
|
|
44 |
// Test utility functions
|
|
45 |
static int getInitCounter();
|
|
46 |
static void resetInitCounter();
|
|
47 |
|
|
48 |
// Stub functions
|
|
49 |
explicit MpMpxCollectionData( QObject *parent=0 );
|
|
50 |
virtual ~MpMpxCollectionData();
|
|
51 |
|
|
52 |
int albumSongsCount() const;
|
47
|
53 |
int albumSongId( int index );
|
35
|
54 |
QString albumSongData( int index, MpMpxCollectionData::DataType type ) const;
|
47
|
55 |
int albumSongIndex( int songUniqueId );
|
35
|
56 |
|
|
57 |
signals:
|
|
58 |
|
|
59 |
void contextChanged( TCollectionContext context );
|
|
60 |
void refreshAlbumSongs();
|
|
61 |
|
|
62 |
public:
|
|
63 |
|
|
64 |
int mAlbumSongCount;
|
|
65 |
bool mItemDataReturn;
|
|
66 |
|
|
67 |
};
|
|
68 |
|
|
69 |
#endif // MPMPXCOLLECTIONDATA_H
|
|
70 |
|