|
42
|
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 mpx attribute classes for testing CVideoCollectionClient
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
#ifndef MPXATTRIBUTE_H
|
|
|
20 |
#define MPXATTRIBUTE_H
|
|
|
21 |
|
|
|
22 |
#include <s32strm.h>
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
enum TMPXAttributeType
|
|
|
26 |
{
|
|
|
27 |
EMPXTypeUnknown,
|
|
|
28 |
EMPXTypeTInt,
|
|
|
29 |
EMPXTypeText,
|
|
|
30 |
EMPXTypeTObject,
|
|
|
31 |
EMPXTypeCObject,
|
|
|
32 |
EMPXTypeError
|
|
|
33 |
};
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
class TMPXAttributeData
|
|
|
38 |
{
|
|
|
39 |
public:
|
|
|
40 |
/**
|
|
|
41 |
* Overloadded operator&.
|
|
|
42 |
*/
|
|
|
43 |
TBool operator& (const TMPXAttributeData& aData) const
|
|
|
44 |
{
|
|
|
45 |
return iAttributeId & aData.iAttributeId;
|
|
|
46 |
}
|
|
|
47 |
/**
|
|
|
48 |
* Overloadded operator&.
|
|
|
49 |
*
|
|
|
50 |
*/
|
|
|
51 |
TBool operator& (TUint& aData) const
|
|
|
52 |
{
|
|
|
53 |
return iAttributeId & aData;
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
/**
|
|
|
57 |
* Overloadded operator|.
|
|
|
58 |
*
|
|
|
59 |
*/
|
|
|
60 |
TMPXAttributeData operator| (const TMPXAttributeData& aData) const
|
|
|
61 |
{
|
|
|
62 |
TMPXAttributeData ret={iContentId, iAttributeId | aData.iAttributeId};
|
|
|
63 |
return ret;
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
public:
|
|
|
67 |
TInt iContentId;
|
|
|
68 |
TUint iAttributeId;
|
|
|
69 |
};
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
class TMPXAttribute
|
|
|
73 |
{
|
|
|
74 |
public: // Constructors and destructor
|
|
|
75 |
/**
|
|
|
76 |
* contructor
|
|
|
77 |
*/
|
|
|
78 |
TMPXAttribute()
|
|
|
79 |
{
|
|
|
80 |
iData.iContentId=0;
|
|
|
81 |
iData.iAttributeId=0;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
/**
|
|
|
85 |
* contructor
|
|
|
86 |
*/
|
|
|
87 |
TMPXAttribute(TInt aContentId, TUint aAttributeId)
|
|
|
88 |
{
|
|
|
89 |
iData.iContentId=aContentId;
|
|
|
90 |
iData.iAttributeId=aAttributeId;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
/**
|
|
|
94 |
* copy contructor
|
|
|
95 |
*/
|
|
|
96 |
TMPXAttribute(const TMPXAttribute& aId)
|
|
|
97 |
{
|
|
|
98 |
iData.iContentId=aId.ContentId();
|
|
|
99 |
iData.iAttributeId=aId.AttributeId();
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
/**
|
|
|
103 |
* Copy constructor.
|
|
|
104 |
*/
|
|
|
105 |
TMPXAttribute(const TMPXAttributeData& aData) : iData(aData)
|
|
|
106 |
{
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
public:
|
|
|
110 |
|
|
|
111 |
/**
|
|
|
112 |
* Overloaded assignment operator.
|
|
|
113 |
*/
|
|
|
114 |
TMPXAttribute& operator=(const TMPXAttribute& aId)
|
|
|
115 |
{
|
|
|
116 |
if (this != &aId)
|
|
|
117 |
{
|
|
|
118 |
iData.iContentId = aId.ContentId();
|
|
|
119 |
iData.iAttributeId = aId.AttributeId();
|
|
|
120 |
}
|
|
|
121 |
return *this;
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
/**
|
|
|
125 |
* Overloaded equal operator.
|
|
|
126 |
*/
|
|
|
127 |
TBool operator==(const TMPXAttribute& aId) const
|
|
|
128 |
{
|
|
|
129 |
TBool ret = EFalse;
|
|
|
130 |
if (iData.iAttributeId == aId.iData.iAttributeId &&
|
|
|
131 |
iData.iContentId == aId.iData.iContentId)
|
|
|
132 |
{
|
|
|
133 |
ret = ETrue;
|
|
|
134 |
}
|
|
|
135 |
return ret;
|
|
|
136 |
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
public:
|
|
|
140 |
|
|
|
141 |
/**
|
|
|
142 |
* Get content id.
|
|
|
143 |
*/
|
|
|
144 |
TInt ContentId() const {return iData.iContentId;}
|
|
|
145 |
|
|
|
146 |
/**
|
|
|
147 |
* Attribute id.
|
|
|
148 |
*/
|
|
|
149 |
TUint AttributeId() const {return iData.iAttributeId;}
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
private: // Data
|
|
|
153 |
TMPXAttributeData iData;
|
|
|
154 |
};
|
|
|
155 |
|
|
|
156 |
const TMPXAttributeData KMPXMediaNullAttribute={0x0,0x00};
|
|
|
157 |
|
|
|
158 |
#endif // MPXATTRIBUTE_H
|
|
|
159 |
|
|
|
160 |
// End of File
|