epoc32/include/mw/sipconnectionobserver.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
* Name        : sipconnectionobserver.h
williamr@2
    16
* Part of     : SIP Client
williamr@2
    17
* Interface   : SDK API, SIP Client API
williamr@2
    18
* Version     : 1.0
williamr@2
    19
*
williamr@2
    20
*/
williamr@2
    21
williamr@2
    22
williamr@2
    23
williamr@2
    24
#ifndef MSIPCONNECTIONOBSERVER_H
williamr@2
    25
#define MSIPCONNECTIONOBSERVER_H
williamr@2
    26
williamr@2
    27
//  INCLUDES
williamr@2
    28
#include "sipconnection.h"
williamr@2
    29
williamr@2
    30
// FORWARD DECLARATIONS
williamr@2
    31
class CSIPDialogAssocBase;
williamr@2
    32
class CSIPInviteDialogAssoc;
williamr@2
    33
class CSIPRegistrationBinding;
williamr@2
    34
class CSIPDialog;
williamr@2
    35
class CSIPTransactionBase;
williamr@2
    36
class CSIPServerTransaction;
williamr@2
    37
williamr@2
    38
// CLASS DECLARATION
williamr@2
    39
williamr@2
    40
/**
williamr@2
    41
*  @publishedAll
williamr@2
    42
*  @released
williamr@2
    43
*
williamr@2
    44
*  An interface to be implemented by users of CSIPConnection.
williamr@2
    45
*  Interface allows to be able to receive requests, responses, connection state
williamr@2
    46
*  notifications and error notifications from sip stack.
williamr@2
    47
*
williamr@2
    48
*  Note: The client must not delete related CSIPConnection object 
williamr@2
    49
*  during the execution of the interface function.
williamr@2
    50
*
williamr@2
    51
*  @lib n/a
williamr@2
    52
*/
williamr@2
    53
williamr@2
    54
class MSIPConnectionObserver
williamr@2
    55
	{    	
williamr@2
    56
    public:
williamr@2
    57
		/**
williamr@2
    58
		* A SIP request outside a dialog has been received from the network.
williamr@2
    59
        *
williamr@2
    60
        * @pre aTransaction != 0
williamr@2
    61
		* @param aTransaction SIP server transaction. The ownership is
williamr@2
    62
        *   transferred.
williamr@2
    63
        */
williamr@2
    64
		virtual void IncomingRequest (CSIPServerTransaction*
williamr@2
    65
									  aTransaction) = 0;
williamr@2
    66
williamr@2
    67
		/**
williamr@2
    68
		* A SIP request within a dialog has been received from the network.
williamr@2
    69
		* The client must resolve the actual dialog association to which
williamr@2
    70
		* this request belongs.
williamr@2
    71
		*
williamr@2
    72
        * @pre aTransaction != 0
williamr@2
    73
		* @param aTransaction SIP server transaction. The ownership is
williamr@2
    74
        *   transferred.
williamr@2
    75
		* @param aDialog the dialog that this transaction belongs to.        
williamr@2
    76
		*/
williamr@2
    77
		virtual void IncomingRequest (CSIPServerTransaction* aTransaction,
williamr@2
    78
					                  CSIPDialog& aDialog) = 0;
williamr@2
    79
williamr@2
    80
		/**
williamr@2
    81
		* A SIP response received from the network.
williamr@2
    82
		*
williamr@2
    83
		* @param aTransaction contains response elements.
williamr@2
    84
		*/
williamr@2
    85
		virtual void IncomingResponse (CSIPClientTransaction&
williamr@2
    86
                                       aTransaction) = 0;
williamr@2
    87
williamr@2
    88
		/**
williamr@2
    89
		* A SIP response received from the network that is within a dialog
williamr@2
    90
		* association or creates a dialog association.
williamr@2
    91
		*
williamr@2
    92
		* @param aTransaction contains response elements.
williamr@2
    93
		* @param aDialogAssoc a dialog association.        
williamr@2
    94
		*/		
williamr@2
    95
		virtual void IncomingResponse (
williamr@2
    96
					CSIPClientTransaction& aTransaction,
williamr@2
    97
					CSIPDialogAssocBase& aDialogAssoc) = 0;
williamr@2
    98
williamr@2
    99
        /**
williamr@2
   100
		* Multiple SIP responses have been received to the single INVITE due
williamr@2
   101
		* to the forking proxy. Note that each response creates a separate
williamr@2
   102
		* INVITE dialog association.
williamr@2
   103
        * Multiple responses can arrive until SIP stack completes UAC core
williamr@2
   104
		* INVITE transaction.
williamr@2
   105
        * If clients deletes INVITE transaction after first SIP response
williamr@2
   106
		* other possible responses will be consumed by the implementation.
williamr@2
   107
		* 
williamr@2
   108
		* @param aTransaction contains response elements
williamr@2
   109
		* @param aDialogAssoc INVITE dialog association; the ownership is 
williamr@2
   110
		*        transferred
williamr@2
   111
		*/
williamr@2
   112
		virtual void IncomingResponse (
williamr@2
   113
					CSIPClientTransaction& aTransaction,
williamr@2
   114
					CSIPInviteDialogAssoc* aDialogAssoc) = 0;
williamr@2
   115
williamr@2
   116
		/**
williamr@2
   117
		* A SIP response related a registration binding or an error response
williamr@2
   118
		* that is related to registration binding has been received
williamr@2
   119
        * from the network.
williamr@2
   120
        *
williamr@2
   121
		* @param aTransaction contains response elements
williamr@2
   122
		* @param aRegistration registration binding this transaction belongs to
williamr@2
   123
		*/
williamr@2
   124
		virtual void
williamr@2
   125
			IncomingResponse (CSIPClientTransaction& aTransaction,
williamr@2
   126
                              CSIPRegistrationBinding& aRegistration) = 0;
williamr@2
   127
williamr@2
   128
 		/**
williamr@2
   129
		* An asynchronous error has occurred in the stack related to the
williamr@2
   130
		* request indicated by the given transaction.
williamr@2
   131
		*
williamr@2
   132
		* @param aError system wide or SIP error code
williamr@2
   133
		* @param aTransaction failed transaction
williamr@2
   134
		* @param aSIPConnection a SIP connection        
williamr@2
   135
		*/
williamr@2
   136
		virtual void ErrorOccured (TInt aError,
williamr@2
   137
                                   CSIPTransactionBase& aTransaction) = 0;
williamr@2
   138
williamr@2
   139
		/**
williamr@2
   140
		* An asynchronous error has occurred in the stack related
williamr@2
   141
		* to the request indicated by the given transaction.
williamr@2
   142
        *
williamr@2
   143
		* @param aError system wide or SIP error code
williamr@2
   144
		* @param aTransaction the failed transaction
williamr@2
   145
		* @param aRegistration the failed registration binding
williamr@2
   146
		*/
williamr@2
   147
		virtual void ErrorOccured (TInt aError,
williamr@2
   148
				                   CSIPClientTransaction& aTransaction,
williamr@2
   149
					               CSIPRegistrationBinding& aRegistration) = 0;
williamr@2
   150
williamr@2
   151
		/**
williamr@2
   152
		* An asynchronous error has occured related to a request within
williamr@2
   153
		* an existing dialog.
williamr@2
   154
        *
williamr@2
   155
		* @param aError system wide or SIP error code
williamr@2
   156
		* @param aTransaction the failed transaction.
williamr@2
   157
		* @param aDialogAssoc the failed dialog associoation.        
williamr@2
   158
		*/
williamr@2
   159
		virtual void ErrorOccured (
williamr@2
   160
					TInt aError,
williamr@2
   161
				    CSIPTransactionBase& aTransaction,
williamr@2
   162
					CSIPDialogAssocBase& aDialogAssoc) = 0;
williamr@2
   163
williamr@2
   164
		/**
williamr@2
   165
		* An asynchronous error has occured related to a refresh 
williamr@2
   166
        *
williamr@2
   167
		* @param aError system wide or SIP error code
williamr@2
   168
		* @param aSIPRefresh original refresh object.        
williamr@2
   169
		*/
williamr@2
   170
		virtual void ErrorOccured (TInt aError, CSIPRefresh& aSIPRefresh) = 0;
williamr@2
   171
williamr@2
   172
		/**
williamr@2
   173
		* An asynchronous error has occured related to a periodical refresh
williamr@2
   174
        * that relates to a registration.
williamr@2
   175
        *
williamr@2
   176
		* @param aError system wide or SIP error code; 
williamr@2
   177
		*		 KErrCouldNotConnect if the refresh has failed
williamr@2
   178
		*		 due to the suspended connection.
williamr@2
   179
		* @param aRegistration associated registration binding
williamr@2
   180
		*/
williamr@2
   181
		virtual void ErrorOccured (TInt aError,					
williamr@2
   182
					               CSIPRegistrationBinding& aRegistration) = 0;
williamr@2
   183
williamr@2
   184
		/**
williamr@2
   185
		* An asynchronous error has occured related to a periodical refresh
williamr@2
   186
        * that belongs to SIP dialog association.
williamr@2
   187
        *
williamr@2
   188
		* @param aError system wide or SIP error code; 
williamr@2
   189
		*        KErrCouldNotConnect if the refresh has failed
williamr@2
   190
		*		 due to the suspended connection.
williamr@2
   191
		* @param aDialogAssoc SIP dialog association.        
williamr@2
   192
		*/
williamr@2
   193
		virtual void ErrorOccured (TInt aError,			
williamr@2
   194
					               CSIPDialogAssocBase& aDialogAssoc) = 0;
williamr@2
   195
williamr@2
   196
        /**
williamr@2
   197
		* SIP stack has completed UAC core INVITE transaction 64*T1 seconds
williamr@2
   198
        * after the reception of the first 2xx response. No more 2xx responses
williamr@2
   199
        * can be received to the issued single INVITE.
williamr@2
   200
        *
williamr@2
   201
        * If the INVITE transaction does not create a dialog, or the INVITE
williamr@2
   202
        * transaction encounters an error, this event will not be sent.
williamr@2
   203
        *
williamr@2
   204
		* @param aTransaction a complete UAC core INVITE transaction
williamr@2
   205
		*/
williamr@2
   206
        virtual void InviteCompleted (CSIPClientTransaction& aTransaction) = 0;
williamr@2
   207
williamr@2
   208
		/**
williamr@2
   209
        * Invite was canceled with the CANCEL
williamr@2
   210
        * @param aTransaction a canceled INVITE UAS transaction
williamr@2
   211
        */
williamr@2
   212
        virtual void InviteCanceled (CSIPServerTransaction& aTransaction) = 0;
williamr@2
   213
                
williamr@2
   214
		/**
williamr@2
   215
		* Connection state has changed.
williamr@2
   216
        * If connection state has changed to EInactive or EUnavailable,
williamr@2
   217
		* SIP stack has removed all stand-alone SIP refreshes, registrations 
williamr@2
   218
		* and dialog associations that client requested to refresh. Client may
williamr@2
   219
		* re-issue refresh requests (stand-alone, registration or dialog 
williamr@2
   220
		* association related) when connection becomes EActive again.
williamr@2
   221
		* SIP stack also terminates all pending SIP client transactions and no
williamr@2
   222
        * errors are reported back to the client about the terminated
williamr@2
   223
        * transactions nor about removed refreshes in order to avoid event
williamr@2
   224
        * flood.
williamr@2
   225
		* 
williamr@2
   226
		* @param aState indicates the current connection state        
williamr@2
   227
		*/
williamr@2
   228
		virtual void ConnectionStateChanged (CSIPConnection::TState aState) = 0;
williamr@2
   229
	};
williamr@2
   230
williamr@2
   231
#endif