S60 3rd Edition API Reference: sipconnection.h Source File

sipconnection.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : sipconnection.h
00004 *  Part of     : SIP Client
00005 *  Interface   : SDK API, SIP 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 #ifndef CSIPCONNECTION_H
00022 #define CSIPCONNECTION_H
00023 
00024 // INCLUDES
00025 #include <e32base.h>
00026 #include <in_sock.h>
00027 #include "_sipcodecdefs.h"
00028 
00029 // FORWARD DECLARATIONS
00030 class CSIP;
00031 class MSIPConnectionObserver;
00032 class CSIPClientTransaction;
00033 class MSIPRegistrationContext;
00034 class CSIPRefresh;
00035 class CSIPRequestElements;
00036 class CSIPConnectionImplementation;
00037 
00038 // CONSTANTS
00039 
00040 // CLASS DECLARATION
00041 
00053 class CSIPConnection : public CBase
00054         {
00055     public:
00057         enum TState 
00058             {
00060                         EInit=1,
00062                         EActive,
00064                         ESuspended,
00066                         EInactive,
00068                         EUnavailable
00069             };
00070 
00071     public:  // Constructors and destructor
00072 
00082                 IMPORT_C static CSIPConnection*
00083             NewL(CSIP& aSIP,
00084                                  TUint32 aIapId,
00085                                  MSIPConnectionObserver& aObserver);
00086 
00097                 IMPORT_C static CSIPConnection*
00098             NewLC(CSIP& aSIP,
00099                                   TUint32 aIapId,
00100                                   MSIPConnectionObserver& aObserver);
00101 
00106                 IMPORT_C ~CSIPConnection();
00107 
00108     public: // New functions
00109 
00114                 IMPORT_C TState State() const;
00115 
00138                 IMPORT_C CSIPClientTransaction*
00139             SendRequestL(CSIPRequestElements* aElements,
00140                          const MSIPRegistrationContext& aContext);
00141 
00165                 IMPORT_C CSIPClientTransaction*
00166             SendRequestL(CSIPRequestElements* aElements,                                        
00167                          const MSIPRegistrationContext& aContext,
00168                                                  CSIPRefresh& aRefresh); 
00169 
00185                 IMPORT_C CSIPClientTransaction*
00186             SendRequestL(CSIPRequestElements* aElements);
00187 
00204                 IMPORT_C CSIPClientTransaction*
00205             SendRequestL(CSIPRequestElements* aElements,
00206                                                  CSIPRefresh& aRefresh);
00207 
00223                 IMPORT_C CSIPClientTransaction*
00224             FetchRegistrationsL(CSIPRequestElements* aElements);
00225 
00230         IMPORT_C TUint32 IapId() const;
00231 
00237         IMPORT_C CSIP* SIP();
00238 
00244         IMPORT_C const CSIP* SIP() const;
00245       
00261             IMPORT_C void SetOptL(TUint aOptionName,
00262                                   TUint aOptionLevel,
00263                                   const TDesC8& aOption=KNullDesC8);
00264 
00280             IMPORT_C void SetOptL(TUint aOptionName,
00281                                   TUint aOptionLevel,
00282                                   TInt aOption);
00283 
00295             IMPORT_C void GetLocalAddrL(TInetAddr& aAddr) const;
00296 
00297         public: // New functions, for internal use
00298         
00304                 CSIPConnectionImplementation& Implementation();
00305 
00306     private: // Constructors
00307     
00308         CSIPConnection();
00309 
00310         void ConstructL(CSIP& aSIP,
00311                         TUint32 aIapId,
00312                         MSIPConnectionObserver& aObserver);
00313 
00314         private: // Data
00315         
00316                 CSIPConnectionImplementation* iImplementation;
00317                         
00318         private: // For testing purposes
00319         
00320             UNIT_TEST(CSIP_Test)
00321         UNIT_TEST(CSIPConnection_Test)
00322         UNIT_TEST(CSIPSubscribeDialogAssoc_Test)
00323         UNIT_TEST(CSIPInviteDialogAssoc_Test)
00324         UNIT_TEST(CSIPReferDialogAssoc_Test)
00325         UNIT_TEST(CSIPNotifyDialogAssoc_Test)
00326         UNIT_TEST(CSIPDialogTrying_Test)
00327         UNIT_TEST(CSIPRegistrationBinding_Test)
00328         
00329         __DECLARE_TEST;
00330         };
00331 
00332 #endif

Copyright © Nokia Corporation 2001-2007
Back to top