|
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: CNcdBaseDownloadHandler declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "ncddownloadhandler.h" |
|
20 |
|
21 #ifndef C_NCDBASEDOWNLOADHANDLER_H |
|
22 #define C_NCDBASEDOWNLOADHANDLER_H |
|
23 |
|
24 class CNcdNodeManager; |
|
25 class MCatalogsHttpSession; |
|
26 class CNcdNodeIdentifier; |
|
27 class CNcdNode; |
|
28 |
|
29 class CNcdBaseDownloadHandler : public CBase, public MNcdDownloadHandler |
|
30 { |
|
31 public: |
|
32 |
|
33 ~CNcdBaseDownloadHandler(); |
|
34 |
|
35 public: // From MNcdDownloadHandler |
|
36 |
|
37 /** |
|
38 * @see MNcdDownloadHandler::CurrentDownload() |
|
39 */ |
|
40 virtual TInt CurrentDownload() const; |
|
41 |
|
42 /** |
|
43 * @see MNcdDownloadHandler::DownloadCount() |
|
44 */ |
|
45 virtual TInt DownloadCount() const; |
|
46 |
|
47 /** |
|
48 * @see MNcdDownloadHandler::DownloadL() |
|
49 */ |
|
50 virtual MCatalogsHttpOperation* DownloadL() = 0; |
|
51 |
|
52 /** |
|
53 * @see MNcdDownloadHandler::FinishDownloadL() |
|
54 */ |
|
55 virtual void FinishDownloadL( MCatalogsHttpOperation& aDownload, |
|
56 MNcdFileHandler* aFileHandler ) = 0; |
|
57 |
|
58 |
|
59 /** |
|
60 * @see MNcdDownloadHandler::SetCurrentDownload() |
|
61 */ |
|
62 virtual void SetCurrentDownload( TInt aCurrentDownload ); |
|
63 |
|
64 /** |
|
65 * @see MNcdDownloadHandler::NodeId() |
|
66 */ |
|
67 virtual const CNcdNodeIdentifier& NodeId() const; |
|
68 |
|
69 |
|
70 /** |
|
71 * @see MNcdDownloadHandler::NodeL() |
|
72 */ |
|
73 virtual CNcdNode& NodeL() const; |
|
74 |
|
75 protected: |
|
76 |
|
77 CNcdBaseDownloadHandler( CNcdNodeManager& aNodeManager, |
|
78 MCatalogsHttpSession& aSession ); |
|
79 void ConstructL( const CNcdNodeIdentifier& aNodeId ); |
|
80 |
|
81 protected: |
|
82 |
|
83 |
|
84 |
|
85 MCatalogsHttpSession& HttpSession() const; |
|
86 |
|
87 CNcdNodeManager& NodeManager() const; |
|
88 |
|
89 void SetTotalDownloads( TInt aDownloads ); |
|
90 |
|
91 |
|
92 private: |
|
93 |
|
94 CNcdNodeManager& iNodeManager; |
|
95 MCatalogsHttpSession& iHttpSession; |
|
96 CNcdNodeIdentifier* iNodeId; |
|
97 |
|
98 TInt iDownloads; |
|
99 TInt iCurrentDownload; |
|
100 |
|
101 }; |
|
102 |
|
103 |
|
104 #endif // C_NCDBASEDOWNLOADHANDLER_H |