|
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 : MDialogOwner.h |
|
16 * Part of : SIPDialogs |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef MDIALOGOWNER_H |
|
29 #define MDIALOGOWNER_H |
|
30 |
|
31 #include "SipStackServerDefs.h" |
|
32 class CSIPRequest; |
|
33 class CSIPResponse; |
|
34 class TSIPTransportParams; |
|
35 class MSIPSecUser; |
|
36 |
|
37 |
|
38 /** |
|
39 * This class defines the events which the Dialogs subsystem will send |
|
40 * to server core. |
|
41 */ |
|
42 class MDialogOwner |
|
43 { |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Virtual destructor |
|
48 */ |
|
49 virtual ~MDialogOwner() { } |
|
50 |
|
51 /** |
|
52 * Dialogs has received a SIP request from transaction user or refreshes |
|
53 * and passes the message to upper layer. |
|
54 * |
|
55 * @param aTransactionId Identifies the transaction |
|
56 * @param aDialogId Dialog identifier |
|
57 * @param aRequest SIP request. The ownership is transferred. |
|
58 */ |
|
59 virtual void DialogsReceivedL (TTransactionId aTransactionId, |
|
60 TDialogId aDialogId, |
|
61 CSIPRequest* aRequest) = 0; |
|
62 |
|
63 /** |
|
64 * Dialogs has received a SIP provisional response or error |
|
65 * response to a previously issued SIP request and dialog id |
|
66 * does not yet exist. |
|
67 * |
|
68 * @param aTransactionId Identifies the transaction |
|
69 * @param aResponse SIP response. The ownership is transferred. |
|
70 */ |
|
71 virtual void DialogsReceivedL (TTransactionId aTransactionId, |
|
72 CSIPResponse* aResponse) = 0; |
|
73 |
|
74 /** |
|
75 * Dialog manager has received a SIP response from transaction user or |
|
76 * refreshes and passes the message to upper layer. |
|
77 * |
|
78 * @pre Server core has been sent a request to the dialog manager. |
|
79 * @param aTransactionId Transaction ID |
|
80 * @param aRefreshId Refresh ID |
|
81 * @param aDialogId Dialog ID |
|
82 * @param aResponse SIP Response. The ownership is transferred. |
|
83 */ |
|
84 virtual void DialogsReceivedL (TTransactionId aTransactionId, |
|
85 TRefreshId aRefreshId, |
|
86 TDialogId aDialogId, |
|
87 CSIPResponse* aResponse) = 0; |
|
88 |
|
89 /** |
|
90 * The specified transaction has ended. A dialogs has not received |
|
91 * response for this request. |
|
92 * |
|
93 * @param aTransaction identifies the transaction that ended |
|
94 * |
|
95 * @param aReason Tells why the transaction ended. |
|
96 * |
|
97 * @returns value KErrNone if successful, otherwise a system wide error code |
|
98 */ |
|
99 virtual TInt DialogsError (TTransactionId aTransactionId, |
|
100 TInt aReason) = 0; |
|
101 |
|
102 /** |
|
103 * The specified transaction/refresh has ended. |
|
104 * |
|
105 * @param aTransactionId Transaction ID |
|
106 * @param aRefreshId Refresh ID |
|
107 * @param aDialogId Dialog ID |
|
108 * @param aReason Tells why the transaction ended. |
|
109 * @returns KErrNone if successful, otherwise a system wide error code |
|
110 */ |
|
111 virtual TInt DialogsError (TTransactionId aTransactionId, |
|
112 TRefreshId aRefreshId, |
|
113 TDialogId aDialogId, |
|
114 TInt aReason) = 0; |
|
115 /** |
|
116 * The specified INVITE transaction has ended successfully. |
|
117 * |
|
118 * @param aId identifies the transaction that ended |
|
119 * |
|
120 * @returns value KErrNone if successful, otherwise a system wide error code |
|
121 */ |
|
122 virtual TInt InviteTransactionCompleted (TTransactionId aId) = 0; |
|
123 |
|
124 /** |
|
125 * Gets the transport parameters to be passed to TU or Refreshes |
|
126 * when sending a SIP request or a response. |
|
127 * |
|
128 * @param aRegistrationId the registration id |
|
129 * |
|
130 * @returns the transport parameters |
|
131 */ |
|
132 virtual TSIPTransportParams TransportParams( |
|
133 const TRegistrationId& aRegistrationId) = 0; |
|
134 |
|
135 /** |
|
136 * Gets the MSIPSecUser related to the given registration id. |
|
137 * |
|
138 * @param aRegistrationId the registration id |
|
139 * |
|
140 * @returns the user related to the given registration id if found, |
|
141 * otherwise NULL. |
|
142 */ |
|
143 virtual const MSIPSecUser* SIPSecUser( |
|
144 const TRegistrationId& aRegistrationId) = 0; |
|
145 }; |
|
146 |
|
147 #endif // MDIALOGOWNER_H |
|
148 |
|
149 // End of File |