29 // CMceOutSession::NewL |
29 // CMceOutSession::NewL |
30 // ----------------------------------------------------------------------------- |
30 // ----------------------------------------------------------------------------- |
31 // |
31 // |
32 EXPORT_C CMceOutSession* CMceOutSession::NewL( |
32 EXPORT_C CMceOutSession* CMceOutSession::NewL( |
33 CMceManager& aManager, |
33 CMceManager& aManager, |
34 CSIPProfile& /*aProfile*/, |
34 CSIPProfile& aProfile, |
35 const TDesC8& aRecipient, |
35 const TDesC8& aRecipient, |
36 HBufC8* aOriginator ) |
36 HBufC8* aOriginator ) |
37 { |
37 { |
|
38 // Check that profile has been registered |
|
39 TBool profileRegistered = EFalse; |
|
40 |
|
41 aProfile.GetParameter( KSIPProfileRegistered, profileRegistered ); |
|
42 __ASSERT_ALWAYS( profileRegistered, User::Leave( KErrCouldNotConnect ) ); |
|
43 |
38 CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 ); |
44 CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 ); |
39 CleanupStack::PushL( self ); |
45 CleanupStack::PushL( self ); |
40 self->ConstructL( aRecipient, aOriginator ); |
46 self->ConstructL( aRecipient, aOriginator ); |
41 CleanupStack::Pop( self ); |
47 CleanupStack::Pop( self ); |
42 return self; |
48 return self; |
58 EXPORT_C CMceOutSession* CMceOutSession::NewL( CMceRefer& /*aRefer*/ ) |
64 EXPORT_C CMceOutSession* CMceOutSession::NewL( CMceRefer& /*aRefer*/ ) |
59 { |
65 { |
60 return NULL; |
66 return NULL; |
61 } |
67 } |
62 |
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CMceOutSession::NewL |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 EXPORT_C CMceOutSession* CMceOutSession::NewL() |
|
74 { |
|
75 return new( ELeave )CMceOutSession( NULL, 0 ); |
|
76 } |
63 |
77 |
64 // ----------------------------------------------------------------------------- |
78 // ----------------------------------------------------------------------------- |
65 // CMceOutSession::~CMceOutSession |
79 // CMceOutSession::~CMceOutSession |
66 // ----------------------------------------------------------------------------- |
80 // ----------------------------------------------------------------------------- |
67 // |
81 // |
158 // CMceOutSession::ConstructL |
169 // CMceOutSession::ConstructL |
159 // ----------------------------------------------------------------------------- |
170 // ----------------------------------------------------------------------------- |
160 // |
171 // |
161 void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator ) |
172 void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator ) |
162 { |
173 { |
163 |
|
164 delete iRecipient; |
174 delete iRecipient; |
165 iRecipient = NULL; |
175 iRecipient = NULL; |
166 iRecipient = aRecipient.AllocL(); |
176 iRecipient = aRecipient.AllocL(); |
167 |
177 |
168 delete iOriginator; |
178 delete iOriginator; |