|
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: Download handling interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_NCDDOWNLOADHANDLER_H |
|
20 #define M_NCDDOWNLOADHANDLER_H |
|
21 |
|
22 class MNcdFileHandler; |
|
23 class MCatalogsHttpOperation; |
|
24 class CNcdNodeIdentifier; |
|
25 class CNcdNode; |
|
26 |
|
27 /** |
|
28 * Helper interface for simplifying the implementation of different |
|
29 * types of file downloads |
|
30 */ |
|
31 class MNcdDownloadHandler |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Current download number |
|
37 */ |
|
38 virtual TInt CurrentDownload() const = 0; |
|
39 |
|
40 /** |
|
41 * Total downloads |
|
42 */ |
|
43 virtual TInt DownloadCount() const = 0; |
|
44 |
|
45 /** |
|
46 * Creates the next download |
|
47 * |
|
48 */ |
|
49 virtual MCatalogsHttpOperation* DownloadL() = 0; |
|
50 |
|
51 virtual void FinishDownloadL( MCatalogsHttpOperation& aDownload, |
|
52 MNcdFileHandler* aFileHandler ) = 0; |
|
53 |
|
54 |
|
55 /** |
|
56 * Sets the index for the next download |
|
57 * |
|
58 */ |
|
59 virtual void SetCurrentDownload( TInt aCurrentDownload ) = 0; |
|
60 |
|
61 /** |
|
62 * Node ID getter |
|
63 */ |
|
64 virtual const CNcdNodeIdentifier& NodeId() const = 0; |
|
65 |
|
66 |
|
67 /** |
|
68 * Node getter |
|
69 * @return Node |
|
70 */ |
|
71 virtual CNcdNode& NodeL() const = 0; |
|
72 |
|
73 virtual ~MNcdDownloadHandler() |
|
74 { |
|
75 } |
|
76 }; |
|
77 |
|
78 #endif // M_NCDDOWNLOADCONFIGURATOR_H |