1 /** @file |
|
2 * Copyright (c) 2005-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: Observers which receive notifications about responses of SOAP actions and HTTP requests |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CUPNPRESPONSEHANDLER_H |
|
20 #define C_CUPNPRESPONSEHANDLER_H |
|
21 |
|
22 // FORWARD DECLARATIONS |
|
23 class CUpnpAction; |
|
24 class CUpnpHttpMessage; |
|
25 |
|
26 // CLASS DECLARATION |
|
27 /** |
|
28 * This observer class has to be implemented to receive notification |
|
29 * about response on SOAP action. |
|
30 * The observer is used by CUpnpAVCPManager, it use session id |
|
31 * (taken from SessionId method) for match incoming response with corresponding |
|
32 * handler instance. After notify handler, handler is removed from |
|
33 * registered handlers. |
|
34 * |
|
35 * @see CUpnpAVCPManager |
|
36 * @since Series 60 3.1 |
|
37 */ |
|
38 class MUpnpResponseHandler |
|
39 { |
|
40 public: // New functions |
|
41 /** |
|
42 * This callback function is notified when Soap respone |
|
43 * with relevant session id (@see SessionId) comes. |
|
44 * @param aErrorCode error code |
|
45 * @param aMessage response message |
|
46 * @since Series 60 3.1 |
|
47 */ |
|
48 virtual void InterpretL(TInt aErrorCode, CUpnpAction* aAction) = 0; |
|
49 /** |
|
50 * Function returns session id that identifies on which response handler is waiting |
|
51 * |
|
52 * @return session id |
|
53 */ |
|
54 virtual TInt SessionId() = 0; |
|
55 /** |
|
56 * This callback function is notified when leave appears during execution of InterpretL |
|
57 * @param aErrorCode error code of leave |
|
58 */ |
|
59 virtual void RunError(TInt aErrorCode) = 0; |
|
60 |
|
61 |
|
62 }; |
|
63 |
|
64 /** |
|
65 * This observer class has to be implemented to receive notification |
|
66 * about response on HTTP requests. |
|
67 * The observer is used by CUpnpAVCPManager, it use session id |
|
68 * (taken from SessionId method) for match incoming response with corresponding |
|
69 * handler instance. After notify handler, handler is not removed from |
|
70 * registered handlers. Handler instance has to use unregister itself. |
|
71 * |
|
72 * @see CUpnpAVCPManager |
|
73 * @since Series 60 3.1 |
|
74 */ |
|
75 class MUpnpHttpResponseHandler |
|
76 { |
|
77 public: // New functions |
|
78 /** |
|
79 * This callback function is notified when HTTP respone |
|
80 * with relevant session id (@see SessionId) comes. |
|
81 * @param aErrorCode error code |
|
82 * @param aMessage response message |
|
83 * @since Series 60 3.1 |
|
84 */ |
|
85 virtual void InterpretL(TInt aErrorCode, CUpnpHttpMessage* aAction) = 0; |
|
86 /** |
|
87 * Function returns session id that identifies on which response handler is waiting |
|
88 * |
|
89 * @return session id |
|
90 */ |
|
91 virtual TInt SessionId() = 0; |
|
92 /** |
|
93 * This callback function is notified when leave appears during execution of InterpretL |
|
94 * @param aErrorCode error code of leave |
|
95 */ |
|
96 virtual void RunError(TInt aErrorCode) = 0; |
|
97 }; |
|
98 #endif // C_CUPNPRESPONSEHANDLER_H |
|