|
1 /* |
|
2 * Copyright (c) 2004 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: Implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <sipinvitedialogassoc.h> |
|
19 #include <sipsubscribedialogassoc.h> |
|
20 #include <sipnotifydialogassoc.h> |
|
21 #include <sipreferdialogassoc.h> |
|
22 |
|
23 #include <sipstrings.h> |
|
24 #include "SipStrConsts.h" |
|
25 #include "TTcSIPReceived.h" |
|
26 |
|
27 TTcSIPReceived::TTcSIPReceived() |
|
28 : iClientTransaction( NULL ), |
|
29 iDialog( NULL ), |
|
30 iInviteDialogAssoc( NULL ), |
|
31 iNotifyDialogAssoc( NULL ), |
|
32 iSubscribeDialogAssoc( NULL ), |
|
33 iReferDialogAssoc( NULL ), |
|
34 iRefresh( NULL ), |
|
35 iRegistration( NULL ), |
|
36 iServerTransaction( NULL ), |
|
37 iTransactionBase( NULL ), |
|
38 iIapId( 0 ), |
|
39 iError( KErrNone ), |
|
40 iEvent( TTcSIPReceived::ENone ) |
|
41 { |
|
42 } |
|
43 |
|
44 TTcSIPReceived::~TTcSIPReceived() |
|
45 { |
|
46 } |
|
47 |
|
48 void TTcSIPReceived::Set( const CSIPClientTransaction* aTransaction ) |
|
49 { |
|
50 iClientTransaction = aTransaction; |
|
51 } |
|
52 |
|
53 void TTcSIPReceived::Set( const CSIPDialog* aDialog ) |
|
54 { |
|
55 iDialog = aDialog; |
|
56 } |
|
57 |
|
58 void TTcSIPReceived::Set( const CSIPDialogAssocBase* aDialogAssoc ) |
|
59 { |
|
60 if( aDialogAssoc->Type() == SIPStrings::StringF( SipStrConsts::EInvite ) ) |
|
61 { |
|
62 iInviteDialogAssoc = static_cast< const CSIPInviteDialogAssoc* >( aDialogAssoc ); |
|
63 } |
|
64 if( aDialogAssoc->Type() == SIPStrings::StringF( SipStrConsts::ESubscribe ) ) |
|
65 { |
|
66 iSubscribeDialogAssoc = static_cast< const CSIPSubscribeDialogAssoc* >( aDialogAssoc ); |
|
67 } |
|
68 if( aDialogAssoc->Type() == SIPStrings::StringF( SipStrConsts::ERefer ) ) |
|
69 { |
|
70 iReferDialogAssoc = static_cast< const CSIPReferDialogAssoc* >( aDialogAssoc ); |
|
71 } |
|
72 if( aDialogAssoc->Type() == SIPStrings::StringF( SipStrConsts::ENotify ) ) |
|
73 { |
|
74 iNotifyDialogAssoc = static_cast< const CSIPNotifyDialogAssoc* >( aDialogAssoc ); |
|
75 } |
|
76 } |
|
77 |
|
78 void TTcSIPReceived::Set( const CSIPInviteDialogAssoc* aDialogAssoc ) |
|
79 { |
|
80 iInviteDialogAssoc = aDialogAssoc; |
|
81 } |
|
82 |
|
83 void TTcSIPReceived::Set( const CSIPNotifyDialogAssoc* aDialogAssoc ) |
|
84 { |
|
85 iNotifyDialogAssoc = aDialogAssoc; |
|
86 } |
|
87 |
|
88 void TTcSIPReceived::Set( const CSIPReferDialogAssoc* aDialogAssoc ) |
|
89 { |
|
90 iReferDialogAssoc = aDialogAssoc; |
|
91 } |
|
92 |
|
93 void TTcSIPReceived::Set( const CSIPRefresh* aRefresh ) |
|
94 { |
|
95 iRefresh = aRefresh; |
|
96 } |
|
97 |
|
98 void TTcSIPReceived::Set( const CSIPRegistrationBinding* aRegistration ) |
|
99 { |
|
100 iRegistration = aRegistration; |
|
101 } |
|
102 |
|
103 void TTcSIPReceived::Set( const CSIPServerTransaction* aTransaction ) |
|
104 { |
|
105 iServerTransaction = aTransaction; |
|
106 } |
|
107 |
|
108 void TTcSIPReceived::Set( const CSIPTransactionBase* aTransactionBase ) |
|
109 { |
|
110 iTransactionBase = aTransactionBase; |
|
111 } |
|
112 |
|
113 void TTcSIPReceived::Set( TInt aIapId ) |
|
114 { |
|
115 iIapId = aIapId; |
|
116 } |
|
117 |
|
118 void TTcSIPReceived::SetError( TInt aError ) |
|
119 { |
|
120 iError = aError; |
|
121 } |
|
122 |
|
123 void TTcSIPReceived::SetEvent( TTcSIPEvent aEvent ) |
|
124 { |
|
125 iEvent = aEvent; |
|
126 } |
|
127 |