|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : SIPExSIPEngineObserver.h 00004 * Part of : SIPExSIPEngine 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2004-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 #ifndef _SIPEXSIPENGINEOBSERVER_H_ 00017 #define _SIPEXSIPENGINEOBSERVER_H_ 00018 00019 // INCLUDES 00020 00021 // FORWARD DECLARATIONS 00022 00023 // CLASS DECLARATION 00024 00025 /** 00026 * The observer class for monitoring the SIP Engine. 00027 * Class must be implemented by the user in order to 00028 * observe changes in the SIP Engine. 00029 */ 00030 00031 class MSIPExSIPEngineObserver 00032 { 00033 00034 public: // New functions 00035 00036 // Session control 00037 // 00038 // INVITE 00039 00040 /** 00041 * InviteReceived 00042 * Called when an INVITE is received by the SIP Client. 00043 * @param aFrom The sender of the INVITE 00044 * @param aIapId The access point id of used conection 00045 */ 00046 virtual void InviteReceived( const TDesC8& aFrom, const TUint32 aIapId ) = 0; 00047 00048 /** 00049 * InviteReceivedByRemote 00050 * Called when a provisional response (1xx, not 100 (Trying)) 00051 * is received after sending INVITE. 00052 */ 00053 virtual void InviteReceivedByRemote( const TInt aResponse ) = 0; 00054 00055 /** 00056 * InviteAcceptedByRemote 00057 * Called when the response 200 (OK) is received 00058 * after sending INVITE. 00059 * @param aIPAddr The IP Address of the remote party. 00060 * @param aIapId iap id used. 00061 */ 00062 virtual void InviteAcceptedByRemote( const TInetAddr& aIPAddr, const TUint32 aIapId ) = 0; 00063 00064 /** 00065 * InviteDeclinedByRemote 00066 * Called when a 4xx, 5xx, or 6xx response is received 00067 * after sending INVITE. 00068 * As the session isn't established, the engine should be 00069 * deleted. 00070 * @param aResponse Value of the received response. 00071 */ 00072 virtual void InviteDeclinedByRemote( const TInt aResponse ) = 0; 00073 00074 /** 00075 * InviteAcceptedByUs 00076 * Called when the response ACK is received after 00077 * responding with 200 (OK) to an invitation. 00078 */ 00079 virtual void InviteAcceptedByUs() = 0; 00080 00081 00082 // CANCEL 00083 00084 /** 00085 * InvitationCancelled 00086 * Called when an INVITE has been successfully cancelled. 00087 */ 00088 virtual void InvitationCancelled() = 0; 00089 00090 /** 00091 * CancelFailed 00092 * Called when the cancellation of an INVITE fails. 00093 */ 00094 virtual void CancelFailed() = 0; 00095 00096 00097 // BYE 00098 00099 /** 00100 * SessionEnded 00101 * Called when the session has been closed, ie. when the 00102 * the response 200 (OK) is received after sending BYE, 00103 * or after 200 (OK) has been sent after receiving BYE. 00104 * Or we have declined a received INVITE. 00105 * The observer should delete the engine. 00106 */ 00107 virtual void SessionEnded() = 0; 00108 00109 00110 // Connection lost 00111 00112 /** 00113 * ConnectionLost 00114 * Called when the connection is lost because of an 00115 * error. The observer should delete the engine. 00116 */ 00117 virtual void ConnectionLost() = 0; 00118 00119 00120 // SIP Engine Error 00121 00122 /** 00123 * EngineError 00124 * Called when an error occurs in the SIP Example 00125 * SIP Engine. 00126 * @param aError Error number 00127 */ 00128 virtual void EngineError( TInt aError ) = 0; 00129 00130 00131 00132 // Profile control 00133 00134 /** 00135 * ProfileEnabled 00136 * Called when the EnableProfile method has 00137 * completed successfully. 00138 * @param aSIPProfileId ID of the enabled profile 00139 */ 00140 virtual void ProfileEnabled( TUint32 aSIPProfileId ) = 0; 00141 00142 /** 00143 * ProfileError 00144 * An error has occurred during a profile operation 00145 * @param aError Error number 00146 */ 00147 virtual void ProfileError( TInt aError ) = 0; 00148 00149 // Instant Message control 00150 00151 /** 00152 * IMReceived 00153 * Called when an Instant Message is received. 00154 * @param aFrom The sender of the IM. 00155 * @param aMessage The message received. 00156 */ 00157 virtual void IMReceived( const TDesC8& aFrom, 00158 const TDesC8& aMessage ) = 0; 00159 /** 00160 * WriteLog 00161 * @param aLog, log entry. 00162 */ 00163 virtual void WriteLog( const TDesC8& aLog ) = 0; 00164 }; 00165 00166 #endif // _SIPEXSIPENGINEOBSERVER_H_
|
© Nokia 2006 |