|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Name : MTransactionOwner.h |
|
16 * Part of : TransactionUser |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef MTRANSACTIONOWNER_H |
|
29 #define MTRANSACTIONOWNER_H |
|
30 |
|
31 // INCLUDES |
|
32 #include "SipStackServerDefs.h" |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CSIPRequest; |
|
36 class CSIPResponse; |
|
37 class MSIPSecUser; |
|
38 |
|
39 |
|
40 // CLASS DECLARATION |
|
41 /** |
|
42 * This class defines the events which the Transaction subsystem will send |
|
43 * to upper layers. Any subsystem which is using Transaction subsystem, has to |
|
44 * implement this class. |
|
45 */ |
|
46 class MTransactionOwner |
|
47 { |
|
48 public: |
|
49 virtual ~MTransactionOwner() {} |
|
50 |
|
51 /** |
|
52 * Transaction has received a SIP request from a remote endpoint |
|
53 * and passes it to the upper layer. |
|
54 * |
|
55 * @pre aRequest != 0 |
|
56 * |
|
57 * @param aIapId The IAP using which the request was received. |
|
58 * @param aTransactionId Identifies the transaction |
|
59 * @param aRequest IN: SIP request message. The ownership is |
|
60 * transferred. |
|
61 * If the function leaves, the ownership of aRequest is NOT transferred. |
|
62 */ |
|
63 virtual void ReceiveL(TUint32 aIapId, |
|
64 TTransactionId aTransactionId, |
|
65 CSIPRequest* aRequest) = 0; |
|
66 |
|
67 /** |
|
68 * Transaction has received a SIP response message from remote endpoint and |
|
69 * passes it to the upper layer. |
|
70 * |
|
71 * @pre aResponse != 0 |
|
72 * |
|
73 * @param aTransactionId Identifies the transaction |
|
74 * @param aResponse IN: SIP response message. The ownership is |
|
75 * transferred. |
|
76 * If the function leaves, the ownership of aResponse is NOT transferred. |
|
77 */ |
|
78 virtual void ReceiveL(TTransactionId aTransactionId, |
|
79 CSIPResponse* aResponse) = 0; |
|
80 |
|
81 /** |
|
82 * The specified transaction has ended and no more events from that |
|
83 * transaction will come through the MTransactionOwner interface. |
|
84 * |
|
85 * @pre |
|
86 * @post |
|
87 * |
|
88 * @see |
|
89 * |
|
90 * @param aIapId The IAP used. |
|
91 * @param aTransaction Identifies the transaction that ended |
|
92 * @param aReason Tells why the transaction ended. KErrNone means the |
|
93 * transaction ended normally. |
|
94 * @return value KErrNone if successful, otherwise a system wide error code |
|
95 */ |
|
96 virtual TInt TransactionEnded(TUint32 aIapId, |
|
97 TTransactionId aTransaction, |
|
98 TInt aReason) = 0; |
|
99 |
|
100 /** |
|
101 * TransactionUser is going to send the SIP request either after |
|
102 * modifications to the request, or to another address, and asks the next |
|
103 * CSeq sequence number to use for the request. |
|
104 * |
|
105 * @pre |
|
106 * @post |
|
107 * |
|
108 * @see |
|
109 * |
|
110 * @param aCSeq an in-out parameter. While entering the function contains |
|
111 * the current CSeq of the caller. On return contains the |
|
112 * incremented CSeq of the callee. If the subsystem implementing the |
|
113 * interface does not keep track of the CSeqs it should simply |
|
114 * increment aCSeq by one. |
|
115 * |
|
116 * @return KErrNone or a system wide error code. |
|
117 */ |
|
118 virtual TInt NextCSeq(TUint& aCSeq) = 0; |
|
119 |
|
120 /** |
|
121 * Returns a pointer to the MSIPSecUser that is used to map the |
|
122 * SIPSec cache entries to their users and can be used to query credentials |
|
123 * from the user. |
|
124 * |
|
125 * @return A pointer to MSIPSecUser. The ownership is not transferred. |
|
126 */ |
|
127 virtual const MSIPSecUser* SIPSecUser() const = 0; |
|
128 }; |
|
129 |
|
130 #endif // end of MTRANSACTIONOWNER_H |
|
131 |
|
132 // End of File |