|
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: CNcdPreminetProtocolDownloadImpl declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_PROTOCOL_ELEMENT_DOWNLOAD_IMPL_H |
|
20 #define NCD_PROTOCOL_ELEMENT_DOWNLOAD_IMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "ncd_pp_download.h" |
|
24 #include "ncdprotocoltypes.h" |
|
25 |
|
26 class MNcdPreminetProtocolRights; |
|
27 class MNcdPreminetProtocolDescriptor; |
|
28 class CNcdPreminetProtocolDescriptorImpl; |
|
29 class MNcdConfigurationProtocolQuery; |
|
30 |
|
31 class CNcdPreminetProtocolDownloadImpl |
|
32 : public CBase, public MNcdPreminetProtocolDownload |
|
33 { |
|
34 public: |
|
35 |
|
36 static CNcdPreminetProtocolDownloadImpl* NewL(); |
|
37 static CNcdPreminetProtocolDownloadImpl* NewLC(); |
|
38 |
|
39 /** |
|
40 * Destructor |
|
41 */ |
|
42 virtual ~CNcdPreminetProtocolDownloadImpl(); |
|
43 |
|
44 void ConstructL(); |
|
45 |
|
46 /** |
|
47 * Returns the ID of this entity. |
|
48 * @return Id |
|
49 */ |
|
50 virtual const TDesC& Uri() const; |
|
51 |
|
52 /** |
|
53 * Returns the ID of this entity. |
|
54 * @return Id |
|
55 */ |
|
56 virtual TBool AutoDownload() const; |
|
57 |
|
58 /** |
|
59 * Returns the last modified date for this entity. |
|
60 * @return Last modified time, or 0 if never modified. |
|
61 */ |
|
62 virtual TInt DelayDelta() const; |
|
63 |
|
64 /** |
|
65 * Returns the namespace for this entity |
|
66 * @return namespace or KNullDesC |
|
67 */ |
|
68 virtual TNcdUriDeliveryMethod DeliveryMethod() const; |
|
69 |
|
70 /** |
|
71 * Validity time in minutes. |
|
72 * @return Delta value or -1 if element not found. |
|
73 */ |
|
74 virtual TInt ValidityDelta() const; |
|
75 |
|
76 /** |
|
77 * Download mime type |
|
78 * @return Descriptor |
|
79 */ |
|
80 virtual const TDesC& Mime() const; |
|
81 |
|
82 /** |
|
83 * ServerMessage information object. |
|
84 * @return Pointer or NULL. Ownership NOT transferred. |
|
85 */ |
|
86 virtual const MNcdConfigurationProtocolQuery* |
|
87 Message() const; |
|
88 |
|
89 /** |
|
90 * Possible fingerprint for the target binary |
|
91 * @return Fingerprint. |
|
92 */ |
|
93 virtual const TDesC& Fingerprint() const; |
|
94 |
|
95 /** |
|
96 * Fingerprint algorithm |
|
97 * @return MD5 or SHA-1. |
|
98 */ |
|
99 virtual TNcdUriFingerprintAlgorithm FingerprintAlgorithm() const; |
|
100 |
|
101 virtual const MNcdPreminetProtocolDescriptor* Descriptor() const; |
|
102 |
|
103 |
|
104 |
|
105 /** |
|
106 * @see MNcdPreminetProtocolDownload |
|
107 */ |
|
108 virtual TNcdDownloadTargetType Target() const; |
|
109 |
|
110 /** |
|
111 * @see MNcdPreminetProtocolDownload |
|
112 */ |
|
113 virtual TInt ChunkSize() const; |
|
114 |
|
115 /** |
|
116 * @see MNcdPreminetProtocolDownload |
|
117 */ |
|
118 virtual TBool Launchable() const; |
|
119 |
|
120 /** |
|
121 * @see MNcdPreminetProtocolDownload |
|
122 */ |
|
123 virtual const TDesC& InstallNotificationUri() const; |
|
124 |
|
125 /** |
|
126 * @see MNcdPreminetProtocolDownload |
|
127 */ |
|
128 virtual TInt Size() const; |
|
129 |
|
130 /** |
|
131 * @see MNcdPreminetProtocolDownload |
|
132 */ |
|
133 virtual TBool ReDownloadable() const; |
|
134 |
|
135 virtual const MNcdPreminetProtocolRights* Rights() const; |
|
136 |
|
137 virtual const TDesC& PreviewType() const; |
|
138 |
|
139 private: |
|
140 CNcdPreminetProtocolDownloadImpl(); |
|
141 |
|
142 public: |
|
143 |
|
144 |
|
145 HBufC* iUri; |
|
146 TBool iAutoDownload; |
|
147 TInt iDelayDelta; |
|
148 TNcdUriDeliveryMethod iDeliveryMethod; |
|
149 TInt iValidityDelta; |
|
150 HBufC* iMime; |
|
151 TNcdDownloadTargetType iTarget; |
|
152 TInt iChunkSize; |
|
153 TBool iLaunchable; |
|
154 HBufC* iInstallNotificationUri; |
|
155 TInt iSize; |
|
156 |
|
157 TBool iReDownloadable; |
|
158 |
|
159 HBufC* iFingerprint; |
|
160 TNcdUriFingerprintAlgorithm iFingerprintAlgorithm; |
|
161 |
|
162 HBufC* iPreviewType; |
|
163 |
|
164 MNcdConfigurationProtocolQuery* iMessage; |
|
165 CNcdPreminetProtocolDescriptorImpl* iDescriptor; |
|
166 |
|
167 MNcdPreminetProtocolRights* iRights; |
|
168 }; |
|
169 |
|
170 |
|
171 #endif //NCD_PROTOCOL_ELEMENT_DOWNLOAD_IMPL_H |