|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 #ifndef __MHTTPCONTENTSOURCE_H__ |
|
18 #define __MHTTPCONTENTSOURCE_H__ |
|
19 |
|
20 #include <e32base.h> |
|
21 |
|
22 class MHttpDataSender; |
|
23 |
|
24 /** |
|
25 * THttpContentSourceOp is an operator to notify the HTTP Service |
|
26 * when content is available. |
|
27 * |
|
28 * @publishedAll |
|
29 * @prototype |
|
30 */ |
|
31 class THttpContentSourceOp |
|
32 { |
|
33 friend class CHttpDataSender; |
|
34 public: |
|
35 IMPORT_C THttpContentSourceOp(); |
|
36 IMPORT_C void Notify(const TDesC8& aData, TBool aLast = EFalse); |
|
37 private: |
|
38 THttpContentSourceOp(MHttpDataSender* aSender); |
|
39 MHttpDataSender* iDataSender; |
|
40 }; |
|
41 |
|
42 /** |
|
43 * The implementation of MHttpContentSink can supply the request body data. |
|
44 * |
|
45 * @publishedAll |
|
46 * @prototype |
|
47 */ |
|
48 class MHttpContentSource |
|
49 { |
|
50 public: |
|
51 /** |
|
52 * Obtain a part of request body data from the source. The data should be guranteed to survive till |
|
53 * another call to OnData or a call to CHttpClientTransaction::OnCompletion/OnError |
|
54 * |
|
55 * @param aData Data source operator |
|
56 */ |
|
57 |
|
58 virtual void OnData(THttpContentSourceOp& aData) =0; |
|
59 |
|
60 private: |
|
61 // Reserved for future use. |
|
62 inline virtual void Reserved(); |
|
63 inline virtual void Reserved2(); |
|
64 }; |
|
65 |
|
66 inline void MHttpContentSource::Reserved() |
|
67 { |
|
68 |
|
69 } |
|
70 |
|
71 inline void MHttpContentSource::Reserved2() |
|
72 { |
|
73 |
|
74 } |
|
75 |
|
76 #endif // __MHTTPCONTENTSOURCE_H__ |