|
1 |
|
2 /* |
|
3 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef _SIPEXSIPENGINEOBSERVER_H_ |
|
22 #define _SIPEXSIPENGINEOBSERVER_H_ |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * The observer class for monitoring the SIP Engine. |
|
32 * Class must be implemented by the user in order to |
|
33 * observe changes in the SIP Engine. |
|
34 */ |
|
35 |
|
36 class MSIPExSIPEngineObserver |
|
37 { |
|
38 |
|
39 public: // New functions |
|
40 |
|
41 // Session control |
|
42 // |
|
43 // INVITE |
|
44 |
|
45 /** |
|
46 * InviteReceived |
|
47 * Called when an INVITE is received by the SIP Client. |
|
48 * @param aFrom The sender of the INVITE |
|
49 * @param aIapId The access point id of used conection |
|
50 */ |
|
51 virtual void InviteReceived( const TDesC8& aFrom, const TUint32 aIapId ) = 0; |
|
52 |
|
53 /** |
|
54 * InviteReceivedByRemote |
|
55 * Called when a provisional response (1xx, not 100 (Trying)) |
|
56 * is received after sending INVITE. |
|
57 */ |
|
58 virtual void InviteReceivedByRemote( const TInt aResponse ) = 0; |
|
59 |
|
60 /** |
|
61 * InviteAcceptedByRemote |
|
62 * Called when the response 200 (OK) is received |
|
63 * after sending INVITE. |
|
64 * @param aIPAddr The IP Address of the remote party. |
|
65 * @param aIapId iap id used. |
|
66 */ |
|
67 virtual void InviteAcceptedByRemote( const TInetAddr& aIPAddr, const TUint32 aIapId ) = 0; |
|
68 |
|
69 /** |
|
70 * InviteDeclinedByRemote |
|
71 * Called when a 4xx, 5xx, or 6xx response is received |
|
72 * after sending INVITE. |
|
73 * As the session isn't established, the engine should be |
|
74 * deleted. |
|
75 * @param aResponse Value of the received response. |
|
76 */ |
|
77 virtual void InviteDeclinedByRemote( const TInt aResponse ) = 0; |
|
78 |
|
79 /** |
|
80 * InviteAcceptedByUs |
|
81 * Called when the response ACK is received after |
|
82 * responding with 200 (OK) to an invitation. |
|
83 */ |
|
84 virtual void InviteAcceptedByUs() = 0; |
|
85 |
|
86 |
|
87 // CANCEL |
|
88 |
|
89 /** |
|
90 * InvitationCancelled |
|
91 * Called when an INVITE has been successfully cancelled. |
|
92 */ |
|
93 virtual void InvitationCancelled() = 0; |
|
94 |
|
95 /** |
|
96 * CancelFailed |
|
97 * Called when the cancellation of an INVITE fails. |
|
98 */ |
|
99 virtual void CancelFailed() = 0; |
|
100 |
|
101 |
|
102 // BYE |
|
103 |
|
104 /** |
|
105 * SessionEnded |
|
106 * Called when the session has been closed, ie. when the |
|
107 * the response 200 (OK) is received after sending BYE, |
|
108 * or after 200 (OK) has been sent after receiving BYE. |
|
109 * Or we have declined a received INVITE. |
|
110 * The observer should delete the engine. |
|
111 */ |
|
112 virtual void SessionEnded() = 0; |
|
113 |
|
114 |
|
115 // Connection lost |
|
116 |
|
117 /** |
|
118 * ConnectionLost |
|
119 * Called when the connection is lost because of an |
|
120 * error. The observer should delete the engine. |
|
121 */ |
|
122 virtual void ConnectionLost() = 0; |
|
123 |
|
124 |
|
125 // SIP Engine Error |
|
126 |
|
127 /** |
|
128 * EngineError |
|
129 * Called when an error occurs in the SIP Example |
|
130 * SIP Engine. |
|
131 * @param aError Error number |
|
132 */ |
|
133 virtual void EngineError( TInt aError ) = 0; |
|
134 |
|
135 |
|
136 |
|
137 // Profile control |
|
138 |
|
139 /** |
|
140 * ProfileEnabled |
|
141 * Called when the EnableProfile method has |
|
142 * completed successfully. |
|
143 * @param aSIPProfileId ID of the enabled profile |
|
144 */ |
|
145 virtual void ProfileEnabled( TUint32 aSIPProfileId ) = 0; |
|
146 |
|
147 /** |
|
148 * ProfileError |
|
149 * An error has occurred during a profile operation |
|
150 * @param aError Error number |
|
151 */ |
|
152 virtual void ProfileError( TInt aError ) = 0; |
|
153 |
|
154 // Instant Message control |
|
155 |
|
156 /** |
|
157 * IMReceived |
|
158 * Called when an Instant Message is received. |
|
159 * @param aFrom The sender of the IM. |
|
160 * @param aMessage The message received. |
|
161 */ |
|
162 virtual void IMReceived( const TDesC8& aFrom, |
|
163 const TDesC8& aMessage ) = 0; |
|
164 /** |
|
165 * WriteLog |
|
166 * @param aLog, log entry. |
|
167 */ |
|
168 virtual void WriteLog( const TDesC8& aLog ) = 0; |
|
169 }; |
|
170 |
|
171 #endif // _SIPEXSIPENGINEOBSERVER_H_ |