|
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: CIAUpdateSelfUpdateInitOperation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IA_UPDATE_SELF_UPDATE_INIT_OPERATION_H |
|
20 #define IA_UPDATE_SELF_UPDATE_INIT_OPERATION_H |
|
21 |
|
22 |
|
23 #include "iaupdatecontentoperation.h" |
|
24 #include "iaupdateselfupdaterinitobserver.h" |
|
25 |
|
26 class CIAUpdateNode; |
|
27 class CIAUpdateSelfUpdaterInitializer; |
|
28 |
|
29 |
|
30 /** |
|
31 * CIAUpdateSelfUpdateInitOperation |
|
32 * This operation does not install self updates itself but |
|
33 * initializes the data that will be used by the self updater program |
|
34 * that handles the actual installation. |
|
35 */ |
|
36 class CIAUpdateSelfUpdateInitOperation : public CIAUpdateContentOperation, |
|
37 public MIAUpdateSelfUpdaterInitObserver |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * @see CIAUpdateSelfUpdateInitOperation::CIAUpdateSelfUpdateInitOperation |
|
44 * @return CIAUpdateSelfUpdateInitOperation* Created object. |
|
45 * Ownership is transferred. |
|
46 */ |
|
47 static CIAUpdateSelfUpdateInitOperation* NewL( |
|
48 CIAUpdateNode& aNode, |
|
49 MIAUpdateContentOperationObserver& aObserver ); |
|
50 |
|
51 /** |
|
52 * @see CIAUpdateSelfUpdateInitOperation:: NewL |
|
53 */ |
|
54 static CIAUpdateSelfUpdateInitOperation* NewLC( |
|
55 CIAUpdateNode& aNode, |
|
56 MIAUpdateContentOperationObserver& aObserver ); |
|
57 |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 */ |
|
62 virtual ~CIAUpdateSelfUpdateInitOperation(); |
|
63 |
|
64 |
|
65 public: // MIAUpdateSelfUpdaterInitObserver |
|
66 |
|
67 /** |
|
68 * @see MIAUpdateSelfUpdaterInitObserver::SelfUpdateInitComplete |
|
69 */ |
|
70 virtual void SelfUpdateInitComplete( TInt aError ); |
|
71 |
|
72 |
|
73 protected: // CIAUpdateContentOperation |
|
74 |
|
75 /** |
|
76 * @see CIAUpdateContentOperation::StartOperationL |
|
77 */ |
|
78 virtual TBool StartOperationL(); |
|
79 |
|
80 /** |
|
81 * @see CIAUpdateContentOperation::CancelOperation |
|
82 */ |
|
83 virtual void CancelOperation(); |
|
84 |
|
85 |
|
86 private: |
|
87 |
|
88 // Prevent these if not implemented |
|
89 CIAUpdateSelfUpdateInitOperation( const CIAUpdateSelfUpdateInitOperation& aObject ); |
|
90 CIAUpdateSelfUpdateInitOperation& operator =( const CIAUpdateSelfUpdateInitOperation& aObject ); |
|
91 |
|
92 |
|
93 /** |
|
94 * @see CIAUpdateContentOperation::CIAUpdateContentOperation |
|
95 */ |
|
96 CIAUpdateSelfUpdateInitOperation( |
|
97 CIAUpdateNode& aNode, |
|
98 MIAUpdateContentOperationObserver& aObserver ); |
|
99 |
|
100 /** |
|
101 * 2nd. phase constructor |
|
102 */ |
|
103 void ConstructL(); |
|
104 |
|
105 |
|
106 private: // data |
|
107 |
|
108 // Initializer of the self updater. |
|
109 // Self update content file paths are needed to be set for the actual self |
|
110 // updater. |
|
111 CIAUpdateSelfUpdaterInitializer* iOperation; |
|
112 |
|
113 }; |
|
114 |
|
115 #endif // IA_UPDATE_SELF_UPDATE_INIT_OPERATION_H |
|
116 |