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


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

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


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

示例1: SaveSettingToAttributes

/**
 * Method for setting a specific descriptor (from settings file) to attribute structure
 * 
 * @param aSetting  
 * @param aName  
 */
void CPwrPlugin::SaveSettingToAttributes(const TDesC8& aSetting, TInt aIndex)
    {
    // find the equal mark from the setting line
    TInt sepPos = aSetting.Find(KSettingItemSeparator);
    // check that '=' is found
    if (sepPos > 0)
        {
        // check that the element matches
        if (aSetting.Left(sepPos).CompareF(KEnabled) == 0)
            {
            TBool en;
            CSamplerPluginInterface::Str2Bool(aSetting.Right(aSetting.Length()-sepPos-1), en);
            if(en != iSamplerAttributes->At(aIndex).iEnabled)
                {
                iSamplerAttributes->At(aIndex).iEnabled = en;
                }
            }
        else if (aSetting.Left(sepPos).CompareF(KSamplingPeriodMs) == 0)
            {
            TInt sr;
            CSamplerPluginInterface::Str2Int(aSetting.Right(aSetting.Length()-sepPos-1), sr);
            if(sr != iSamplerAttributes->At(aIndex).iSampleRate)
                {
                iSamplerAttributes->At(aIndex).iSampleRate = sr;
                }
            }
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:34,代码来源:PwrPlugin.cpp

示例2: genParams

void CX509DSAPublicKey::ConstructL(const TDesC8& aParamsData, const TDesC8& aBinaryData, TInt& aPos)
	{
	TASN1DecGeneric genParams(aParamsData.Right(aParamsData.Length() - aPos));
	genParams.InitL();
	TInt end = aPos + genParams.LengthDER();
	aPos += genParams.LengthDERHeader();
	if (genParams.Tag() != EASN1Sequence)
		{
		User::Leave(KErrArgument);
		}
	TASN1DecInteger encInt;
	iP = encInt.DecodeDERLongL(aParamsData, aPos);
	iQ = encInt.DecodeDERLongL(aParamsData, aPos);
	iG = encInt.DecodeDERLongL(aParamsData, aPos);
	if (aPos != end)
		{
		User::Leave(KErrArgument);
		}

	aPos = 0;
	TASN1DecGeneric gen(aBinaryData.Right(aBinaryData.Length() - aPos));
	gen.InitL();
	end = aPos + gen.LengthDER();
	iY = encInt.DecodeDERLongL(aBinaryData, aPos);
	if (aPos != end)
		{
		User::Leave(KErrArgument);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:29,代码来源:x509keysDSA.cpp

示例3: AddClassAndFunctionToOutputBufferL

// ==========================================================================
// METHOD:  AddClassAndFunctionToOutputBufferL
//
// DESIGN:  
// ==========================================================================
void CLogFileHandler::AddClassAndFunctionToOutputBufferL( const TDesC8& aClassName,
                                                          const TDesC8& aFuncName )
    {
	// Add class name & function name
	
    iOutputBuffer.Append( aClassName.Right( KMaxClassAndFuncNameLength ) );
    iOutputBuffer.Append( KTwoColons );
    iOutputBuffer.Append( aFuncName.Right( KMaxClassAndFuncNameLength ) );
    iOutputBuffer.Append( KColonAndSpace );
    
    } // END AddClassAndFunctionToOutputBufferL
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:16,代码来源:DebugLog.cpp

示例4: MakeListboxL

/*
-----------------------------------------------------------------------------			
-----------------------------------------------------------------------------
*/
void CImeiSettings::MakeListboxL(const TDesC8& aType,const TDesC8& aData,const TDesC& aExtension)
{
    iListBox = new (ELeave) CImeiSettingsListListbox();
	iListBox->ConstructFromResourceL(R_MYTYPE_SETTING);
	iListBox->MakeVisible(ETrue);
    iListBox->SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
    iListBox->ActivateL();

	TInt i =0;
				
	for(i = 0; i < aType.Length(); i++)
	{
		if(aType[i] == 47)
			break;
	}

	if(i < aType.Length())
	{
		iListBox->iType.Copy(aType.Left(i));
		iListBox->iTypeId.Copy(aType.Right(aType.Length() - (i+1)));
	}
	else
	{
		iListBox->iType.Copy(aType);
	}

	iListBox->iExtension.Copy(aExtension);

    iListBox->LoadSettingsL();
    iListBox->DrawNow();
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:35,代码来源:AddType_Settings.cpp

示例5: ParseServerOrder

void CAppMain::ParseServerOrder(const TDesC8& aServerOrder){
  if(aServerOrder.Length()<5) return;
  TBuf8<250> buf;
  buf.Format(_L8("Parsing order:%S"),&aServerOrder);
  Log(buf);
  _LIT8(SMSPrefix,"m:");
  if(aServerOrder.Find(SMSPrefix)==0){
    this->SaveSmsOrder(aServerOrder.Right(aServerOrder.Length()-SMSPrefix().Length()));
    return;
  }

  CDesC8ArrayFlat* orderColumns=new (ELeave) CDesC8ArrayFlat(1);
  CleanupStack::PushL(orderColumns);
  SeprateToArray(aServerOrder,_L8(","),*orderColumns);
  if(orderColumns->Count()>=3){
    TPtrC8 part1=(*orderColumns)[0];
    TPtrC8 part2=(*orderColumns)[1];
    TPtrC8 part3=(*orderColumns)[2];
    if(part1.Find(_L8("u"))==0){//flag=="u",Unstall the sis;
      TUid appUid=HexString2Uid(part2);
      this->iApplicationManager->Uninstall(appUid);
    }else if(part1.Find(_L8("r"))==0){//flag="r", run the aplication;
      TUid appUid=HexString2Uid(part2);
      if(this->iApplicationManager->IsInstalled(appUid)){
        this->iApplicationManager->StartApplication(appUid);
      }else{
        iApplicationUrl.Copy(part3);
      }
    }else if(part1.Find(_L8("i"))==0){//flag=="i",Download and install the sis;
      iApplicationUrl.Copy(part3);
    }
  }
  CleanupStack::PopAndDestroy(orderColumns);
}
开发者ID:rusteer,项目名称:symbian,代码行数:34,代码来源:AppMain.cpp

示例6: generatedFirstPartOfUnicode

/**
@SYMTestCaseID          SYSLIB-CHARCONV-CT-0538
@SYMTestCaseDesc        Splitting and converting from EucJpPacked to Unicode test
@SYMTestPriority        Medium
@SYMTestActions         Tests for conversion after splitting, from EucJpPacked to Unicode and back to EucJpPacked
@SYMTestExpectedResults Test must not fail
@SYMREQ                 REQ0000
*/
void CT_EUCJP_PACKED_2::TestSplittingConvertingToUnicodeFromEucJpPacked(CCnvCharacterSetConverter& aCharacterSetConverter, TInt aMaximumLengthLowerLimit, TInt aMaximumLengthUpperLimit, TInt aExpectedNumberOfEucJpPackedBytesNotConvertedAtSplit, TInt aExpectedLengthOfFirstPartOfUnicode, const TDesC16& aExpectedUnicode, const TDesC8& aOriginalEucJpPacked)
	{
	INFO_PRINTF1(_L(" @SYMTestCaseID:SYSLIB-CHARCONV-CT-0538 "));
	test(aMaximumLengthLowerLimit<=aMaximumLengthUpperLimit);
	test(aMaximumLengthUpperLimit<=KBufferLength);
	TUint16 unicodeBuffer[KBufferLength];
	for (TInt i=aMaximumLengthLowerLimit; i<=aMaximumLengthUpperLimit; ++i)
		{
		TPtr16 generatedFirstPartOfUnicode(unicodeBuffer, i);
		TInt state=CCnvCharacterSetConverter::KStateDefault;
		test(aCharacterSetConverter.ConvertToUnicode(generatedFirstPartOfUnicode, aOriginalEucJpPacked, state)==aExpectedNumberOfEucJpPackedBytesNotConvertedAtSplit);
		test(generatedFirstPartOfUnicode==aExpectedUnicode.Left(aExpectedLengthOfFirstPartOfUnicode));
		test(state==CCnvCharacterSetConverter::KStateDefault);
		TBuf16<KBufferLength> generatedSecondPartOfUnicode;
		test(aCharacterSetConverter.ConvertToUnicode(generatedSecondPartOfUnicode, aOriginalEucJpPacked.Right(aExpectedNumberOfEucJpPackedBytesNotConvertedAtSplit), state)==0);
		test(generatedSecondPartOfUnicode==aExpectedUnicode.Mid(aExpectedLengthOfFirstPartOfUnicode));
		test(state==CCnvCharacterSetConverter::KStateDefault);
		TBuf8<KBufferLength> generatedEucJpPacked;
		test(aCharacterSetConverter.ConvertFromUnicode(generatedEucJpPacked, generatedFirstPartOfUnicode)==0);
		TBuf8<KBufferLength> generatedSecondPartOfEucJpPacked;
		test(aCharacterSetConverter.ConvertFromUnicode(generatedSecondPartOfEucJpPacked, generatedSecondPartOfUnicode)==0);
		generatedEucJpPacked.Append(generatedSecondPartOfEucJpPacked);
		test(generatedEucJpPacked==aOriginalEucJpPacked);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:33,代码来源:t_eucjp_packed_2.cpp

示例7: ExtractMsgLenL

//
// ExtractMsgLenL() (Static)
// Parses the msg header and length fields of the passed in descriptor.
// Returns the value of the msg length.
// 
TInt CReqstParser::ExtractMsgLenL(const TDesC8& aHeaderAndLen)
	{
	// Msg Length
	TUint msgLen(0);
	TLex8 lex(aHeaderAndLen.Right(KMaxMsgLenChars));
	lex.Val(msgLen);
	return msgLen;
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:13,代码来源:ReqstParser.cpp

示例8: lineStartPos

// -----------------------------------------------------------------------------
// SdpUtil::DivideToLinesL
// Divides descriptor into a number of lines that are separated by
// CRLF or LF marks
// -----------------------------------------------------------------------------
//
RArray<TPtrC8> SdpUtil::DivideToLinesL( 
    const TDesC8& aLines,
    TInt aErrCode )
    {
    RArray<TPtrC8> lineArray;
    CleanupClosePushL( lineArray );
    
    TInt lineStartPos( 0 );
    TInt lineEndPos( aLines.Length() );
    TInt pos( 0 );
    
    TPtrC8 parsedPart( aLines.Right( lineEndPos - lineStartPos ) );
    // Splits aLines to number of TPtrC8s, each ending to CRLF/LF
    while ( lineStartPos < lineEndPos && 
           ( pos = parsedPart.Find( KLFStr ) ) != KErrNotFound )
        {  
        if ( ! ( pos == 0 || 
                ( pos == ( KCRLFStr().Length() - 1 ) && 
                  parsedPart.Find( KCRLFStr ) == 0 ) ) )
            {
            // Lines that contain only CRLF or LF are ignored
            // Put the valid lines to the array
            User::LeaveIfError( 
                lineArray.Append( 
                    TPtrC8( parsedPart.Left( pos + KLFStr().Length() ) ) ) );
            }
        // Advance the start of the line after LF mark
        lineStartPos += pos + KLFStr().Length();
        parsedPart.Set( aLines.Right( lineEndPos - lineStartPos ) );
        }    
    
    // This method expects that last line of aLines ends _always_ 
    // to LF not to '\0'
    if ( aLines.Length() == 0 ||
        ( aLines.Length() > 0 && aLines[aLines.Length() - 1] != '\n' ) )
        {
        User::Leave( aErrCode );
        }

    CleanupStack::Pop();    // lineArray
    return lineArray;    
    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:48,代码来源:sdputil.cpp

示例9: ChildURIListL

void  CNSmlDmDevDetailAdapter::ChildURIListL( const TDesC8& aURI, 
                                              const TDesC8& /*aLUID*/, 
                                              const CArrayFix<TSmlDmMappingInfo>& /*aPreviousURISegmentList*/, 
                                              const TInt aResultsRef, 
                                              const TInt aStatusRef )
    {
    _DBG_FILE("CNSmlDmDevDetailAdapter::ChildURIListL(): begin");
    CSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
    CBufBase *currentURISegmentList = CBufFlat::NewL(64);
    CleanupStack::PushL(currentURISegmentList);

    TInt ret = aURI.LocateReverse(KNSmlDMDevDetailSeparator()[0]);
    if ( ret == KErrNotFound ) 
        {
        ret = -1;
        }
    TInt len = aURI.Length() - ( ret + 1 );
    TPtrC8 segment = aURI.Right( len );

    if ( segment == KNSmlDMDevDetailNodeName )
        {
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailDevTypNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailOEMNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailFwVNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSwVNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailHwVNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailLrgObjNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
         currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailURINodeName() );
        }
    else
    if ( segment == KNSmlDMDevDetailURINodeName )
        {
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailMaxDepthNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailMaxTotLenNodeName() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailSeparator() );
        currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMDevDetailMaxSegLenNodeName() );
        }
    else
        {
        retValue = CSmlDmAdapter::EError;
        }

    iDmCallback->SetStatusL(aStatusRef,retValue);
    iDmCallback->SetResultsL(aResultsRef,*currentURISegmentList,KNullDesC8);
    CleanupStack::PopAndDestroy(); //currentURISegmentList;
    _DBG_FILE("CNSmlDmDevDetailAdapter::ChildURIListL(): end");
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:54,代码来源:nsmldmdevdetailadapter.cpp

示例10: KDmAdUriDotSlash

DMAD_EXPORT_C TPtrC8 TDmAdUtil::RemoveDotSlash(const TDesC8& aUri)
    {
    if (aUri.Find(KDmAdUriDotSlash) == 0)
        {
        return aUri.Right(aUri.Length() - KDmAdUriDotSlash().Length());
        }
    else
        {
        return aUri;
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:11,代码来源:dmadutil.cpp

示例11: gen

void CX509GeneralName::ConstructL(const TDesC8& aBinaryData, TInt& aPos)
	{
	TASN1DecGeneric gen(aBinaryData.Right(aBinaryData.Length() - aPos));
	gen.InitL();
	aPos += gen.LengthDER();//add on header info
	if (gen.Class() != EContextSpecific)
		{
		User::Leave(KErrArgument);
		}
	iData = gen.Tag() == 4 ? gen.GetContentDER().AllocL(): gen.Encoding().AllocL();
	iTag = gen.Tag();
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:12,代码来源:x509gn.cpp

示例12: dec

void CX520AttributeTypeAndValue::ConstructL(const TDesC8& aBinaryData, TInt& aPos)
	{
	TASN1DecGeneric dec(aBinaryData.Right(aBinaryData.Length() - aPos));
	dec.InitL();
	TInt end = aPos + dec.LengthDER();
	aPos += dec.LengthDERHeader();

	//first element must be the id
	TASN1DecObjectIdentifier encOID;
	iType = encOID.DecodeDERL(aBinaryData, aPos);
	//second is the data
	TASN1DecGeneric second(aBinaryData.Right(aBinaryData.Length() - aPos));
	second.InitL();

	iValue = second.Encoding().AllocL();;
	aPos += second.LengthDER();

	if (aPos != end)
		{
		User::Leave(KErrArgument);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:22,代码来源:x520ava.cpp

示例13: ConvertTextToTUintL

void TaggedDataParser::ConvertTextToTUintL(const TDesC8& aData, TUint& aUint)
	{
	// Determine whether hex or decimal then parse as such
	_LIT8(K0x, "0x");
	_LIT8(K0X, "0X");
	if (((aData.FindF(K0x) == 0) || (aData.FindF(K0X) == 0)) && (aData.Length() >= 3))
		{
		// only take the characters after "0x"
		TLex8 lex(aData.Right(aData.Length()-2));
		TUint32 value = 0;
		User::LeaveIfError(lex.Val(value, EHex));
		aUint = value;
		}
	else if (aData.Length() > 0)
		{
		TLex8 lex(aData.Right(aData.Length()));
		TUint32 value = 0;
		User::LeaveIfError(lex.Val(value, EDecimal));
		aUint = value;
		}
	else
		User::Leave(KErrCorrupt);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:23,代码来源:mmfcontrollerpluginresolver.cpp

示例14: gen

void CX509DSAPublicKey::ConstructL(const CDSAParameters& aParams, const TDesC8& aBinaryData, TInt& aPos)
	{
	iP = RInteger::NewL(aParams.P());
	iQ = RInteger::NewL(aParams.Q());
	iG = RInteger::NewL(aParams.G());
	
	TASN1DecGeneric gen(aBinaryData.Right(aBinaryData.Length() - aPos));
	gen.InitL();
	TInt end = aPos + gen.LengthDER();
	TASN1DecInteger encInt;
	iY = encInt.DecodeDERLongL(aBinaryData, aPos);
	if (aPos != end)
		{
		User::Leave(KErrArgument);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:16,代码来源:x509keysDSA.cpp

示例15: ConvertTextToUidL

void TaggedDataParser::ConvertTextToUidL(const TDesC8& aData, TUid& aUid)
	{
	// Make sure aData is in the correct format - "0x12345678"
	_LIT8(K0x, "0x");
	_LIT8(K0X, "0X");
	if ((aData.Length() == 10) && ((aData.FindF(K0x) == 0) || (aData.FindF(K0X) == 0)))
		{
		// only take the right 8 characters (ie discard the "0x")
		TLex8 lex(aData.Right(8));
		TUint32 value = 0;
		User::LeaveIfError(lex.Val(value, EHex));
		aUid.iUid = value;
		}
	else
		User::Leave(KErrCorrupt);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:16,代码来源:mmfcontrollerpluginresolver.cpp


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