mmsharing/mmshavailability/src/musavasettingsimp.cpp
branchRCL_3
changeset 22 73a1feb507fb
parent 21 33a5d2bbf6fc
child 23 bc78a40cd63c
--- a/mmsharing/mmshavailability/src/musavasettingsimp.cpp	Thu Aug 19 09:51:39 2010 +0300
+++ b/mmsharing/mmshavailability/src/musavasettingsimp.cpp	Tue Aug 31 15:12:07 2010 +0300
@@ -56,9 +56,6 @@
 
     delete iContactName;
     iContactName = NULL;
-    
-    delete iOptionSentTelNumber;
-    iOptionSentTelNumber = NULL ;
 
     delete iSipAddressProposal;
     iSipAddressProposal = NULL ;
@@ -84,7 +81,8 @@
         iAudioCodecs = NULL ;
         }
     
-
+    delete iContactResolvingUri;
+    
     MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::~CMusAvaSettingsImp()" )
     }
 
@@ -92,9 +90,9 @@
 // C++ Constructor
 // -----------------------------------------------------------------------------
 //
-CMusAvaSettingsImp::CMusAvaSettingsImp()
+CMusAvaSettingsImp::CMusAvaSettingsImp() :
+    iFastMode( MusSettingsKeys::EFastModeOff )
     {
-
     }
 
 // -----------------------------------------------------------------------------
@@ -105,8 +103,6 @@
     {
     MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::ConstructL()" )
     iTelNumber = HBufC::NewL( 0 );
-    
-    iOptionSentTelNumber = HBufC::NewL( 0 );
 
     iContactName = HBufC::NewL( 0 );
 
@@ -123,8 +119,7 @@
     iAudioCodecs = new( ELeave ) CDesCArrayFlat( 1 );
 
     MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::ConstructL()" )
-    }  
-
+    }        
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -133,7 +128,6 @@
 	{
 	return iManualActivation;	
 	}
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -149,51 +143,6 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CMusAvaSettingsImp::SetOptionSentNumber( const TDesC& aTelNumber )
-	{
-    MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::SetOptionSentNumber() " )
-    MUS_LOG_TDESC( "mus: [MUSAVA]	   aTelNumber = ", aTelNumber )
-    delete iOptionSentTelNumber;
-    iOptionSentTelNumber = NULL ;
-    TRAPD ( error , iOptionSentTelNumber = aTelNumber.AllocL() );
-    if ( error )
-    	{
-        MUS_LOG1("CMusAvaSettingsImp::SetOptionSentNumber() leave code: %d ", error);
-    	}
-    MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::SetOptionSentNumber() " )
-	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-const TDesC& CMusAvaSettingsImp::OptionSentTelNumber() const
-	{
-    MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::OptionSentTelNumber() " )
-	return *iOptionSentTelNumber;
-	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CMusAvaSettingsImp::ReleaseOptionSentNumber ()
-	{
-	MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::ReleaseOptionSentNumber() " )
-	delete iOptionSentTelNumber;
-	iOptionSentTelNumber = NULL;
-	TRAPD ( err , iOptionSentTelNumber = HBufC::NewL( 0 ) );
-    if ( err )
-    	{
-        MUS_LOG1("CMusAvaSettingsImp::ReleaseOptionSentNumber() leave code: %d ", err);
-    	}
-	MUS_LOG( "mus: [MUSAVA]	<- CMusAvaSettingsImp::ReleaseOptionSentNumber() " )
-	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
 const TDesC& CMusAvaSettingsImp::ContactName() const
     {
     MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::ContactName()" )
@@ -445,6 +394,15 @@
 //
 // -----------------------------------------------------------------------------
 //
+MMusAvaSettingsObserver* CMusAvaSettingsImp::Observer()
+    {
+    return iObserver;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 void CMusAvaSettingsImp::SetManualActivation( TManualActivation aManualActivation )
     {
     MUS_LOG( "mus: [MUSAVA]	-> CMusAvaSettingsImp::SetManualActivation" )
@@ -471,6 +429,7 @@
     return state;
     }
 
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -488,23 +447,48 @@
 	{
 	iCallDirection = aDirection;	
 	}
-    
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusAvaSettingsImp::SetFastMode( MusSettingsKeys::TFastMode aMode )
+    {
+    iFastMode = aMode;    
+    }
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
-TInt CMusAvaSettingsImp::CallPrivacy()
-	{
-	return iCallPrivacy;	
-	}
-	
+MusSettingsKeys::TFastMode CMusAvaSettingsImp::FastMode() const
+    {
+    return iFastMode;
+    }
+
+// -----------------------------------------------------------------------------
+// In case of not having tel number, contact for remote end may be searched
+// based on sip uri
 // -----------------------------------------------------------------------------
 //
+void CMusAvaSettingsImp::SetUriForContactResolvingL( 
+    const TDesC& aRemoteUri )
+    {
+    HBufC* tempResolvingUri = aRemoteUri.AllocL();
+    delete iContactResolvingUri;
+    iContactResolvingUri = tempResolvingUri;
+    }
+
+// -----------------------------------------------------------------------------
+// 
 // -----------------------------------------------------------------------------
 //
-void CMusAvaSettingsImp:: SetCallPrivacy( TInt aPrivacy )
-	{
-	iCallPrivacy = aPrivacy;	
-	}
-
-// end of file
+TPtrC CMusAvaSettingsImp::ContactResolvingUri()
+    {
+    TPtrC resolvingUri( KNullDesC );
+    if ( iContactResolvingUri )
+        {
+        resolvingUri.Set( iContactResolvingUri->Des() );
+        }
+    return resolvingUri;
+    }