|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : SIPExSIPStateBase.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 _SIPEXSIPSTATEBASE_H_ 00017 #define _SIPEXSIPSTATEBASE_H_ 00018 00019 // INCLUDES 00020 #include <e32base.h> 00021 00022 // From sipapi 00023 #include <sipclienttransaction.h> 00024 #include <sipservertransaction.h> 00025 #include <sipresponseelements.h> 00026 00027 // From Codec 00028 #include <siptoheader.h> 00029 00030 // FORWARD DECLARATIONS 00031 class CSIPExSIPEngine; 00032 class CSIPClientTransaction; 00033 class CSIPResponseElements; 00034 00035 // CLASS DECLARATION 00036 00037 /** 00038 * SIP state base; provides function default implementation, 00039 * common error handling and function for getting state name. 00040 * 00041 * Function will leave with KErrTotalLossOfPrecision in case of 00042 * invalid state. 00043 */ 00044 class CSIPExSIPStateBase: public CBase 00045 { 00046 public:// Constructors and destructor 00047 /** 00048 * Destructor 00049 */ 00050 virtual ~CSIPExSIPStateBase(); 00051 00052 00053 public://new functions 00054 00055 /** 00056 * SendInviteL 00057 * Sends an INVITE to peer. 00058 * @param aEngine Reference to SIP Engine. 00059 * @param aSipUri uri of recipient. 00060 */ 00061 virtual void SendInviteL( 00062 CSIPExSIPEngine& aEngine, 00063 const TDesC8& aSipUri ); 00064 00065 00066 /** 00067 * CancelInviteL 00068 * Cancel an INVITE sent previously. 00069 * @param aEngine Reference to Engine object. 00070 */ 00071 virtual void CancelInviteL( 00072 CSIPExSIPEngine& aEngine ); 00073 00074 00075 /** 00076 * AcceptInviteL 00077 * Send 200 (OK) as response to an INVITE 00078 * received from peer. 00079 * @param aEngine Reference to Engine object. 00080 */ 00081 virtual void AcceptInviteL( 00082 CSIPExSIPEngine& aEngine ); 00083 00084 /** 00085 * DeclineInviteL 00086 * Send 486 (Busy Here) as response 00087 * to an INVITE received from peer. 00088 * @param aEngine Reference to Engine object. 00089 */ 00090 virtual void DeclineInviteL( 00091 CSIPExSIPEngine& aEngine ); 00092 00093 00094 00095 /** 00096 * EndSessionL 00097 * Send BYE in an established session. 00098 * @param aEngine Reference to Engine object. 00099 */ 00100 virtual void EndSessionL( 00101 CSIPExSIPEngine& aEngine ); 00102 00103 00104 /** 00105 * ResponseReceivedL 00106 * A SIP response has been received from the network. 00107 * @param aEngine Reference to Engine object. 00108 * @param aTransaction Contains response elements. 00109 */ 00110 virtual void ResponseReceivedL( 00111 CSIPExSIPEngine& aEngine, 00112 CSIPClientTransaction& aTransaction ); 00113 00114 00115 /** 00116 * AckReceivedL 00117 * ACK has been received. 00118 * @param aEngine Reference to Engine object. 00119 * @param aTransaction Contains response elements. 00120 */ 00121 virtual void AckReceivedL( 00122 CSIPExSIPEngine& aEngine, 00123 CSIPServerTransaction& aTransaction ); 00124 00125 00126 /** 00127 * ByeReceivedL 00128 * BYE has been received. 00129 * @param aEngine Reference to Engine object. 00130 * @param aTransaction Contains response elements. 00131 */ 00132 virtual void ByeReceivedL( 00133 CSIPExSIPEngine& aEngine, 00134 CSIPServerTransaction& aTransaction ); 00135 00136 00137 /** 00138 * CancelReceivedL 00139 * CANCEL has been received. 00140 * @param aEngine Reference to Engine object. 00141 * @param aTransaction Contains response elements. 00142 */ 00143 virtual void CancelReceivedL( 00144 CSIPExSIPEngine& aEngine, 00145 CSIPClientTransaction& aTransaction ); 00146 00147 00148 /** 00149 * InviteReceivedL 00150 * INVITE has been received. 00151 * @param aEngine Reference to Engine object. 00152 * @param aTransaction Contains response elements. 00153 * The ownership is transferred. 00154 */ 00155 virtual void InviteReceivedL( 00156 CSIPExSIPEngine& aEngine, 00157 CSIPServerTransaction* aTransaction ); 00158 00159 00160 00161 /** 00162 * An asynchronous error has occured related to a periodical refresh 00163 * that relates to a registration. 00164 * @param aEngine Reference to Engine object. 00165 * @param aError error code 00166 * @param aSIPRegistration associated registration 00167 */ 00168 virtual void ErrorOccured( 00169 CSIPExSIPEngine& aEngine, 00170 TInt aError ); 00171 00172 00173 protected: 00174 /** 00175 * C++ default constructor. 00176 * @param aName a state name 00177 */ 00178 CSIPExSIPStateBase(); 00179 00180 00181 private://data members 00182 00183 }; 00184 00185 #endif // _SIPEXSIPSTATEBASE_H_ 00186
|
© Nokia 2006 |