|
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 CNcdSearchRootNodeProxy class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCD_SEARCH_ROOT_NODE_PROXY |
|
20 #define C_NCD_SEARCH_ROOT_NODE_PROXY |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 #include "ncdsearchnodefolderproxy.h" |
|
26 |
|
27 |
|
28 class MNcdLoadNodeOperationObserver; |
|
29 class CNcdNodeIdentifier; |
|
30 |
|
31 |
|
32 /** |
|
33 * Node folder contains other nodes that may also be containers. |
|
34 * |
|
35 * @lib ?library |
|
36 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
37 */ |
|
38 class CNcdSearchRootNodeProxy: public CNcdSearchNodeFolderProxy |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * NewL |
|
45 * |
|
46 * @param aSession The session between the client proxy and the |
|
47 * corresponding server object. |
|
48 * @param aHandle The handle which identifies the server object |
|
49 * that this proxy uses. |
|
50 * @param aNodeManager The manager that creates the nodes and keeps |
|
51 * track of the existing nodes. |
|
52 * @param aOperationManager This manager is used to create operations |
|
53 * for the node. |
|
54 * @param aFavoriteManager This manager is used to add or remove favorite nodes. |
|
55 * @return CNcdSearchRootNodeProxy* Pointer to the created object |
|
56 * of this class. |
|
57 */ |
|
58 static CNcdSearchRootNodeProxy* NewL( MCatalogsClientServer& aSession, |
|
59 TInt aHandle, |
|
60 CNcdNodeManagerProxy& aNodeManager, |
|
61 CNcdOperationManagerProxy& aOperationManager, |
|
62 CNcdFavoriteManagerProxy& aFavoriteManager ); |
|
63 |
|
64 /** |
|
65 * NewL |
|
66 * |
|
67 * @param aSession The session between the client proxy and the |
|
68 * corresponding server object. |
|
69 * @param aHandle The handle which identifies the server object |
|
70 * that this proxy uses. |
|
71 * @param aNodeManager The manager that creates the nodes and keeps |
|
72 * track of the existing nodes. |
|
73 * @param aOperationManager This manager is used to create operations |
|
74 * for the node. |
|
75 * @param aFavoriteManager This manager is used to add or remove favorite nodes. |
|
76 * @return CNcdSearchRootNodeProxy* Pointer to the created object |
|
77 * of this class. |
|
78 */ |
|
79 static CNcdSearchRootNodeProxy* NewLC( MCatalogsClientServer& aSession, |
|
80 TInt aHandle, |
|
81 CNcdNodeManagerProxy& aNodeManager, |
|
82 CNcdOperationManagerProxy& aOperationManager, |
|
83 CNcdFavoriteManagerProxy& aFavoriteManager ); |
|
84 |
|
85 |
|
86 /** |
|
87 * Destructor |
|
88 * |
|
89 * @note Usually Release function should be used instead of |
|
90 * directly calling delete for this class object. |
|
91 * |
|
92 */ |
|
93 virtual ~CNcdSearchRootNodeProxy(); |
|
94 |
|
95 |
|
96 |
|
97 public: // CNcdNodeProxy |
|
98 |
|
99 /** |
|
100 * @see CNcdNodeProxy::State |
|
101 */ |
|
102 virtual TState State() const; |
|
103 |
|
104 /** |
|
105 * @see CNcdNodeProxy::LoadL |
|
106 */ |
|
107 virtual MNcdLoadNodeOperation* LoadL( MNcdLoadNodeOperationObserver& aObserver ); |
|
108 |
|
109 public: // MNcdNodeContainer |
|
110 |
|
111 /** |
|
112 * @see MNcdNodeContainer::ChildCount |
|
113 */ |
|
114 virtual TInt ChildCount() const; |
|
115 |
|
116 /** |
|
117 * @see MNcdNodeContainer:: ChildL |
|
118 */ |
|
119 virtual MNcdNode* ChildL( TInt aIndex ); |
|
120 |
|
121 /** |
|
122 * @see MNcdNodeContainer::LoadChildrenL |
|
123 */ |
|
124 virtual MNcdLoadNodeOperation* LoadChildrenL( |
|
125 TInt aIndex, TInt aSize, TNcdChildLoadMode aMode, |
|
126 MNcdLoadNodeOperationObserver& aObserver ); |
|
127 |
|
128 public:// MNcdLoadNodeOperationObserver |
|
129 |
|
130 /** |
|
131 * @see MNcdLoadNodeOperationObserver::OperationComplete |
|
132 * Calls the internalize function to update the node data. |
|
133 */ |
|
134 virtual void OperationComplete( MNcdLoadNodeOperation& aOperation, |
|
135 TInt aError ); |
|
136 |
|
137 protected: |
|
138 |
|
139 /** |
|
140 * Constructor |
|
141 * |
|
142 * @param aSession The session between the client proxy and the |
|
143 * corresponding server object. |
|
144 * @param aHandle The handle which identifies the server object |
|
145 * that this proxy uses. |
|
146 * @param aNodeManager The manager that creates the nodes and keeps |
|
147 * track of the existing nodes. |
|
148 * @param aOperationManager This manager is used to create operations |
|
149 * for the node. |
|
150 * @param aFavoriteManager This manager is used to add or remove favorite nodes. |
|
151 */ |
|
152 CNcdSearchRootNodeProxy( MCatalogsClientServer& aSession, |
|
153 TInt aHandle, |
|
154 CNcdNodeManagerProxy& aNodeManager, |
|
155 CNcdOperationManagerProxy& aOperationManager, |
|
156 CNcdFavoriteManagerProxy& aFavoriteManager ); |
|
157 |
|
158 /** |
|
159 * ConstructL |
|
160 */ |
|
161 virtual void ConstructL(); |
|
162 |
|
163 |
|
164 private: |
|
165 // Prevent if not implemented |
|
166 CNcdSearchRootNodeProxy( const CNcdSearchRootNodeProxy& aObject ); |
|
167 CNcdSearchRootNodeProxy& operator =( const CNcdSearchRootNodeProxy& aObject ); |
|
168 |
|
169 |
|
170 private: // data |
|
171 |
|
172 }; |
|
173 |
|
174 |
|
175 #endif // C_NCD_SEARCH_ROOT_NODE_PROXY |