|
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 CNcdNodeSearch class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCD_NODE_SEARCH_IMPL_H |
|
20 #define C_NCD_NODE_SEARCH_IMPL_H |
|
21 |
|
22 |
|
23 // For the streams |
|
24 #include <s32mem.h> |
|
25 |
|
26 #include "catalogsinterfacebase.h" |
|
27 #include "ncdnodesearch.h" |
|
28 |
|
29 class CNcdNodeProxy; |
|
30 class CNcdOperationManagerProxy; |
|
31 |
|
32 |
|
33 /** |
|
34 * This class implements the functionality for the |
|
35 * MNcdNodeSearch interfaces. The interface is provided for |
|
36 * API users. |
|
37 * |
|
38 * @since S60 v3.2 |
|
39 */ |
|
40 class CNcdNodeSearch : public CCatalogsInterfaceBase, |
|
41 public MNcdNodeSearch |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * @param aNode Owns and uses the information of this class object. |
|
48 * The node also keeps track of the refence counts of its objects. |
|
49 * And handles the deletion of these objects when the total reference |
|
50 * count reaches zero. |
|
51 * @param aOperationManager This class uses operation manager to get the |
|
52 * operations for certain tasks. |
|
53 * @return CNcdNodeSearch* Pointer to the created object |
|
54 * of this class. |
|
55 */ |
|
56 static CNcdNodeSearch* NewL( |
|
57 CNcdNodeProxy& aNode, |
|
58 CNcdOperationManagerProxy& aOperationManager ); |
|
59 |
|
60 /** |
|
61 * @param aNode Owns and uses the information of this proxy. |
|
62 * The node also keeps track of the refence counts of its objects. |
|
63 * And handles the deletion of these objects when the total reference |
|
64 * count reaches zero. |
|
65 * @param aOperationManager This class uses operation manager to get the |
|
66 * operations for certain tasks. |
|
67 * @return CNcdNodeSearch* Pointer to the created object |
|
68 * of this class. |
|
69 */ |
|
70 static CNcdNodeSearch* NewLC( |
|
71 CNcdNodeProxy& aNode, |
|
72 CNcdOperationManagerProxy& aOperationManager ); |
|
73 |
|
74 |
|
75 /** |
|
76 * Destructor. |
|
77 * The destructor is set public. So, the node that owns the Search may |
|
78 * delete it directly when the reference count of the node reaches zero |
|
79 * and the destructor of the node is called. |
|
80 */ |
|
81 virtual ~CNcdNodeSearch(); |
|
82 |
|
83 |
|
84 public: // MNcdNodeSearch |
|
85 |
|
86 /** |
|
87 * @see MNcdNodeSearch::SearchL |
|
88 */ |
|
89 virtual MNcdSearchOperation* SearchL( MNcdLoadNodeOperationObserver& aObserver, |
|
90 MNcdSearchFilter& aSearchFilter ); |
|
91 |
|
92 |
|
93 protected: |
|
94 |
|
95 /** |
|
96 * Constructor |
|
97 * |
|
98 * @param aNode Owns and uses the information of this class object. |
|
99 * The node also keeps track of the refence counts of its objects. |
|
100 * And handles the deletion of these objects when the total reference |
|
101 * count reaches zero. |
|
102 * @param aOperationManager This class uses operation manager to get the |
|
103 * operations for certain tasks. |
|
104 * @return CNcdNodeSearch* Pointer to the created object |
|
105 * of this class. |
|
106 */ |
|
107 CNcdNodeSearch( |
|
108 CNcdNodeProxy& aNode, |
|
109 CNcdOperationManagerProxy& aOperationManager ); |
|
110 |
|
111 /** |
|
112 * ConstructL |
|
113 */ |
|
114 virtual void ConstructL(); |
|
115 |
|
116 |
|
117 /** |
|
118 * @return CNcdOperationManagerProxy& Gives the operation manager proxy. |
|
119 * Operation manager may be asked to create new operations for this class |
|
120 * object. |
|
121 */ |
|
122 CNcdOperationManagerProxy& OperationManager() const; |
|
123 |
|
124 |
|
125 /** |
|
126 * @return CNcdNodeProxy& Gives the node proxy that owns this class object. |
|
127 * This node may be given for the operations. So, the operations may |
|
128 * inform the node about the progress of or about the completion of the |
|
129 * operation. |
|
130 */ |
|
131 CNcdNodeProxy& Node() const; |
|
132 |
|
133 |
|
134 private: |
|
135 |
|
136 // Prevent if not implemented |
|
137 CNcdNodeSearch( const CNcdNodeSearch& aObject ); |
|
138 CNcdNodeSearch& operator =( const CNcdNodeSearch& aObject ); |
|
139 |
|
140 |
|
141 private: // data |
|
142 |
|
143 CNcdNodeProxy& iNode; |
|
144 CNcdOperationManagerProxy& iOperationManager; |
|
145 |
|
146 }; |
|
147 |
|
148 |
|
149 #endif // C_NCD_NODE_SEARCH_IMPL_H |