40
|
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 VideoActivityState class definition for collection view unite tests
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// Version : %version: 1 %
|
|
19 |
|
|
20 |
#ifndef __VIDEOACTIVITYSTATE_H__
|
|
21 |
#define __VIDEOACTIVITYSTATE_H__
|
|
22 |
|
|
23 |
#include <qhash.h>
|
|
24 |
#include <qvariant.h>
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
namespace VideoActivityData
|
|
29 |
{
|
|
30 |
// type of collectionview plugin's widget level(int):
|
|
31 |
// all videos, collections or collection video list
|
|
32 |
static const QString KEY_WIDGET_LEVEL = "_VideoActivity_widget_level_";
|
|
33 |
|
|
34 |
// id of the collection whose videolist is to be shown (int).
|
|
35 |
static const QString KEY_WIDGET_ID = "_VideoActivity_view_item_id_";
|
|
36 |
}
|
|
37 |
|
|
38 |
|
|
39 |
class VideoActivityState
|
|
40 |
{
|
|
41 |
|
|
42 |
public:
|
|
43 |
|
|
44 |
/**
|
|
45 |
* method returns a static instance of this class
|
|
46 |
*/
|
|
47 |
static VideoActivityState &instance();
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Sets activity data. If dataKey is not defined, all activity data
|
|
51 |
* will be overwritten by a provided data.
|
|
52 |
*
|
|
53 |
* @param data Data to save
|
|
54 |
* @param dataKey Key indicating dataitem. If empty, all data will be overwritten by provided data
|
|
55 |
*/
|
|
56 |
void setActivityData(const QVariant& data, const QString& dataKey = QString(""));
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Get activity data. If dataKey is not defined, all activity data
|
|
60 |
* will be returned. If item corresponding provided dataKey is not found,
|
|
61 |
* method returns empty QVariant.
|
|
62 |
*
|
|
63 |
* @param dataKey Key indicating dataitem client wants. If empty, all data will be returned
|
|
64 |
*
|
|
65 |
* @return QVariant
|
|
66 |
*/
|
|
67 |
const QVariant getActivityData(const QString& dataKey = QString(""));
|
|
68 |
|
|
69 |
private:
|
|
70 |
|
|
71 |
/**
|
|
72 |
* private default contructor
|
|
73 |
*/
|
|
74 |
VideoActivityState();
|
|
75 |
|
|
76 |
/**
|
|
77 |
* copy contructor definition
|
|
78 |
*/
|
|
79 |
VideoActivityState(const VideoActivityState& other);
|
|
80 |
|
|
81 |
/**
|
|
82 |
* Private destructor.
|
|
83 |
*
|
|
84 |
*/
|
|
85 |
virtual ~VideoActivityState();
|
|
86 |
|
|
87 |
private:
|
|
88 |
|
|
89 |
/**
|
|
90 |
* locally saved activity data
|
|
91 |
*/
|
|
92 |
QHash<QString, QVariant> mActivityData;
|
|
93 |
|
|
94 |
};
|
|
95 |
|
|
96 |
#endif //__VIDEOACTIVITYSTATE_H__
|