|
1 /* |
|
2 * Copyright (c) 2008 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: Provides access to CParserProperty::iArrayOfParams |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPIMPARSERPROPERTY_H |
|
20 #define CPIMPARSERPROPERTY_H |
|
21 |
|
22 // INTERNAL INCLUDES |
|
23 #include "pimtypes.h" |
|
24 |
|
25 // EXTERNAL INCLUDES |
|
26 #include <vprop.h> |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Class deriving from CParserProperty to access its protected iArrayOfParams |
|
32 * member. This class also provides some additional features to match attributes |
|
33 */ |
|
34 NONSHARABLE_CLASS(CPIMParserProperty) : public CParserProperty |
|
35 { |
|
36 public: // New functions |
|
37 |
|
38 /** |
|
39 * Returns this property's array of parameters. |
|
40 */ |
|
41 const CArrayPtr<CParserParam>* ArrayOfParams() const; |
|
42 |
|
43 /** |
|
44 * Attributes |
|
45 * Returns PIM API sttributes which are included to this property |
|
46 * Matches all attributes from the array |
|
47 * |
|
48 * @return Matched attributes |
|
49 */ |
|
50 TPIMAttribute MatchAllAttributes() const; |
|
51 |
|
52 /** |
|
53 * Attributes |
|
54 * Returns PIM API sttributes which are included to this property |
|
55 * Matches home and work attributes from the array |
|
56 * |
|
57 * @return Matched attributes |
|
58 */ |
|
59 TPIMAttribute MatchHomeAndWorkAttributes() const; |
|
60 |
|
61 /** |
|
62 * ContainsParameter |
|
63 * Check if this property contains requested parameters |
|
64 * |
|
65 * @param aParam Parameter to find |
|
66 * @return ETrue if parameter is found, EFalse if not |
|
67 */ |
|
68 TBool ContainsParameter(const TDesC8& aParam) const; |
|
69 |
|
70 /** |
|
71 * MatchContactField |
|
72 * Matches PIM contact field to the property name |
|
73 * |
|
74 * @return PIM field matching the name of this property |
|
75 */ |
|
76 TPIMField MatchContactField() const; |
|
77 |
|
78 /** |
|
79 * MatchEventField |
|
80 * Matches PIM event field to the property name |
|
81 * |
|
82 * @return PIM field matching the name of this property |
|
83 */ |
|
84 TPIMField MatchEventField() const; |
|
85 |
|
86 /** |
|
87 * MatchToDoField |
|
88 * Matches PIM todo field to the property name |
|
89 * |
|
90 * @return PIM field matching the name of this property |
|
91 */ |
|
92 TPIMField MatchToDoField() const; |
|
93 |
|
94 private: // New functions |
|
95 |
|
96 /** |
|
97 * DoCompareNameAndValue |
|
98 * Compares the name and value fields of the parser parameter |
|
99 * |
|
100 * @param aParam Parser param from which the name and value are compared |
|
101 * @param aValue Value which will be compared |
|
102 * |
|
103 * @return ETrue if either the name or the value match with requested |
|
104 * value |
|
105 */ |
|
106 TBool DoCompareNameAndValue( |
|
107 const CParserParam& aParam, |
|
108 const TDesC8& aValue) const; |
|
109 |
|
110 private: |
|
111 |
|
112 /** |
|
113 * Constructor |
|
114 */ |
|
115 CPIMParserProperty(); // Not implemented (just suppress warnings) |
|
116 |
|
117 }; |
|
118 |
|
119 #endif // CPIMPARSERPROPERTY_H |
|
120 // End of File |