1.1 --- a/epoc32/include/sipdialogassocbase.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,164 +0,0 @@
1.4 -/*
1.5 -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description:
1.18 -* Name : sipdialogassocbase.h
1.19 -* Part of : SIP Client
1.20 -* Interface : SDK API, SIP Client API
1.21 -* Version : 1.0
1.22 -*
1.23 -*/
1.24 -
1.25 -
1.26 -
1.27 -#ifndef CSIPDIALOGASSOCBASE_H
1.28 -#define CSIPDIALOGASSOCBASE_H
1.29 -
1.30 -// INCLUDES
1.31 -#include <stringpool.h>
1.32 -#include "_sipcodecdefs.h"
1.33 -
1.34 -// FORWARD DECLARATIONS
1.35 -class CSIPMessageElements;
1.36 -class CSIPClientTransaction;
1.37 -class CSIPDialog;
1.38 -class CSIPRefresh;
1.39 -class CSIPServerTransaction;
1.40 -class CSIPDialogAssocImplementation;
1.41 -
1.42 -// CLASS DECLARATION
1.43 -
1.44 -/**
1.45 -* @publishedAll
1.46 -* @released
1.47 -*
1.48 -* Base class for SIP dialog associations. It provides services for getting
1.49 -* associated SIP dialog, actual dialog association type and for sending non
1.50 -* target refresh requests within the dialog association.
1.51 -* @lib sipclient
1.52 -*/
1.53 -class CSIPDialogAssocBase : public CBase
1.54 - {
1.55 - public: // Destructor
1.56 -
1.57 - /**
1.58 - * Destructor
1.59 - * @internalComponent
1.60 - */
1.61 - virtual ~CSIPDialogAssocBase();
1.62 -
1.63 - public: // New functions
1.64 -
1.65 - /**
1.66 - * Gets the dialog this dialog association belongs to
1.67 - * @return associated dialog
1.68 - */
1.69 - IMPORT_C const CSIPDialog& Dialog() const;
1.70 -
1.71 - /**
1.72 - * Gets dialog this dialog association belongs to
1.73 - * @return associated dialog
1.74 - */
1.75 - IMPORT_C CSIPDialog& Dialog();
1.76 -
1.77 - /**
1.78 - * Creates SIP request and sends it to the remote target.
1.79 - * This function should be used for sending SIP extension
1.80 - * requests within dialog assocation that do not cause
1.81 - * sip dialog associations to be created. In SIP terms
1.82 - * this request is non target refresh request.
1.83 - * @pre SIPDialog().State() != CSIPDialog::EInit &&
1.84 - * SIPDialog().State() != CSIPDialog::ETerminated
1.85 - * @pre Dialog().Connection().State() == EActive
1.86 - * @pre aMethod != "REGISTER" |"INVITE" | "BYE" | "CANCEL" | "ACK" |
1.87 - * "SUBSCRIBE" | "NOTIFY" | "UPDATE" | "PRACK" | "REFER"
1.88 - * @param aElements contains optional SIP message headers and body.
1.89 - * Ownership is transferred.
1.90 - * @return SIP extension client transaction. Ownership is transferred.
1.91 - * @leave KErrSIPInvalidDialogState If dialog's state is not correct
1.92 - * @leave KErrArgument if invalid value has been set to aMethod
1.93 - * @leave KErrSIPResourceNotAvailable if a required SIP Client API
1.94 - * object has been deleted
1.95 - * @capability NetworkServices
1.96 - */
1.97 - IMPORT_C virtual CSIPClientTransaction*
1.98 - SendNonTargetRefreshRequestL(RStringF aMethod,
1.99 - CSIPMessageElements* aElements);
1.100 -
1.101 - /**
1.102 - * Gets dialog association type.
1.103 - *
1.104 - * @return dialog association type e.g. "INVITE", "SUBSCRIBE" etc...
1.105 - */
1.106 - IMPORT_C RStringF Type() const;
1.107 -
1.108 - /**
1.109 - * Tests if the request is a non target refresh request
1.110 - * @param aMethod a method to test
1.111 - * @return ETrue if is non target refresh request; EFalse otherwise
1.112 - */
1.113 - IMPORT_C TBool IsNonTargetRefreshRequest(RStringF aMethod) const;
1.114 -
1.115 - public: // New functions, for internal use
1.116 -
1.117 - /**
1.118 - * Returns the implementation instance.
1.119 - * @return CSIPDialogAssocImplementation
1.120 - */
1.121 - CSIPDialogAssocImplementation& Implementation();
1.122 -
1.123 - /**
1.124 - * Searches for a refresh with the matching id. Default implementation
1.125 - * returns NULL. Those classes derived from CSIPDialogAssocBase, which
1.126 - * can contain refreshes must implement this function for searching the
1.127 - * correct refresh.
1.128 - *
1.129 - * @return CSIPRefresh if found, NULL otherwise.
1.130 - * The ownership is not transferred.
1.131 - * @internalComponent
1.132 - */
1.133 - virtual CSIPRefresh* FindRefresh(TUint32 aRefreshId);
1.134 -
1.135 - /**
1.136 - * @internalComponent
1.137 - */
1.138 - virtual void DeletingRefresh(CSIPRefresh& aRefresh, TUint32 aRefreshId);
1.139 -
1.140 - protected: // Constructors, for internal use
1.141 -
1.142 - /*
1.143 - * Constructor
1.144 - */
1.145 - CSIPDialogAssocBase();
1.146 -
1.147 - void ConstructL(RStringF aType, CSIPDialog& aDialog);
1.148 - void ConstructL(RStringF aType,
1.149 - CSIPDialog& aDialog,
1.150 - CSIPServerTransaction& aTransaction);
1.151 -
1.152 - protected: // Data
1.153 -
1.154 - /**
1.155 - * Implementation instance, CSIPDialogAssocBase owns it
1.156 - * @internalComponent
1.157 - */
1.158 - CSIPDialogAssocImplementation* iImplementation;
1.159 -
1.160 - private: // For testing purposes
1.161 -
1.162 - UNIT_TEST(CSIPInviteDialogAssoc_Test)
1.163 -
1.164 - __DECLARE_TEST;
1.165 - };
1.166 -
1.167 -#endif