|
1 /* |
|
2 * Copyright (c) 2006 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: Contains CNcdSearchNodeFolder class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_SEARCH_NODE_FOLDER_H |
|
20 #define NCD_SEARCH_NODE_FOLDER_H |
|
21 |
|
22 |
|
23 #include <e32cmn.h> |
|
24 |
|
25 #include "ncdparentoftransparentnode.h" |
|
26 //#include "ncdsearchnode.h" |
|
27 |
|
28 class CNcdSearchFilter; |
|
29 |
|
30 /** |
|
31 * This class provides search foler specific functionality for the nodes. |
|
32 */ |
|
33 class CNcdSearchNodeFolder : public CNcdParentOfTransparentNode |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * NewL |
|
40 * |
|
41 * Note, that node link contains the metadata id. |
|
42 * Because node link contains metadata id, set meta data function |
|
43 * is not provided in this class. |
|
44 * @return CNcdSearchNodeFolder* Pointer to the created object |
|
45 * of this class. |
|
46 */ |
|
47 static CNcdSearchNodeFolder* NewL( CNcdNodeManager& aNodeManager, |
|
48 const CNcdNodeIdentifier& aIdentifier, |
|
49 TBool aIsTransparent = EFalse ); |
|
50 |
|
51 /** |
|
52 * @see CNcdSearchNodeFolder::NewLC |
|
53 */ |
|
54 static CNcdSearchNodeFolder* NewLC( CNcdNodeManager& aNodeManager, |
|
55 const CNcdNodeIdentifier& aIdentifier, |
|
56 TBool aIsTransparent = EFalse ); |
|
57 |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 */ |
|
62 virtual ~CNcdSearchNodeFolder(); |
|
63 |
|
64 |
|
65 /** |
|
66 * Setter for search filter |
|
67 * |
|
68 * @param |
|
69 */ |
|
70 void SetSearchFilterL( const CNcdSearchFilter& aFilter ); |
|
71 |
|
72 /** |
|
73 * Setter for origin identifier. |
|
74 */ |
|
75 void SetOriginIdentifierL( const CNcdNodeIdentifier& aOriginIdentifier ); |
|
76 |
|
77 /** |
|
78 * Getter for origin identifier. |
|
79 */ |
|
80 const CNcdNodeIdentifier& OriginIdentifierL() const; |
|
81 |
|
82 /** |
|
83 * ETrue if transparent. |
|
84 */ |
|
85 TBool IsTransparent() const; |
|
86 |
|
87 /** |
|
88 * Setter for transparent flag. |
|
89 */ |
|
90 void SetTransparent( TBool aIsTransparent ); |
|
91 |
|
92 public: // CNcdNode |
|
93 |
|
94 /** |
|
95 * @see CNcdNode::ExternalizeL |
|
96 */ |
|
97 virtual void ExternalizeL( RWriteStream& aStream ); |
|
98 |
|
99 |
|
100 /** |
|
101 * @see CNcdNode::InternalizeL |
|
102 */ |
|
103 virtual void InternalizeL( RReadStream& aStream ); |
|
104 |
|
105 |
|
106 protected: |
|
107 |
|
108 /** |
|
109 * @see CNcdNodeFolder::CNcdNodeFolder |
|
110 * |
|
111 */ |
|
112 CNcdSearchNodeFolder( CNcdNodeManager& aNodeManager, |
|
113 NcdNodeClassIds::TNcdNodeClassId aNodeClassId = NcdNodeClassIds::ENcdSearchFolderNodeClassId, |
|
114 TBool aIsTransparent = EFalse ); |
|
115 |
|
116 /** |
|
117 * @see CNcdNodeFolder::ConstructL |
|
118 */ |
|
119 virtual void ConstructL( const CNcdNodeIdentifier& aIdentifier ); |
|
120 |
|
121 /** |
|
122 * @see CNcdNode::ExternalizeDataForRequestL |
|
123 */ |
|
124 virtual void ExternalizeDataForRequestL( RWriteStream& aStream ) const; |
|
125 |
|
126 |
|
127 private: |
|
128 |
|
129 // Prevent these two if they are not implemented |
|
130 CNcdSearchNodeFolder( const CNcdSearchNodeFolder& aObject ); |
|
131 CNcdSearchNodeFolder& operator =( const CNcdSearchNodeFolder& aObject ); |
|
132 |
|
133 |
|
134 private: // data |
|
135 |
|
136 /** |
|
137 * Search filter needs to be stored so that it can be used later when |
|
138 * the children of this folder are loaded. |
|
139 */ |
|
140 CNcdSearchFilter* iSearchFilter; |
|
141 |
|
142 /** |
|
143 * This identifies the origin of this search folder, i.e. the original |
|
144 * node that the search was started from (search node ids are different |
|
145 * because search nodes are added under search root node). |
|
146 * |
|
147 * This identifier can be used e.g. to get the correct access point for |
|
148 * this node. |
|
149 */ |
|
150 CNcdNodeIdentifier* iOriginIdentifier; |
|
151 |
|
152 |
|
153 /** |
|
154 * ETrue if transparent. |
|
155 */ |
|
156 TBool iIsTransparent; |
|
157 |
|
158 }; |
|
159 |
|
160 |
|
161 #endif // NCD_SEARCH_NODE_FOLDER_H |