|
1 /* |
|
2 * Copyright (c) 2006-2009 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: |
|
15 * Name : sipclientobserver.h |
|
16 * Part of : SIPClient |
|
17 * Version : SIP/5.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 |
|
29 #ifndef MSIPCLIENTOBSERVER_H |
|
30 #define MSIPCLIENTOBSERVER_H |
|
31 |
|
32 #include <e32std.h> |
|
33 |
|
34 class CSIPRequestElements; |
|
35 class CSIPResponseElements; |
|
36 class MSIPHttpDigestChallengeObserver2; |
|
37 |
|
38 /** |
|
39 * @brief an interface to be implemented by users of CSIPClient |
|
40 * to be able to receive requests timeout notifications from sip stack. |
|
41 */ |
|
42 class MSIPClientObserver |
|
43 { |
|
44 public: |
|
45 |
|
46 /** |
|
47 * A SIP request has been received from the network. |
|
48 * The user should use the connectin indicated by the IAP id |
|
49 * to respond to this request. |
|
50 * |
|
51 * @param aIapId IAP Id that indicates the connection from which |
|
52 * the SIP request was received |
|
53 * @param aRequest contains local address, |
|
54 * remote address of a sip message, |
|
55 * as well as optional SIP message method, headers and body. |
|
56 * The ownership is transferred. |
|
57 * @param aRequestId the id to be used when sending a SIP response. |
|
58 */ |
|
59 virtual void IncomingRequestL(TUint32 aIapId, |
|
60 CSIPRequestElements* aRequest, |
|
61 TUint32 aRequestId) = 0; |
|
62 |
|
63 /** |
|
64 * The transaction related to the received SIP request timed out |
|
65 * and it has been destroyed. |
|
66 * This will be called if the user fails to create a SIP connection |
|
67 * and does not send an appropriate SIP response. |
|
68 * |
|
69 * @param aRequestId the request id of the request |
|
70 */ |
|
71 virtual void TimeOut(TUint32 aRequestId) = 0; |
|
72 |
|
73 /** |
|
74 * Finds a client transaction based on its request id and |
|
75 * passes the response to that client transaction and |
|
76 * notifies the client about the received challenge. |
|
77 * |
|
78 * @param aRequestId the request id of the transaction |
|
79 * @param aResponse the received response containing the challenge(s). |
|
80 * The ownership is transferred. |
|
81 * @param aObserver the observer that the response should be passed to |
|
82 */ |
|
83 virtual void ChallengeReceivedL( |
|
84 TUint32 aRequestId, |
|
85 CSIPResponseElements* aResponse, |
|
86 MSIPHttpDigestChallengeObserver2& aObserver) = 0; |
|
87 |
|
88 /** |
|
89 * Finds a refresh based on its id and passes the response |
|
90 * to the refresh and notifies the client about the received challenge. |
|
91 * |
|
92 * @param aRefreshId the refresh id |
|
93 * @param aResponse the received response containing the challenge(s). |
|
94 * The ownership is transferred. |
|
95 * @param aObserver the observer that the response should be passed to |
|
96 */ |
|
97 virtual void ChallengeReceivedInRefreshL( |
|
98 TUint32 aRefreshId, |
|
99 TUint32 aRequestId, |
|
100 CSIPResponseElements* aResponse, |
|
101 MSIPHttpDigestChallengeObserver2& aObserver) = 0; |
|
102 }; |
|
103 |
|
104 #endif // MSIPCLIENTOBSERVER_H |
|
105 |
|
106 // End of File |