|
1 /* |
|
2 * Copyright (c) 2007 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: a data class containing filetransfer-related data |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef C_CUPNPFILETRANSFERITEM_H |
|
24 #define C_CUPNPFILETRANSFERITEM_H |
|
25 |
|
26 // EXTERNAL INCLUDES |
|
27 #include <e32base.h> |
|
28 #include <s32mem.h> |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * UPnP AV Controller Client/Server communication helper class |
|
33 * |
|
34 * @since Series 60 3.2 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CUpnpFileTransferItem ) : public CBase |
|
37 { |
|
38 |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static inline CUpnpFileTransferItem* NewLC(); |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static inline CUpnpFileTransferItem* NewL(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 inline virtual ~CUpnpFileTransferItem(); |
|
55 |
|
56 public: |
|
57 |
|
58 /** |
|
59 * Externalizes device information to stream. |
|
60 * Leaves in case of errors. |
|
61 * @since Series 60 3.2 |
|
62 * @param reference to RWriteStream |
|
63 */ |
|
64 inline void ExternalizeL( RWriteStream& aStream ) const; |
|
65 |
|
66 /** |
|
67 * Internalizes device information from stream. |
|
68 * Leaves in case of errors. |
|
69 * @since Series 60 3.2 |
|
70 * @param reference to RReadStream |
|
71 */ |
|
72 inline void InternalizeL( RReadStream& aStream ); |
|
73 |
|
74 /** |
|
75 * Externalizes information to stream and returns the object as a heap |
|
76 * desctiptor. |
|
77 */ |
|
78 inline HBufC8* ToDes8L() const; |
|
79 |
|
80 private: // |
|
81 |
|
82 /** |
|
83 * Constructor |
|
84 */ |
|
85 inline CUpnpFileTransferItem(); |
|
86 |
|
87 /** |
|
88 * Perform the second phase construction |
|
89 */ |
|
90 inline void ConstructL(); |
|
91 |
|
92 public: // New methods |
|
93 |
|
94 /** |
|
95 * Set Uri |
|
96 * |
|
97 * @param aUri Uri |
|
98 */ |
|
99 inline void SetUriL( const TDesC8& aUri ); |
|
100 |
|
101 /** |
|
102 * Return Uri |
|
103 * |
|
104 * @return Uri |
|
105 */ |
|
106 inline const TDesC8& Uri() const; |
|
107 |
|
108 /** |
|
109 * Set title |
|
110 * |
|
111 * @param aTitle title |
|
112 */ |
|
113 inline void SetTitleL( const TDesC8& aTitle ); |
|
114 |
|
115 /** |
|
116 * Return title |
|
117 * |
|
118 * @return title |
|
119 */ |
|
120 inline const TDesC8& Title() const; |
|
121 |
|
122 /** |
|
123 * Set protocolinfo |
|
124 * |
|
125 * @param aProtocolInfo protocolinfo |
|
126 */ |
|
127 inline void SetProtocolInfoL( const TDesC8& aProtocolInfo ); |
|
128 |
|
129 /** |
|
130 * Return protocolinfo |
|
131 * |
|
132 * @return protocolinfo |
|
133 */ |
|
134 inline const TDesC8& ProtocolInfo() const; |
|
135 |
|
136 /** |
|
137 * Set filepath |
|
138 * |
|
139 * @param aPath filepath |
|
140 */ |
|
141 inline void SetPathL( const TDesC& aPath ); |
|
142 |
|
143 /** |
|
144 * Return filepath |
|
145 * |
|
146 * @return filepath |
|
147 */ |
|
148 inline const TDesC& Path() const; |
|
149 |
|
150 /** |
|
151 * Set key |
|
152 * |
|
153 * @param aKey identifier key |
|
154 */ |
|
155 inline void SetKey( TInt aKey ); |
|
156 |
|
157 /** |
|
158 * Return key |
|
159 * |
|
160 * @return key |
|
161 */ |
|
162 inline TInt Key(); |
|
163 |
|
164 private: |
|
165 |
|
166 /** |
|
167 * Stores URI |
|
168 * |
|
169 * Owned |
|
170 */ |
|
171 HBufC8* iUri; |
|
172 |
|
173 /** |
|
174 * Stores title |
|
175 * |
|
176 * Owned |
|
177 */ |
|
178 HBufC8* iTitle; |
|
179 |
|
180 /** |
|
181 * Stores protocolInfo |
|
182 * |
|
183 * Owned |
|
184 */ |
|
185 HBufC8* iProtocolInfo; |
|
186 |
|
187 /** |
|
188 * Stores path |
|
189 * |
|
190 * Owned |
|
191 */ |
|
192 HBufC* iPath; |
|
193 |
|
194 /** |
|
195 * Stores key (filetransfer identifier) |
|
196 * |
|
197 * Owned |
|
198 */ |
|
199 TInt iKey; |
|
200 |
|
201 }; |
|
202 |
|
203 #include "upnpfiletransferitem.inl" |
|
204 |
|
205 #endif // C_CUPNPFILETRANSFERITEM_H |
|
206 |
|
207 // End of file |