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


C++ TBuf8::AppendNumFixedWidth方法代码示例

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


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

示例1: GetFormatsL

void CMMFControllerImplementationInformation::GetFormatsL(TUid aFormatCollectionUid, TUid aFormatPluginCollectionUid, RMMFFormatImplInfoArray& aFormatArray)
	{
	RImplInfoPtrArray ecomArray;
	CleanupResetAndDestroyPushL(ecomArray);
	// If we have a valid play format collection uid, get the play formats defined by this plugin
	if (aFormatCollectionUid != KNullUid)
		{
		MmPluginUtils::FindImplementationsL(aFormatCollectionUid, ecomArray);
		// Create format implementation information for each entry
		AddFormatsSwallowCorruptL(ecomArray, aFormatArray);
		}

	// Now get all the format plugins attached to this controller

	// Create a descriptor and fill it with the uid of this controller plugin
	TBuf8<10> controllerUid;
	_LIT8(K0x, "0x");
	controllerUid.Append(K0x);
	controllerUid.AppendNumFixedWidth(iUid.iUid, EHex, 8);

	MmPluginUtils::FindImplementationsL(aFormatPluginCollectionUid, ecomArray, controllerUid);
	// Create format implementation information for each entry
	AddFormatsSwallowCorruptL(ecomArray, aFormatArray);

	CleanupStack::PopAndDestroy();//ecomArray
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:26,代码来源:mmfcontrollerpluginresolver.cpp

示例2: ptr

void CReferenceHandler::CreateReferenceObject7L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport)
{
    //Reset the object (also resets the buffer)
    aObject.Reset();
    const TUint KNumOfAlphabets = 200;
    aObjectBuf.ResizeL(KNumOfAlphabets * 30);
    //populate the buffer...
    TBuf8<4> buf;
    TUint i;
    for (i=0; i<KNumOfAlphabets; i++)
    {
        buf.Zero();
        buf.AppendNumFixedWidth(i, EDecimal, 4);
        aObjectBuf.Write(30*i, buf);
        aObjectBuf.Write(30*i + 4, KAlphabet);
    }
    //populate the object

    aObject.SetNameL(KRef7Name);
    aObject.SetTypeL(KRefImageJpegType);
    aObject.SetLengthL(aObjectBuf.Size());
    const TTime KRef5Time = TDateTime(2001, EFebruary, 14, 15, 38, 24, 0);//set time to 15:38:24.0 on 14th Feb 2001 - obex doesn't transfer microseconds!!
    aObject.SetTimeL(KRef5Time);

    _LIT8(KRef1HTTP, "Accept: text/*");
    _LIT8(KRef2HTTP, "Location: http://www.w3.org");
    _LIT8(KRef3HTTP, "Date: Tue, 10 Nov 2002 09:17:21 GMT");

    aObject.AddHttpL(KRef1HTTP);
    aObject.AddHttpL(KRef2HTTP);
    aObject.AddHttpL(KRef3HTTP);
    aObject.AddHttpL(KRef1HTTP);
    aObject.AddHttpL(KRef2HTTP);
    aObject.AddHttpL(KRef3HTTP);
    aObject.AddHttpL(KRef1HTTP);
    aObject.AddHttpL(KRef2HTTP);
    aObject.AddHttpL(KRef3HTTP);


    // Set up the MF description header
    const TUint KDescLength = ( (aTransport==EBluetooth?KObexPacketDefaultSize:2044) - KObexPacketHeaderSize - 5 - 5)/sizeof(TText); // Size in characters
    HBufC* descBuf = HBufC::NewLC(KDescLength);
    /*	ASSERT(descBuf);
    	TPtr ptr(descBuf->Des());
    	ptr.Zero();
    	for (i=0; i<KDescLength; i++)
    		{
    		ptr.AppendNumFixedWidth(i%10, EDecimal, 1);
    		}
    	aObject.SetDescriptionL(ptr);
    */
    CleanupStack::PopAndDestroy(descBuf);

    aObject.SetTargetL(KRefSyncMLTarget);
    aObject.SetHeaderMask(KObexHdrName | KObexHdrType  | KObexHdrTime | KObexHdrLength | KObexHdrHttp | KObexHdrTarget);
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:56,代码来源:TREFHANDLER.CPP


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