00001 /* 00002 * ============================================================================== 00003 * Name : sipdialog.h 00004 * Part of : SIP Client 00005 * Interface : SDK API, SIP Client API 00006 * Description : 00007 * Version : 1.0 00008 * 00009 * Copyright (c) 2005 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. All rights are reserved. Copying, 00013 * including reproducing, storing, adapting or translating, any 00014 * or all of this material requires the prior written consent of 00015 * Nokia Corporation. This material also contains confidential 00016 * information which may not be disclosed to others without the 00017 * prior written consent of Nokia Corporation. 00018 * ============================================================================== 00019 */ 00020 00021 00022 #ifndef CSIPDIALOG_H 00023 #define CSIPDIALOG_H 00024 00025 // INCLUDES 00026 #include <e32base.h> 00027 #include <stringpool.h> 00028 #include "_sipcodecdefs.h" 00029 00030 // FORWARD DECLARATIONS 00031 class CSIPConnection; 00032 class CSIPConnectionImplementation; 00033 class MSIPRegistrationContext; 00034 class CSIPDialogAssocBase; 00035 class CSIPFromHeader; 00036 class CSIPToHeader; 00037 class CSIPCallIDHeader; 00038 class CUri8; 00039 class CSIPDialogImplementation; 00040 00041 // CLASS DECLARATION 00042 00055 class CSIPDialog: public CBase 00056 { 00057 public: 00059 enum TState 00060 { 00062 EInit, 00064 EEarly, 00066 EConfirmed, 00068 ETerminated 00069 }; 00070 00071 public: //Constructors and destructor, for internal use 00080 static CSIPDialog* 00081 NewL(CSIPConnectionImplementation& aConnImplementation); 00082 00091 static CSIPDialog* 00092 NewLC(CSIPConnectionImplementation& aConnImplementation); 00093 00104 static CSIPDialog* 00105 NewL(CSIPConnectionImplementation& aConnImplementation, 00106 const MSIPRegistrationContext& aContext); 00107 00118 static CSIPDialog* 00119 NewLC(CSIPConnectionImplementation& aConnImplementation, 00120 const MSIPRegistrationContext& aContext); 00121 00125 ~CSIPDialog(); 00126 00127 public: //New functions 00132 IMPORT_C CSIPDialog::TState State() const; 00133 00139 IMPORT_C const RPointerArray<CSIPDialogAssocBase>& 00140 SIPDialogAssociations() const; 00141 00147 IMPORT_C const MSIPRegistrationContext* RegistrationContext() const; 00148 00154 IMPORT_C TBool 00155 IsAssociated(const CSIPDialogAssocBase& aDialogAssoc) const; 00156 00162 IMPORT_C CSIPConnection* Connection(); 00163 00169 IMPORT_C const CSIPConnection* Connection() const; 00170 00175 IMPORT_C const CSIPFromHeader& FromHeader() const; 00176 00181 IMPORT_C const CSIPToHeader& ToHeader() const; 00182 00187 IMPORT_C const CUri8& RemoteURI() const; 00188 00195 IMPORT_C const CSIPCallIDHeader& CallIdL() const; 00196 00202 IMPORT_C TBool operator==(const CSIPDialog& aDialog) const; 00203 00204 public: // New functions, for internal use 00205 00211 CSIPDialogImplementation& Implementation(); 00212 00213 private: // Constructors 00214 00215 CSIPDialog(); 00216 00217 void ConstructL(CSIPConnectionImplementation& aConnImplementation); 00218 00219 void ConstructL(CSIPConnectionImplementation& aConnImplementation, 00220 const MSIPRegistrationContext& aContext); 00221 00222 private: // Data 00223 00224 //Implementation instance, CSIPDialog doesn't own it 00225 CSIPDialogImplementation* iImplementation; 00226 00227 private: // For testing purposes 00228 00229 UNIT_TEST(CSIP_Test) 00230 UNIT_TEST(CSIPInviteDialogAssoc_Test) 00231 UNIT_TEST(CSIPSubscribeDialogAssoc_Test) 00232 UNIT_TEST(CSIPReferDialogAssoc_Test) 00233 00234 __DECLARE_TEST; 00235 }; 00236 00237 #endif