|
1 // Copyright (c) 2008-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 #ifndef __MCOMPOSEROBSERVER_H_ |
|
17 #define __MCOMPOSEROBSERVER_H_ |
|
18 |
|
19 // System includes. |
|
20 #include <e32std.h> |
|
21 |
|
22 /** |
|
23 The MComposerObserver class is the observer API for the upnp request and response composer. |
|
24 It allows the composer to notify its observer when it has message data ready to |
|
25 send and when the message has been completed. |
|
26 */ |
|
27 class MComposerObserver |
|
28 { |
|
29 public: |
|
30 /** |
|
31 Notifies the observer that there is a message data that is ready to be sent. |
|
32 The API will be invoked by the composer after it has composed the message start line and |
|
33 the message headers. It'll again be invoked once the message body data is ready. |
|
34 */ |
|
35 virtual void MessageDataReadyL(RBuf8& aData) = 0; |
|
36 |
|
37 /** |
|
38 Signals the end of the composing activity. |
|
39 */ |
|
40 virtual void ComposingConcluded() = 0; |
|
41 |
|
42 /** |
|
43 Error notifier. The composer has experienced an error. |
|
44 @param aError The error code. Possible error codes are: |
|
45 KErrNoMemory - When there is insufficient memory for allocations, |
|
46 KErrCorrupt - When the body data supplier indicated that the last data part even though it |
|
47 had not supplied all the data it specified. Or the body data supplier |
|
48 has supplied all the data it specified but has not indicated a |
|
49 last data part. |
|
50 KErrNotFound - When the Locate() and Find() APIs of TDesC8 fail. |
|
51 */ |
|
52 virtual void ComposerError(TInt aError) = 0; |
|
53 }; |
|
54 |
|
55 #endif /*MCOMPOSEROBSERVER_H_*/ |