Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * 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
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : sipdialogassocbase.h
16 * Part of : SIP Client
17 * Interface : SDK API, SIP Client API
24 #ifndef CSIPDIALOGASSOCBASE_H
25 #define CSIPDIALOGASSOCBASE_H
28 #include <stringpool.h>
29 #include "_sipcodecdefs.h"
31 // FORWARD DECLARATIONS
32 class CSIPMessageElements;
33 class CSIPClientTransaction;
36 class CSIPServerTransaction;
37 class CSIPDialogAssocImplementation;
45 * Base class for SIP dialog associations. It provides services for getting
46 * associated SIP dialog, actual dialog association type and for sending non
47 * target refresh requests within the dialog association.
50 class CSIPDialogAssocBase : public CBase
58 virtual ~CSIPDialogAssocBase();
60 public: // New functions
63 * Gets the dialog this dialog association belongs to
64 * @return associated dialog
66 IMPORT_C const CSIPDialog& Dialog() const;
69 * Gets dialog this dialog association belongs to
70 * @return associated dialog
72 IMPORT_C CSIPDialog& Dialog();
75 * Creates SIP request and sends it to the remote target.
76 * This function should be used for sending SIP extension
77 * requests within dialog assocation that do not cause
78 * sip dialog associations to be created. In SIP terms
79 * this request is non target refresh request.
80 * @pre SIPDialog().State() != CSIPDialog::EInit &&
81 * SIPDialog().State() != CSIPDialog::ETerminated
82 * @pre Dialog().Connection().State() == EActive
83 * @pre aMethod != "REGISTER" |"INVITE" | "BYE" | "CANCEL" | "ACK" |
84 * "SUBSCRIBE" | "NOTIFY" | "UPDATE" | "PRACK" | "REFER"
85 * @param aElements contains optional SIP message headers and body.
86 * Ownership is transferred.
87 * @return SIP extension client transaction. Ownership is transferred.
88 * @leave KErrSIPInvalidDialogState If dialog's state is not correct
89 * @leave KErrArgument if invalid value has been set to aMethod
90 * @leave KErrSIPResourceNotAvailable if a required SIP Client API
91 * object has been deleted
92 * @capability NetworkServices
94 IMPORT_C virtual CSIPClientTransaction*
95 SendNonTargetRefreshRequestL(RStringF aMethod,
96 CSIPMessageElements* aElements);
99 * Gets dialog association type.
101 * @return dialog association type e.g. "INVITE", "SUBSCRIBE" etc...
103 IMPORT_C RStringF Type() const;
106 * Tests if the request is a non target refresh request
107 * @param aMethod a method to test
108 * @return ETrue if is non target refresh request; EFalse otherwise
110 IMPORT_C TBool IsNonTargetRefreshRequest(RStringF aMethod) const;
112 public: // New functions, for internal use
115 * Returns the implementation instance.
116 * @return CSIPDialogAssocImplementation
118 CSIPDialogAssocImplementation& Implementation();
121 * Searches for a refresh with the matching id. Default implementation
122 * returns NULL. Those classes derived from CSIPDialogAssocBase, which
123 * can contain refreshes must implement this function for searching the
126 * @return CSIPRefresh if found, NULL otherwise.
127 * The ownership is not transferred.
130 virtual CSIPRefresh* FindRefresh(TUint32 aRefreshId);
135 virtual void DeletingRefresh(CSIPRefresh& aRefresh, TUint32 aRefreshId);
137 protected: // Constructors, for internal use
142 CSIPDialogAssocBase();
144 void ConstructL(RStringF aType, CSIPDialog& aDialog);
145 void ConstructL(RStringF aType,
147 CSIPServerTransaction& aTransaction);
152 * Implementation instance, CSIPDialogAssocBase owns it
155 CSIPDialogAssocImplementation* iImplementation;
157 private: // For testing purposes
159 UNIT_TEST(CSIPInviteDialogAssoc_Test)