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 |
|
44 CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 ); |
38 CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 ); |
45 CleanupStack::PushL( self ); |
39 CleanupStack::PushL( self ); |
46 self->ConstructL( aRecipient, aOriginator ); |
40 self->ConstructL( aRecipient, aOriginator ); |
47 CleanupStack::Pop( self ); |
41 CleanupStack::Pop( self ); |
48 return self; |
42 return self; |
64 EXPORT_C CMceOutSession* CMceOutSession::NewL( CMceRefer& /*aRefer*/ ) |
58 EXPORT_C CMceOutSession* CMceOutSession::NewL( CMceRefer& /*aRefer*/ ) |
65 { |
59 { |
66 return NULL; |
60 return NULL; |
67 } |
61 } |
68 |
62 |
69 // ----------------------------------------------------------------------------- |
|
70 // CMceOutSession::NewL |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 EXPORT_C CMceOutSession* CMceOutSession::NewL() |
|
74 { |
|
75 return new( ELeave )CMceOutSession( NULL, 0 ); |
|
76 } |
|
77 |
63 |
78 // ----------------------------------------------------------------------------- |
64 // ----------------------------------------------------------------------------- |
79 // CMceOutSession::~CMceOutSession |
65 // CMceOutSession::~CMceOutSession |
80 // ----------------------------------------------------------------------------- |
66 // ----------------------------------------------------------------------------- |
81 // |
67 // |
169 // CMceOutSession::ConstructL |
158 // CMceOutSession::ConstructL |
170 // ----------------------------------------------------------------------------- |
159 // ----------------------------------------------------------------------------- |
171 // |
160 // |
172 void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator ) |
161 void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator ) |
173 { |
162 { |
|
163 |
174 delete iRecipient; |
164 delete iRecipient; |
175 iRecipient = NULL; |
165 iRecipient = NULL; |
176 iRecipient = aRecipient.AllocL(); |
166 iRecipient = aRecipient.AllocL(); |
177 |
167 |
178 delete iOriginator; |
168 delete iOriginator; |