|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Field Versit Property |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include "TVPbkFieldVersitProperty.h" |
|
21 #include <barsread.h> |
|
22 |
|
23 EXPORT_C TVPbkFieldVersitProperty::TVPbkFieldVersitProperty() : |
|
24 iName(EVPbkVersitNameNone), |
|
25 iSubField(EVPbkVersitSubFieldNone), |
|
26 iExtension(NULL) |
|
27 { |
|
28 } |
|
29 |
|
30 EXPORT_C TVPbkFieldVersitProperty::TVPbkFieldVersitProperty |
|
31 (TResourceReader& aResReader) : |
|
32 iName(static_cast<TVPbkFieldTypeName>(aResReader.ReadUint8())), |
|
33 iSubField(static_cast<TVPbkSubFieldType>(aResReader.ReadUint8())), |
|
34 iParameters(aResReader), |
|
35 iExtensionName(aResReader.ReadTPtrC8()) |
|
36 { |
|
37 } |
|
38 |
|
39 EXPORT_C void TVPbkFieldVersitProperty::ReadFromResource |
|
40 (TResourceReader& aResReader) |
|
41 { |
|
42 iName = static_cast<TVPbkFieldTypeName>(aResReader.ReadUint8()); |
|
43 iSubField = static_cast<TVPbkSubFieldType>(aResReader.ReadUint8()); |
|
44 iParameters.ReadFromResource(aResReader); |
|
45 iExtensionName.Set(aResReader.ReadTPtrC8()); |
|
46 } |
|
47 |
|
48 EXPORT_C TBool TVPbkFieldVersitProperty::Matches(const TVPbkFieldVersitProperty& aOther) const |
|
49 { |
|
50 return ( |
|
51 iName == aOther.iName && |
|
52 iSubField == aOther.iSubField && |
|
53 aOther.iParameters.ContainsAll(iParameters) && |
|
54 (iName != EVPbkVersitNameX || |
|
55 iExtensionName.CompareF(aOther.iExtensionName) == 0) ); |
|
56 } |
|
57 |