|
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: Session observer class, implemented by plugin client. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef NSPSESSIONOBSERVER_H |
|
21 #define NSPSESSIONOBSERVER_H |
|
22 |
|
23 #include <e32def.h> |
|
24 |
|
25 class CSdpDocument; |
|
26 |
|
27 /** |
|
28 * Error limit which can be used to signal situations where Nat failed in |
|
29 * asynchronous prosessing, and resume of normal SIP signaling is expected. |
|
30 * All errors below this limit are considered as non-fatal, and normal SIP |
|
31 * session is maintained without informing MCE Client. |
|
32 */ |
|
33 const TInt KNatNonFatalErrorLimit = -11000; |
|
34 |
|
35 /** |
|
36 * Session observer, implemented by plugin client to receive async calls. |
|
37 * |
|
38 * @lib natfwsdpprovider.dll |
|
39 * @since S60 3.2 |
|
40 */ |
|
41 class MNSPSessionObserver |
|
42 { |
|
43 public: // New functions |
|
44 |
|
45 /** |
|
46 * Callback for signaling that session is initialized, and ready for use. |
|
47 */ |
|
48 virtual void Initialized( TUint aSessionId ) = 0; |
|
49 |
|
50 /** |
|
51 * Callback for signaling that Offer is modified to point NAT. |
|
52 * |
|
53 * @param aSessionId Session unique identier. |
|
54 * @param aOffer Modified Offer, ownership transferred. |
|
55 */ |
|
56 virtual void OfferReady( TUint aSessionId, CSdpDocument* aOffer ) = 0; |
|
57 |
|
58 /** |
|
59 * Callback for signaling that Answer is modified to point NAT. |
|
60 * |
|
61 * @param aSessionId Session unique identier. |
|
62 * @param aAnswer Modified Answer, ownership transferred. |
|
63 */ |
|
64 virtual void AnswerReady( TUint aSessionId, CSdpDocument* aAnswer ) = 0; |
|
65 |
|
66 /** |
|
67 * Callback for signaling that NAT negotiation has resulted |
|
68 * a different result than original SDP A/O. Hence updated SDP content |
|
69 * must be sent. Only Controlling agent receives this callback. |
|
70 * |
|
71 * @param aSessionId Session unique identier. |
|
72 * @param aOffer Last SDP document, but with modified content. |
|
73 * Ownership transferred. |
|
74 */ |
|
75 virtual void UpdateSdp( TUint aSessionId, CSdpDocument* aOffer ) = 0; |
|
76 |
|
77 /** |
|
78 * Session errors. Session which is identified by aSessionId is deleted. |
|
79 * |
|
80 * @param aSessionId Session unique identier. |
|
81 * @param aError System wide error code. |
|
82 */ |
|
83 virtual void ErrorOccurred( TUint aSessionId, TInt aError ) = 0; |
|
84 |
|
85 /** |
|
86 * Session media related ICMP error occured. |
|
87 * |
|
88 * @param aSessionId Session unique identier. |
|
89 * @param aError ICMP error code. |
|
90 */ |
|
91 virtual void IcmpErrorOccurred( TUint aSessionId, TInt aError ) = 0; |
|
92 |
|
93 }; |
|
94 |
|
95 #endif // NSPSESSIONOBSERVER_H |
|
96 |
|
97 // end of file |