当前位置: 首页>>代码示例>>C++>>正文


C++ TDesC8::Alloc方法代码示例

本文整理汇总了C++中TDesC8::Alloc方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC8::Alloc方法的具体用法?C++ TDesC8::Alloc怎么用?C++ TDesC8::Alloc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDesC8的用法示例。


在下文中一共展示了TDesC8::Alloc方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetReferer

void CSocketEngine::SetReferer(const TDesC8& aReferer){
  if(aReferer.Length()){
    delete iReferer;
    iReferer=aReferer.Alloc();
  }
  
}
开发者ID:rusteer,项目名称:symbian,代码行数:7,代码来源:SocketEngine.cpp

示例2: ResponseReceived

// ---------------------------------------------------------------------------
// 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;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:37,代码来源:catalogshttptransaction.cpp

示例3: SetCookie

void CSocketEngine::SetCookie(const TDesC8& aCookie){
  if(aCookie.Length()){
    delete iCookie;
    iCookie=aCookie.Alloc();
  }
  
}
开发者ID:rusteer,项目名称:symbian,代码行数:7,代码来源:SocketEngine.cpp

示例4: SetURI

 /**
  * 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();
     }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:13,代码来源:epos_comasuplstartver2.cpp

示例5: SetIMSPublicId

 /**
  * 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();
     }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:13,代码来源:epos_comasuplstartver2.cpp

示例6: SetSipUri

 /**
  * 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();
     }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:13,代码来源:epos_comasuplstartver2.cpp

示例7: SendRequest

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);
	}
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:14,代码来源:HandleOutSearch.cpp

示例8: SetBrandId

// ---------------------------------------------------------------------------
// 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;
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:21,代码来源:ut_dummyvoicemailboxentry.cpp

示例9: AttributeValue

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;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:24,代码来源:mediainformationapi.cpp

示例10: SetBody

void CWidget::SetBody(const TDesC8& aBody)
{
	iBody = aBody.Alloc();
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:4,代码来源:Widgets.cpp

示例11: SetLink

/*
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();
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:20,代码来源:Widgets.cpp


注:本文中的TDesC8::Alloc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。