|
34
|
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 CMPXMedia for unit testing CVideocollectionClient
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
#ifndef CMPXMEDIA_H
|
|
|
19 |
#define CMPXMEDIA_H
|
|
|
20 |
|
|
|
21 |
// INCLUDES
|
|
|
22 |
#include <s32strm.h>
|
|
|
23 |
#include <mpxcmn.h>
|
|
|
24 |
#include <mpxattribute.h>
|
|
|
25 |
|
|
|
26 |
class CMPXMedia : public CBase
|
|
|
27 |
{
|
|
|
28 |
public:
|
|
|
29 |
|
|
|
30 |
/**
|
|
|
31 |
* Returns new object
|
|
|
32 |
*/
|
|
|
33 |
static CMPXMedia* NewL() {return new CMPXMedia();};
|
|
|
34 |
|
|
|
35 |
/**
|
|
|
36 |
* Constructor.
|
|
|
37 |
*/
|
|
|
38 |
CMPXMedia() {};
|
|
|
39 |
|
|
|
40 |
/**
|
|
|
41 |
* Destructor.
|
|
|
42 |
*/
|
|
|
43 |
~CMPXMedia() {};
|
|
|
44 |
|
|
|
45 |
public:
|
|
|
46 |
|
|
|
47 |
/**
|
|
|
48 |
* NOP
|
|
|
49 |
*/
|
|
|
50 |
template<typename T>
|
|
|
51 |
inline void SetTObjectValueL(const TMPXAttribute& /*aAttribute*/, T /*aValue*/)
|
|
|
52 |
{
|
|
|
53 |
// NOP
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
/**
|
|
|
57 |
* NOP
|
|
|
58 |
*/
|
|
|
59 |
template<typename C>
|
|
|
60 |
inline void SetCObjectValueL(const TMPXAttribute& /*aAttribute*/,C* /*aValue*/)
|
|
|
61 |
{
|
|
|
62 |
// NOP
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
/**
|
|
|
66 |
* NOP
|
|
|
67 |
*/
|
|
|
68 |
template<typename T>
|
|
|
69 |
inline T ValueTObjectL(const TMPXAttribute& /*aAttribute*/) const
|
|
|
70 |
{
|
|
|
71 |
if(mValueTObjectLeaves)
|
|
|
72 |
{
|
|
|
73 |
User::Leave(KErrGeneral);
|
|
|
74 |
}
|
|
|
75 |
return mIdFromValueTObject;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
/**
|
|
|
79 |
* NOP
|
|
|
80 |
*/
|
|
|
81 |
inline void SetTextValueL(const TMPXAttribute& /*aAttribute*/,
|
|
|
82 |
const TDesC& /*aValue*/)
|
|
|
83 |
{
|
|
|
84 |
// NOP
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
/**
|
|
|
88 |
* NOP
|
|
|
89 |
*/
|
|
|
90 |
inline bool IsSupported(const TMPXAttribute& /*aAttribute*/)
|
|
|
91 |
{
|
|
|
92 |
// NOP
|
|
|
93 |
return mIsSupported;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
static bool mIsSupported;
|
|
|
97 |
|
|
|
98 |
static bool mValueTObjectLeaves;
|
|
|
99 |
|
|
|
100 |
static TMPXItemId mIdFromValueTObject;
|
|
|
101 |
|
|
|
102 |
};
|
|
|
103 |
|
|
|
104 |
|
|
|
105 |
#endif // CMPXMEDIA_H
|