|
1 /* |
|
2 * Copyright (c) 2007-2008 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: CIAUpdatePurchaseOperation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IA_UPDATE_PURCHASE_OPERATION_H |
|
21 #define IA_UPDATE_PURCHASE_OPERATION_H |
|
22 |
|
23 |
|
24 #include <ncdpurchaseoperationobserver.h> |
|
25 |
|
26 #include "iaupdatenormalcontentoperation.h" |
|
27 |
|
28 class CIAUpdateNode; |
|
29 |
|
30 |
|
31 /** |
|
32 * CIAUpdatePurchaseOperation can handle purchasing of hidden |
|
33 * dependency nodes when one operation is requested |
|
34 * for one visible node. |
|
35 */ |
|
36 class CIAUpdatePurchaseOperation : public CIAUpdateNormalContentOperation, |
|
37 public MNcdPurchaseOperationObserver |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * @see CIAUpdatePurchaseOperation::CIAUpdatePurchaseOperation |
|
44 * @return CIAUpdatePurchaseOperation* Created object. |
|
45 * Ownership is transferred. |
|
46 */ |
|
47 static CIAUpdatePurchaseOperation* NewL( |
|
48 CIAUpdateNode& aNode, |
|
49 MIAUpdateContentOperationObserver& aObserver ); |
|
50 |
|
51 /** |
|
52 * @see CIAUpdatePurchaseOperation::NewL |
|
53 */ |
|
54 static CIAUpdatePurchaseOperation* NewLC( |
|
55 CIAUpdateNode& aNode, |
|
56 MIAUpdateContentOperationObserver& aObserver ); |
|
57 |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 virtual ~CIAUpdatePurchaseOperation(); |
|
62 |
|
63 |
|
64 public: // MNcdPurchaseOperationObserver |
|
65 |
|
66 /** |
|
67 * @see MNcdPurchaseOperationObserver::PurchaseProgress |
|
68 */ |
|
69 virtual void PurchaseProgress( |
|
70 MNcdPurchaseOperation& aOperation, TNcdProgress aProgress ); |
|
71 |
|
72 /** |
|
73 * @see MNcdPurchaseOperationObserver::QueryReceived |
|
74 */ |
|
75 virtual void QueryReceived( |
|
76 MNcdPurchaseOperation& aOperation, MNcdQuery* aQuery ); |
|
77 |
|
78 /** |
|
79 * @see MNcdPurchaseOperationObserver::OperationComplete |
|
80 */ |
|
81 virtual void OperationComplete( |
|
82 MNcdPurchaseOperation& aOperation, TInt aError ); |
|
83 |
|
84 |
|
85 protected: // CIAUpdateNormalContentOperation |
|
86 |
|
87 /** |
|
88 * @see CIAUpdateContentOperation::HandleContentL |
|
89 */ |
|
90 virtual MNcdOperation* HandleContentL(); |
|
91 |
|
92 |
|
93 private: |
|
94 |
|
95 // Prevent these if not implemented |
|
96 CIAUpdatePurchaseOperation( |
|
97 const CIAUpdatePurchaseOperation& aObject ); |
|
98 CIAUpdatePurchaseOperation& operator =( |
|
99 const CIAUpdatePurchaseOperation& aObject ); |
|
100 |
|
101 |
|
102 /** |
|
103 * @see CIAUpdateNormalContentOperation::CIAUpdateNormalContentOperation |
|
104 */ |
|
105 CIAUpdatePurchaseOperation( |
|
106 CIAUpdateNode& aNode, |
|
107 MIAUpdateContentOperationObserver& aObserver ); |
|
108 |
|
109 /** |
|
110 * ConstructL |
|
111 */ |
|
112 virtual void ConstructL(); |
|
113 |
|
114 |
|
115 /** |
|
116 * Starts the purchase operation for given node. |
|
117 * |
|
118 * @return MNcdOperation* Operation that is started. |
|
119 */ |
|
120 MNcdOperation* PurchaseL(); |
|
121 |
|
122 |
|
123 private: // data |
|
124 |
|
125 }; |
|
126 |
|
127 #endif // IA_UPDATE_PURCHASE_OPERATION_H |
|
128 |