30
|
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: stub signal receiver for testing VideoCollectionListener
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __CSTUBSIGNALRECEIVER_H__
|
|
19 |
#define __CSTUBSIGNALRECEIVER_H__
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <mpxcollectionmessagedefs.h>
|
|
23 |
#include <mpxitemid.h>
|
|
24 |
#include <mpxmediaarray.h>
|
|
25 |
#include <mpxmedia.h>
|
|
26 |
#include <Qlist>
|
34
|
27 |
#include "videodatasignalreceiver.h"
|
30
|
28 |
|
34
|
29 |
class StubSignalReceiver : public VideoDataSignalReceiver
|
30
|
30 |
{
|
|
31 |
Q_OBJECT
|
34
|
32 |
|
|
33 |
Q_DISABLE_COPY(StubSignalReceiver)
|
30
|
34 |
|
|
35 |
public:
|
|
36 |
|
|
37 |
/**
|
|
38 |
* contructor
|
|
39 |
*/
|
|
40 |
StubSignalReceiver();
|
|
41 |
|
|
42 |
/**
|
|
43 |
* destructor
|
|
44 |
*/
|
|
45 |
virtual ~StubSignalReceiver();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* clears all members
|
|
49 |
*/
|
|
50 |
void resetLatestItems();
|
|
51 |
|
|
52 |
/**
|
|
53 |
* return mLatestPtr
|
|
54 |
*/
|
|
55 |
void* getLatestPointerAddr();
|
|
56 |
|
|
57 |
/**
|
|
58 |
* return mLatestItemId
|
|
59 |
*/
|
|
60 |
TMPXItemId getLatestItemId();
|
|
61 |
|
|
62 |
/**
|
36
|
63 |
* return mLatestModifiedItemId
|
|
64 |
*/
|
|
65 |
TMPXItemId getLatestModifiedItemId();
|
|
66 |
|
|
67 |
/**
|
30
|
68 |
* return mLatesListData
|
|
69 |
*/
|
|
70 |
QList<TMPXItemId>& getLatestListData();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* return mLatestInteger
|
|
74 |
*/
|
|
75 |
int getLatestIntegerData();
|
|
76 |
|
|
77 |
public slots:
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Saves provided address to mLatestPtr
|
|
81 |
*/
|
|
82 |
void newVideoListSlot(CMPXMediaArray* aVideoList);
|
|
83 |
|
|
84 |
/**
|
34
|
85 |
* Saves provided address to mLatestPtr
|
|
86 |
*/
|
|
87 |
void appendVideoListSlot( CMPXMediaArray* videoList );
|
|
88 |
|
|
89 |
/**
|
30
|
90 |
* Saves provided address to mLatestPtr
|
|
91 |
*/
|
|
92 |
void videoListAppendedSlot(CMPXMediaArray* aVideoList);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Saves provided address to mLatestPtr
|
|
96 |
*/
|
|
97 |
void newVideoAvailableSlot(CMPXMedia* aVideo);
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Saves provided integer to mLatestInt
|
|
101 |
*/
|
|
102 |
void videoDeletedSlot(TMPXItemId videoId);
|
|
103 |
|
|
104 |
/**
|
|
105 |
* copies provided list data to mLatesListData
|
|
106 |
*/
|
|
107 |
void videoDeleteCompletedSlot(int count, QList<TMPXItemId> *failedMediaIds);
|
|
108 |
|
|
109 |
/**
|
36
|
110 |
* Saves provided media to mLatestPtr
|
30
|
111 |
*/
|
36
|
112 |
void videoDetailsCompletedSlot(CMPXMedia* media);
|
30
|
113 |
|
34
|
114 |
/**
|
|
115 |
* Saves provided integer to mLatestItemId and provided pointer to
|
|
116 |
* mLatestPtr
|
|
117 |
*/
|
|
118 |
void albumListAvailableSlot(TMPXItemId albumId,
|
|
119 |
CMPXMediaArray *albumItems);
|
|
120 |
|
|
121 |
/**
|
|
122 |
* copies provided list data to mLatesListData
|
|
123 |
*/
|
|
124 |
void albumRemoveFailureSlot(QList<TMPXItemId> *items);
|
|
125 |
|
|
126 |
/**
|
|
127 |
* saves provided item id into mLatestItemId
|
|
128 |
*/
|
|
129 |
void itemDeletedSlot(TMPXItemId id);
|
|
130 |
|
36
|
131 |
/**
|
|
132 |
* saves provided item id into mLatestModifiedItemId
|
|
133 |
*/
|
|
134 |
virtual void itemModifiedSlot(const TMPXItemId &itemId);
|
|
135 |
|
30
|
136 |
private:
|
|
137 |
/**
|
|
138 |
* Contains address of latest pointer passed to object
|
|
139 |
*/
|
|
140 |
void *mLatestPtr;
|
|
141 |
|
|
142 |
/**
|
|
143 |
* contains latest integer value sent
|
|
144 |
*/
|
|
145 |
int mLatestInteger;
|
|
146 |
|
|
147 |
/**
|
|
148 |
* contains value if the latest integer passed to object
|
|
149 |
*/
|
|
150 |
TMPXItemId mLatestItemId;
|
|
151 |
|
|
152 |
/**
|
36
|
153 |
* contains value if the latest integer passed to object at EMPXItemModified event
|
|
154 |
*/
|
|
155 |
TMPXItemId mLatestModifiedItemId;
|
|
156 |
|
|
157 |
/**
|
30
|
158 |
* contains contents of list received from signal
|
|
159 |
*/
|
|
160 |
QList<TMPXItemId> mLatesListData;
|
|
161 |
};
|
|
162 |
|
|
163 |
#endif
|