|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCDREPORTINSTALL_H |
|
20 #define C_NCDREPORTINSTALL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "ncdreportdefines.h" |
|
25 #include "ncdreport.h" |
|
26 |
|
27 class CNcdReportManager; |
|
28 class MCatalogsHttpOperation; |
|
29 class CNcdNodeIdentifier; |
|
30 |
|
31 /** |
|
32 * Class for storing download's report information |
|
33 */ |
|
34 class CNcdReportInstall : public CNcdReport |
|
35 { |
|
36 public: |
|
37 |
|
38 static CNcdReportInstall* NewLC( |
|
39 CNcdReportManager& aReportManager, |
|
40 const TDesC& aContentIdentifier, |
|
41 const CNcdNodeIdentifier& aMetadataId, |
|
42 const TNcdReportStatusInfo& aStatus, |
|
43 const TDesC& aReportUri, |
|
44 const TDesC& aReportNamespace ); |
|
45 |
|
46 static CNcdReportInstall* NewLC( |
|
47 CNcdReportManager& aReportManager, |
|
48 RReadStream& aStream ); |
|
49 |
|
50 virtual ~CNcdReportInstall(); |
|
51 |
|
52 public: // From CNcdReport |
|
53 |
|
54 virtual TInt SetStatus( const TNcdReportStatusInfo& aStatus ); |
|
55 |
|
56 virtual TBool CanBundle() const; |
|
57 |
|
58 /** |
|
59 * Used to add report data to a bundle |
|
60 */ |
|
61 virtual void AddReportDataL( CNcdRequestInstallation& aRequest ) const; |
|
62 |
|
63 virtual TBool IsSendable() const; |
|
64 |
|
65 /** |
|
66 * Return true when the report can be removed |
|
67 */ |
|
68 virtual TBool CanBeRemoved() const; |
|
69 |
|
70 virtual HBufC8* CreateReportL() const; |
|
71 |
|
72 virtual void UpdateTransactionConfigL( |
|
73 MCatalogsHttpOperation& aTransaction ); |
|
74 |
|
75 virtual TBool StatusIsFinal() const; |
|
76 |
|
77 protected: |
|
78 |
|
79 CNcdReportInstall( |
|
80 const TNcdReportStatusInfo& aStatus, |
|
81 CNcdReportManager& aReportManager ); |
|
82 |
|
83 void ConstructL( |
|
84 const TDesC& aContentIdentifier, |
|
85 const CNcdNodeIdentifier& aMetadataId, |
|
86 const TDesC& aReportUri, |
|
87 const TDesC& aReportNamespace ); |
|
88 |
|
89 TInt ReportStatusToInstallReportStatus( const TNcdReportStatusInfo& aStatus ) const; |
|
90 |
|
91 }; |
|
92 |
|
93 |
|
94 |
|
95 #endif // C_NCDREPORTINSTALL_H |