|
1 /* |
|
2 * Copyright (c) 2005 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: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef C_SEN_ATTRIBUTES_H |
|
26 #define C_SEN_ATTRIBUTES_H |
|
27 |
|
28 // INCLUDES |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <flogger.h> |
|
32 |
|
33 #include "senattribute.h" |
|
34 |
|
35 #include "senpointermap.h" |
|
36 |
|
37 // CONSTANTS |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 |
|
41 // CLASS DEFINITIONS |
|
42 |
|
43 class CSenAttribute; |
|
44 |
|
45 /** |
|
46 * @author lewontin |
|
47 * A list of CSenAttribute objects. |
|
48 * Each supports multiple values (for example, multiple groups). |
|
49 */ |
|
50 class CSenAttributes : public CBase |
|
51 { |
|
52 |
|
53 public: |
|
54 |
|
55 // Constructors and Destructors |
|
56 |
|
57 IMPORT_C static CSenAttributes* NewL(); |
|
58 |
|
59 IMPORT_C static CSenAttributes* NewLC(); |
|
60 |
|
61 |
|
62 IMPORT_C static CSenAttributes* NewL(const CSenAttributes& aAttributes); |
|
63 |
|
64 IMPORT_C static CSenAttributes* NewLC(const CSenAttributes& aAttributes); |
|
65 |
|
66 |
|
67 IMPORT_C virtual ~CSenAttributes(); |
|
68 |
|
69 // New methods: |
|
70 |
|
71 IMPORT_C void AddAttributeL(const CSenAttribute& aValue); //codescannerwarnings |
|
72 |
|
73 |
|
74 IMPORT_C const CSenAttribute& GetAttribute(const TDesC8& aName) const; |
|
75 |
|
76 |
|
77 // Number of attributes |
|
78 IMPORT_C TInt Count() const; |
|
79 |
|
80 |
|
81 // Attribute equality condition test |
|
82 IMPORT_C TBool Equals(const CSenAttribute& aAttr) const; |
|
83 |
|
84 |
|
85 // Match any attribute |
|
86 IMPORT_C TBool MatchAny(const CSenAttributes& aAttrs); |
|
87 |
|
88 |
|
89 protected: |
|
90 void BaseConstructL(); |
|
91 void BaseConstructL(const CSenAttributes& aAttributes); |
|
92 |
|
93 |
|
94 |
|
95 private: |
|
96 |
|
97 CSenAttributes(); |
|
98 |
|
99 // Returns attribute at index position |
|
100 const CSenAttribute& AttributeAt(TInt aIndex) const; |
|
101 |
|
102 |
|
103 /** |
|
104 * File logger. |
|
105 * |
|
106 */ |
|
107 //RFileLogger* Log() const; |
|
108 |
|
109 |
|
110 private: // Data |
|
111 |
|
112 RSenPointerMap<TDesC8, CSenAttribute> iAttrList; |
|
113 |
|
114 //RFileLogger iLog; |
|
115 |
|
116 }; |
|
117 |
|
118 #endif // C_SEN_ATTRIBUTES_H |
|
119 |