Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : sipconnectionobserver.h
16 * Part of : SIP Client
17 * Interface : SDK API, SIP Client API
24 #ifndef MSIPCONNECTIONOBSERVER_H
25 #define MSIPCONNECTIONOBSERVER_H
28 #include "sipconnection.h"
30 // FORWARD DECLARATIONS
31 class CSIPDialogAssocBase;
32 class CSIPInviteDialogAssoc;
33 class CSIPRegistrationBinding;
35 class CSIPTransactionBase;
36 class CSIPServerTransaction;
44 * An interface to be implemented by users of CSIPConnection.
45 * Interface allows to be able to receive requests, responses, connection state
46 * notifications and error notifications from sip stack.
48 * Note: The client must not delete related CSIPConnection object
49 * during the execution of the interface function.
54 class MSIPConnectionObserver
58 * A SIP request outside a dialog has been received from the network.
60 * @pre aTransaction != 0
61 * @param aTransaction SIP server transaction. The ownership is
64 virtual void IncomingRequest (CSIPServerTransaction*
68 * A SIP request within a dialog has been received from the network.
69 * The client must resolve the actual dialog association to which
70 * this request belongs.
72 * @pre aTransaction != 0
73 * @param aTransaction SIP server transaction. The ownership is
75 * @param aDialog the dialog that this transaction belongs to.
77 virtual void IncomingRequest (CSIPServerTransaction* aTransaction,
78 CSIPDialog& aDialog) = 0;
81 * A SIP response received from the network.
83 * @param aTransaction contains response elements.
85 virtual void IncomingResponse (CSIPClientTransaction&
89 * A SIP response received from the network that is within a dialog
90 * association or creates a dialog association.
92 * @param aTransaction contains response elements.
93 * @param aDialogAssoc a dialog association.
95 virtual void IncomingResponse (
96 CSIPClientTransaction& aTransaction,
97 CSIPDialogAssocBase& aDialogAssoc) = 0;
100 * Multiple SIP responses have been received to the single INVITE due
101 * to the forking proxy. Note that each response creates a separate
102 * INVITE dialog association.
103 * Multiple responses can arrive until SIP stack completes UAC core
104 * INVITE transaction.
105 * If clients deletes INVITE transaction after first SIP response
106 * other possible responses will be consumed by the implementation.
108 * @param aTransaction contains response elements
109 * @param aDialogAssoc INVITE dialog association; the ownership is
112 virtual void IncomingResponse (
113 CSIPClientTransaction& aTransaction,
114 CSIPInviteDialogAssoc* aDialogAssoc) = 0;
117 * A SIP response related a registration binding or an error response
118 * that is related to registration binding has been received
121 * @param aTransaction contains response elements
122 * @param aRegistration registration binding this transaction belongs to
125 IncomingResponse (CSIPClientTransaction& aTransaction,
126 CSIPRegistrationBinding& aRegistration) = 0;
129 * An asynchronous error has occurred in the stack related to the
130 * request indicated by the given transaction.
132 * @param aError system wide or SIP error code
133 * @param aTransaction failed transaction
134 * @param aSIPConnection a SIP connection
136 virtual void ErrorOccured (TInt aError,
137 CSIPTransactionBase& aTransaction) = 0;
140 * An asynchronous error has occurred in the stack related
141 * to the request indicated by the given transaction.
143 * @param aError system wide or SIP error code
144 * @param aTransaction the failed transaction
145 * @param aRegistration the failed registration binding
147 virtual void ErrorOccured (TInt aError,
148 CSIPClientTransaction& aTransaction,
149 CSIPRegistrationBinding& aRegistration) = 0;
152 * An asynchronous error has occured related to a request within
153 * an existing dialog.
155 * @param aError system wide or SIP error code
156 * @param aTransaction the failed transaction.
157 * @param aDialogAssoc the failed dialog associoation.
159 virtual void ErrorOccured (
161 CSIPTransactionBase& aTransaction,
162 CSIPDialogAssocBase& aDialogAssoc) = 0;
165 * An asynchronous error has occured related to a refresh
167 * @param aError system wide or SIP error code
168 * @param aSIPRefresh original refresh object.
170 virtual void ErrorOccured (TInt aError, CSIPRefresh& aSIPRefresh) = 0;
173 * An asynchronous error has occured related to a periodical refresh
174 * that relates to a registration.
176 * @param aError system wide or SIP error code;
177 * KErrCouldNotConnect if the refresh has failed
178 * due to the suspended connection.
179 * @param aRegistration associated registration binding
181 virtual void ErrorOccured (TInt aError,
182 CSIPRegistrationBinding& aRegistration) = 0;
185 * An asynchronous error has occured related to a periodical refresh
186 * that belongs to SIP dialog association.
188 * @param aError system wide or SIP error code;
189 * KErrCouldNotConnect if the refresh has failed
190 * due to the suspended connection.
191 * @param aDialogAssoc SIP dialog association.
193 virtual void ErrorOccured (TInt aError,
194 CSIPDialogAssocBase& aDialogAssoc) = 0;
197 * SIP stack has completed UAC core INVITE transaction 64*T1 seconds
198 * after the reception of the first 2xx response. No more 2xx responses
199 * can be received to the issued single INVITE.
201 * If the INVITE transaction does not create a dialog, or the INVITE
202 * transaction encounters an error, this event will not be sent.
204 * @param aTransaction a complete UAC core INVITE transaction
206 virtual void InviteCompleted (CSIPClientTransaction& aTransaction) = 0;
209 * Invite was canceled with the CANCEL
210 * @param aTransaction a canceled INVITE UAS transaction
212 virtual void InviteCanceled (CSIPServerTransaction& aTransaction) = 0;
215 * Connection state has changed.
216 * If connection state has changed to EInactive or EUnavailable,
217 * SIP stack has removed all stand-alone SIP refreshes, registrations
218 * and dialog associations that client requested to refresh. Client may
219 * re-issue refresh requests (stand-alone, registration or dialog
220 * association related) when connection becomes EActive again.
221 * SIP stack also terminates all pending SIP client transactions and no
222 * errors are reported back to the client about the terminated
223 * transactions nor about removed refreshes in order to avoid event
226 * @param aState indicates the current connection state
228 virtual void ConnectionStateChanged (CSIPConnection::TState aState) = 0;