deviceupdatesui/deviceupdates/src/nsmldmsyncprofile.cpp
changeset 37 1cab1a4490f8
parent 36 9eefb50e711a
equal deleted inserted replaced
36:9eefb50e711a 37:1cab1a4490f8
   615 	
   615 	
   616     if (!iConnectionOpen)	
   616     if (!iConnectionOpen)	
   617     	{
   617     	{
   618     	return;
   618     	return;
   619     	}
   619     	}
       
   620     TBuf<KBufSize256> newUrl;
       
   621     convertBackslashinUrl(aText,newUrl);
       
   622     
   620 	if (BearerType() != EAspBearerInternet)
   623 	if (BearerType() != EAspBearerInternet)
   621 		{
   624 		{
   622 		// port number handling is for internet bearer only 
   625 		// port number handling is for internet bearer only 
   623 		TUtil::StrCopy(iBuf, aText); 
   626 		TUtil::StrCopy(iBuf, newUrl); 
   624 		}
   627 		}
   625 	else
   628 	else
   626 		{
   629 		{
   627 		TURIParser parser(aText);
   630 		TURIParser parser(newUrl);
   628 	    parser.GetUri(iBuf, aPort);
   631 	    parser.GetUri(iBuf, aPort);
   629 		}
   632 		}
   630 	
   633 	
   631 	TUtil::StrCopy( iBuf8, iBuf );
   634 	TUtil::StrCopy( iBuf8, iBuf );
   632 	iConnection.SetServerURIL( iBuf8 );
   635 	iConnection.SetServerURIL( iBuf8 );
   633 	}
   636 	}
   634 
   637 
       
   638 void CNSmlDMSyncProfile::convertBackslashinUrl(const TDesC& aUrl, TDes& aModifiedUrl )
       
   639     {    
       
   640     TBuf<KBufSize16> backSlash(KBackSlash);  
       
   641     TBuf<KBufSize16> forwardSlash(KSlash);
       
   642     for (TInt i = 0; i < aUrl.Length(); i++)
       
   643         {
       
   644         TChar ch = aUrl[i];        
       
   645         if (ch == backSlash[0] )
       
   646             {
       
   647             aModifiedUrl.Append(forwardSlash[0]);
       
   648             }
       
   649         else
       
   650             {
       
   651             aModifiedUrl.Append(ch);
       
   652             }
       
   653         }   
       
   654     }
   635 // -----------------------------------------------------------------------------
   655 // -----------------------------------------------------------------------------
   636 // CNSmlDMSyncProfile::GetUserNameL
   656 // CNSmlDMSyncProfile::GetUserNameL
   637 // -----------------------------------------------------------------------------
   657 // -----------------------------------------------------------------------------
   638 //
   658 //
   639 void CNSmlDMSyncProfile::GetUserName(TDes& aText)
   659 void CNSmlDMSyncProfile::GetUserName(TDes& aText)