|
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 MCatalogsBase implementation base class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCDOPERATION_H |
|
20 #define C_NCDOPERATION_H |
|
21 |
|
22 #include <e32cmn.h> |
|
23 #include <e32base.h> |
|
24 #include "catalogsbase.h" |
|
25 #include "ncdoperation.h" |
|
26 #include "ncdbaseoperationproxy.h" |
|
27 |
|
28 template< class T1 > |
|
29 class CNcdOperation : public CNcdBaseOperationProxy, public T1 |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * @see MNcdOperation::OperationStateL() |
|
35 */ |
|
36 MNcdOperation::TState OperationStateL() const |
|
37 { |
|
38 return DoOperationStateL(); |
|
39 } |
|
40 |
|
41 /** |
|
42 * @see MNcdOperation::StartOperationL() |
|
43 */ |
|
44 void StartOperationL() |
|
45 { |
|
46 DoStartOperationL(); |
|
47 } |
|
48 |
|
49 /** |
|
50 * @see MNcdOperation::CancelOperation() |
|
51 */ |
|
52 void CancelOperation() |
|
53 { |
|
54 DoCancelOperation(); |
|
55 } |
|
56 |
|
57 /** |
|
58 * @see MNcdOperation::Progress() |
|
59 */ |
|
60 TNcdProgress Progress() const |
|
61 { |
|
62 return DoProgress(); |
|
63 } |
|
64 |
|
65 /** |
|
66 * @see MNcdOperation::CompleteQuery() |
|
67 */ |
|
68 void CompleteQueryL( MNcdQuery& aQuery ) |
|
69 { |
|
70 DoCompleteQueryL( aQuery ); |
|
71 } |
|
72 |
|
73 /** |
|
74 * @see MNcdOperation::Node() |
|
75 */ |
|
76 MNcdNode* Node() |
|
77 { |
|
78 return DoNode(); |
|
79 } |
|
80 |
|
81 protected: |
|
82 /** |
|
83 * ConstructorL |
|
84 * |
|
85 * @note CNcdBaseOperationProxy::ConstructL also needs to be called when the child classes |
|
86 * initialize themselves in their own ConstructL functions. |
|
87 * |
|
88 * @see CNcdBaseOperationProxy::ConstructL |
|
89 */ |
|
90 CNcdOperation( MNcdClientLocalizer* aLocalizer ) : |
|
91 CNcdBaseOperationProxy( aLocalizer ) |
|
92 { |
|
93 } |
|
94 |
|
95 const TAny* QueryInterfaceL( TInt aInterfaceId ) const |
|
96 { |
|
97 const TAny* result = NULL; |
|
98 switch( aInterfaceId ) |
|
99 { |
|
100 case T1::KInterfaceUid: result = static_cast< const T1* >( this ); break; |
|
101 case MNcdOperation::KInterfaceUid: result = static_cast< const MNcdOperation* >( this ); break; |
|
102 case MCatalogsBase::KInterfaceUid: result = static_cast< const MCatalogsBase* >( this ); break; |
|
103 default: break; |
|
104 } |
|
105 |
|
106 if( result != NULL ) |
|
107 { |
|
108 AddRef(); |
|
109 } |
|
110 |
|
111 return result; |
|
112 } |
|
113 }; |
|
114 |
|
115 #endif // C_NCDOPERATION_H |