|
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 CNcdBundleFolderProxy class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCDBUNDLEFOLDERPROXY_H |
|
20 #define C_NCDBUNDLEFOLDERPROXY_H |
|
21 |
|
22 #include "ncdparentoftransparentnodeproxy.h" |
|
23 #include "ncdbundle.h" |
|
24 |
|
25 |
|
26 /** |
|
27 * Node folder contains other nodes that may also be containers. |
|
28 * Root may also contain children of the transparent child folder. |
|
29 * |
|
30 * @lib ?library |
|
31 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
32 */ |
|
33 class CNcdBundleFolderProxy : public CNcdParentOfTransparentNodeProxy, |
|
34 public MNcdBundle |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * NewL |
|
39 * |
|
40 * @param aSession The session between the client proxy and the |
|
41 * corresponding server object. |
|
42 * @param aHandle The handle which identifies the server object |
|
43 * that this proxy uses. |
|
44 * @param aNodeManager The manager that creates the nodes and keeps |
|
45 * track of the existing nodes. |
|
46 * @param aOperationManager This manager is used to create operations |
|
47 * for the node. |
|
48 * @param aFavoriteManager This manager is used to add or remove favorite nodes. |
|
49 * @return CNcdBundleFolderProxy* Pointer to the created object |
|
50 * of this class. |
|
51 */ |
|
52 static CNcdBundleFolderProxy* NewL( MCatalogsClientServer& aSession, |
|
53 TInt aHandle, |
|
54 CNcdNodeManagerProxy& aNodeManager, |
|
55 CNcdOperationManagerProxy& aOperationManager, |
|
56 CNcdFavoriteManagerProxy& aFavoriteManager ); |
|
57 |
|
58 /** |
|
59 * NewL |
|
60 * |
|
61 * @param aSession The session between the client proxy and the |
|
62 * corresponding server object. |
|
63 * @param aHandle The handle which identifies the server object |
|
64 * that this proxy uses. |
|
65 * @param aNodeManager The manager that creates the nodes and keeps |
|
66 * track of the existing nodes. |
|
67 * @param aOperationManager This manager is used to create operations |
|
68 * for the node. |
|
69 * @param aFavoriteManager This manager is used to add or remove favorite nodes. |
|
70 * @return CNcdBundleFolderProxy* Pointer to the created object |
|
71 * of this class. |
|
72 */ |
|
73 static CNcdBundleFolderProxy* NewLC( MCatalogsClientServer& aSession, |
|
74 TInt aHandle, |
|
75 CNcdNodeManagerProxy& aNodeManager, |
|
76 CNcdOperationManagerProxy& aOperationManager, |
|
77 CNcdFavoriteManagerProxy& aFavoriteManager ); |
|
78 |
|
79 virtual ~CNcdBundleFolderProxy(); |
|
80 |
|
81 |
|
82 public: // MNcdNodeContainer |
|
83 |
|
84 /** |
|
85 * @see MNcdNodeContainer::ChildCount |
|
86 */ |
|
87 virtual TInt ChildCount() const; |
|
88 |
|
89 /** |
|
90 * @see MNcdNodeContainer:: ChildL |
|
91 */ |
|
92 virtual MNcdNode* ChildL( TInt aIndex ); |
|
93 |
|
94 /** |
|
95 * @see MNcdNodeContainer::LoadChildrenL |
|
96 */ |
|
97 virtual MNcdLoadNodeOperation* LoadChildrenL( TInt aIndex, |
|
98 TInt aSize, |
|
99 TNcdChildLoadMode aMode, |
|
100 MNcdLoadNodeOperationObserver& aObserver ); |
|
101 |
|
102 |
|
103 public: // MNcdNode |
|
104 |
|
105 /** |
|
106 * @see MNcdNode::State |
|
107 */ |
|
108 virtual TState State() const; |
|
109 |
|
110 /** |
|
111 * @see MNcdNode::LoadL |
|
112 */ |
|
113 virtual MNcdLoadNodeOperation* LoadL( MNcdLoadNodeOperationObserver& aObserver ); |
|
114 |
|
115 |
|
116 public: // MNcdBundle |
|
117 |
|
118 virtual const TDesC& ViewType() const; |
|
119 |
|
120 |
|
121 public: // CNcdNodeProxy |
|
122 |
|
123 /** |
|
124 * This function calls additional folder specific |
|
125 * internalization functions that have not been called |
|
126 * from the CNcdNodeProxy::InternalizeL. |
|
127 * |
|
128 * @see CNcdNodeProxy::InternalizeL |
|
129 */ |
|
130 virtual void InternalizeL(); |
|
131 |
|
132 |
|
133 protected: // CNcdNodeProxy |
|
134 |
|
135 /** |
|
136 * This function is called from the CNcdNodeProxy::InternalizeL |
|
137 * |
|
138 * @see CNcdNodeProxy::InternalizeNodeDataL |
|
139 */ |
|
140 virtual void InternalizeNodeDataL( RReadStream& aStream ); |
|
141 |
|
142 /** |
|
143 * This function is called from the CNcdNodeProxy::InternalizeL |
|
144 * |
|
145 * @see CNcdNodeProxy::InternalizeNodeLinkDataL |
|
146 */ |
|
147 virtual void InternalizeNodeLinkDataL( RReadStream& aStream ); |
|
148 |
|
149 |
|
150 protected: |
|
151 |
|
152 /** |
|
153 * Constructor |
|
154 * |
|
155 * @param aSession The session between the client proxy and the |
|
156 * corresponding server object. |
|
157 * @param aHandle The handle which identifies the server object |
|
158 * that this proxy uses. |
|
159 * @param aNodeManager The manager that creates the nodes and keeps |
|
160 * track of the existing nodes. |
|
161 * @param aOperationManager This manager is used to create operations |
|
162 * for the node. |
|
163 * @param aFavoriteManager This manager is used to add or remove favorite nodes. |
|
164 */ |
|
165 CNcdBundleFolderProxy( MCatalogsClientServer& aSession, |
|
166 TInt aHandle, |
|
167 CNcdNodeManagerProxy& aNodeManager, |
|
168 CNcdOperationManagerProxy& aOperationManager, |
|
169 CNcdFavoriteManagerProxy& aFavoriteManager ); |
|
170 |
|
171 /** |
|
172 * Second phase constructor. |
|
173 */ |
|
174 void ConstructL(); |
|
175 |
|
176 /** |
|
177 * @see CNcdNodeFolder::IsSearchSupportedL |
|
178 */ |
|
179 virtual TBool IsSearchSupportedL(); |
|
180 |
|
181 private: |
|
182 |
|
183 // Prevent these if not implemented |
|
184 CNcdBundleFolderProxy( const CNcdBundleFolderProxy& aObject ); |
|
185 CNcdBundleFolderProxy& operator =( const CNcdBundleFolderProxy& aObject ); |
|
186 |
|
187 |
|
188 private: // data |
|
189 |
|
190 HBufC* iViewType; |
|
191 }; |
|
192 |
|
193 #endif |