Example #1
0
void CSocketEngine::SetReferer(const TDesC8& aReferer){
  if(aReferer.Length()){
    delete iReferer;
    iReferer=aReferer.Alloc();
  }
  
}
// ---------------------------------------------------------------------------
// Response received
// ---------------------------------------------------------------------------
//	
TBool CCatalogsHttpTransaction::ResponseReceived( TInt aResponseStatusCode, 
    const TDesC8& aResponseStatusText )
    {    
    DLTRACEIN(( "%d, text: %S", aResponseStatusCode, 
        &aResponseStatusText ));

    iResponseStatusCode = aResponseStatusCode;
    
    iResponseStatusText = aResponseStatusText.Alloc();
    
    if ( !iResponseStatusText )
        {
        return HandleHttpError( ECatalogsHttpErrorGeneral, KErrNoMemory );        
        }

    
    if ( aResponseStatusCode >= 400 ) 
        {
        iState.iOperationState = ECatalogsHttpOpFailed;
        
        return iObserver->HandleHttpError( *this, TCatalogsHttpError( 
            ECatalogsHttpErrorHttp, 
            KCatalogsErrorHttpBase - aResponseStatusCode ) );
        }
    else 
        {
        iState.iOperationState = ECatalogsHttpOpInProgress;
        iState.iProgressState = ECatalogsHttpConnected;        
        NotifyObserver();
        }
    DLTRACEOUT((""));
    return EFalse;
    }
Example #3
0
void CSocketEngine::SetCookie(const TDesC8& aCookie){
  if(aCookie.Length()){
    delete iCookie;
    iCookie=aCookie.Alloc();
  }
  
}
 /**
  * Setter method to set URI
  */
 EXPORT_C void COMASuplThirdpartyId::SetURI(const TDesC8& aURI)
     {
     if(iURI)
         {
         delete iURI;
         iURI = NULL;
         }
     iType = COMASuplThirdpartyId::EThirdPartyURI;
     iURI = aURI.Alloc();
     }
 /**
  * Setter method to set IMS public id
  */
 EXPORT_C void COMASuplThirdpartyId::SetIMSPublicId(const TDesC8& aPublicId)
     {
     if(iIMSPublicId)
         {
         delete iIMSPublicId;
         iIMSPublicId = NULL;
         }
     iType = COMASuplThirdpartyId::EThirdPartyIMSPublicId;
     iIMSPublicId = aPublicId.Alloc();
     }
 /**
  * Setter method to set SIP URI
  */
 EXPORT_C void COMASuplThirdpartyId::SetSipUri(const TDesC8& aSIPUri)
     {
     if(iSipUri)
         {
         delete iSipUri;
         iSipUri = NULL;
         }
     iType = COMASuplThirdpartyId::EThirdPartySIPURI;
     iSipUri = aSIPUri.Alloc();
     }
void  CHandleOutSearch::SendRequest(const TDesC8& aUrl)
{
	DELETE(iCurUrl);
	iCurUrl=aUrl.Alloc();
	if(CheckTemp())
	{
		iState=EHttpOutSearch;
		iHttpManager.SendGetRequest(*this,aUrl,EHttpOutSearch);
	}
	else
	{
		iObserver.HandleResponseEvent(0,EHttpOutSearch);
	}
}
// ---------------------------------------------------------------------------
// CVoiceMailboxEntry::SetBrandId
// Set Brand Id of the entry instance
// ---------------------------------------------------------------------------
//
TInt CVoiceMailboxEntry::SetBrandId( const TDesC8& aBrandId )
{
    qDebug("DummyVoiceMailboxEntry::SetBrandId >");
    TInt result( KErrNoMemory );
    if ( KVmbxMaxNumberLength < aBrandId.Length() ){
        result = KErrArgument;
    }else{
        delete iVmbxBrandId;
        iVmbxBrandId = aBrandId.Alloc();
        if ( iVmbxBrandId ){
            result = KErrNone;
        }
    }
    qDebug("DummyVoiceMailboxEntry::SetBrandId <");
    return result;
}
EXPORT_C TInt CRemConMediaInformationTarget::AttributeValue( TMediaAttributeId aAttributeId, TDesC8& aAttributeData )
	{
	// check that the values supplied were requested
	if ( KErrNotFound == iMediaAttributeIDs.Find( aAttributeId ) )
		{
		return KErrNotFound;
		}
		
	REAResponse resp;
	resp.iAttributeId = aAttributeId;
	resp.iCharset = KUtf8MibEnum;
	resp.iStringLen = aAttributeData.Length();
	resp.iString = aAttributeData.Alloc();
	if (resp.iString == NULL)
		{
		return KErrNoMemory;
		}
	TInt status = iResponse->iAttributes.Append(resp);
	if (status != KErrNone)
		{
		resp.Close();  // make sure heap string is de-allocated
		}
	return status;
	}
Example #10
0
void CWidget::SetBody(const TDesC8& aBody)
{
	iBody = aBody.Alloc();
}
Example #11
0
/*
void CWidget::SetLink(const TDesC& aLink)
{
	iLink = aLink.Alloc();
}

const TDesC& CWidget::Link() const
{
	//ASSERT(iLink);		//TODO:断言不起作用,待查
	if(iLink)
	{
		return *iLink;
	}
	return KNullDesC;
}
*/
void CWidget::SetLink(const TDesC8& aLink)
{
	iLink = aLink.Alloc();
}