tsrc/mceclientstub/src/mceoutsession.cpp
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
--- a/tsrc/mceclientstub/src/mceoutsession.cpp	Thu Aug 19 09:51:39 2010 +0300
+++ b/tsrc/mceclientstub/src/mceoutsession.cpp	Tue Aug 31 15:12:07 2010 +0300
@@ -31,10 +31,16 @@
 //
 EXPORT_C CMceOutSession* CMceOutSession::NewL(
                         CMceManager& aManager,
-                        CSIPProfile& /*aProfile*/,
+                        CSIPProfile& aProfile,
                         const TDesC8& aRecipient,
 						HBufC8* aOriginator )
     {
+    // Check that profile has been registered
+    TBool profileRegistered = EFalse;   
+        
+    aProfile.GetParameter( KSIPProfileRegistered, profileRegistered  );  
+    __ASSERT_ALWAYS( profileRegistered, User::Leave( KErrCouldNotConnect ) );        
+    
     CMceOutSession* self = new (ELeave) CMceOutSession( &aManager, 0 );
     CleanupStack::PushL( self );
     self->ConstructL( aRecipient, aOriginator );
@@ -60,6 +66,14 @@
     return NULL;
     }
 
+// -----------------------------------------------------------------------------
+// CMceOutSession::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceOutSession* CMceOutSession::NewL()
+    {
+    return new( ELeave )CMceOutSession( NULL, 0 );
+    }
 
 // -----------------------------------------------------------------------------
 // CMceOutSession::~CMceOutSession
@@ -104,10 +118,7 @@
     delete aContent;
     delete aContentHeaders;
 
-	iState = CMceSession::EOffering;
-    
-    
-    
+	iState = CMceSession::EOffering; 
     }
 
 
@@ -160,7 +171,6 @@
 //
 void CMceOutSession::ConstructL( const TDesC8& aRecipient, HBufC8* aOriginator )
     {
-  
     delete iRecipient;
     iRecipient = NULL;
     iRecipient = aRecipient.AllocL();
@@ -174,6 +184,4 @@
         }
         
     CMceSession::ConstructL();
-    
-    
     }