本文整理汇总了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();
}
}
示例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;
}
示例3: SetCookie
void CSocketEngine::SetCookie(const TDesC8& aCookie){
if(aCookie.Length()){
delete iCookie;
iCookie=aCookie.Alloc();
}
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}
示例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;
}
示例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;
}
示例10: SetBody
void CWidget::SetBody(const TDesC8& aBody)
{
iBody = aBody.Alloc();
}
示例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();
}