• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TDesC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SetImageFileNameL

void CHuiTexture::SetImageFileNameL(const TDesC& aFileName)
    {
    delete iImageFileName;
    iImageFileName = 0;
    iImageFileName = aFileName.AllocL();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:6,代码来源:HuiTexture.cpp


示例2: ParseL

// ---------------------------------------------------------
// TDdParser::ParseL()
// ---------------------------------------------------------
//
void TDdParser::ParseL( const TDesC& aBuf, CCodData& aData, const TBool aIsDd2, TBool& aIsLicenseTag )
    {
    CLOG(( EParse, 2, _L("-> TDdParser::ParseL") ));
    CDUMP(( EParse, 2, _S("Buf:"), _S("    "), \
        (const TUint8*)aBuf.Ptr(), aBuf.Size() ));
    iError = KErrNone;
    iData = &aData;
    // XML Parser expects the buffer contain a BOM and be in
    // network byte order (this is hard-coded into cXmlParser).
    // We already have the buffer converted to UCS-2, native byte order, BOM
    // removed, and this cannot be changed without changing API.
    // So we have to re-add BOM and convert the buffer back to network byte
    // order. This is an annoying a waste, luckily a DD file is small
    // enough not to be significant.
    HBufC* buf = HBufC::NewLC( aBuf.Length() + 1 );
    buf->Des().Append( 0xFFFE );    // Add BOM, little endian as aBuf.
    buf->Des().Append( aBuf );      // Append buffer.
    // Now turn the whole buffer big-endian.
    TUint8* ptr = (TUint8*)buf->Ptr();
    for ( TInt i = 0; i < buf->Size(); i += 2 )
        {
        TUint8 tmp = ptr[i];
        ptr[i] = ptr[i + 1];
        ptr[i + 1] = tmp;
        }
    NW_WBXML_Dictionary_t* dictArray[ 1 ] = 
        { (NW_WBXML_Dictionary_t*)&NW_DdDummy_WBXMLDictionary };
    RNwWbxmlDictionary wbxmlDict;
    User::LeaveIfError( wbxmlDict.Initialize( 1, dictArray ) );
    CleanupClosePushL<RNwWbxmlDictionary>( wbxmlDict );

    NW_TinyDom_Handle_t domHandle;
    NW_Status_t stat;
    CNwDomDocumentNode* docNode = new (ELeave) CNwDomDocumentNode();
    CleanupStack::PushL( docNode );
    docNode->iDocNode = CXML_DOM_DocumentNode_BuildTree
        ( 
        &domHandle, 
        (NW_Byte*)buf->Ptr(), 
        (NW_Int32)buf->Size(), 
        /*encoded=*/NW_FALSE, 
        /*publicID=*/NW_DdDummy_PublicId, 
        /*extTNotStringTable=*/NW_FALSE,
        &stat
        );
    LeaveIfNwErrorL( stat );
    User::LeaveIfNull( docNode->iDocNode ); // Safety code.
    if (!aIsDd2)
	{
	  DocNodeL( docNode->iDocNode );
	}
    else
	{
	  iIsLicenseTag = EFalse;
	  ParseDd2DocNodeL( docNode->iDocNode );
	}
    CleanupStack::PopAndDestroy( 3, buf );  // docNode, close wbxmlDict, buf

#ifdef __TEST_COD_LOG
    TPtrC ptr16;
    TPtrC8 ptr8;
    CLOG(( EParse, 3, _L("TCodParser::ParseL data:") ));
    ptr16.Set( aData.Name() );
    CLOG(( EParse, 3, _L("  Name<%S>"), &ptr16 ));
    ptr16.Set( aData.Vendor() );
    CLOG(( EParse, 3, _L("  Vendor<%S>"), &ptr16 ));
    ptr16.Set( aData.Description() );
    CLOG(( EParse, 3, _L("  Desc<%S>"), &ptr16 ));
    CLOG(( EParse, 3, _L("  Size(%d)"), aData.Size() ));
    ptr8.Set( aData.InstallNotify() );
    CLOG(( EParse, 3, _L8("  InstNotif<%S>"), &ptr8 ));
    ptr8.Set( aData.NextUrl() );
    CLOG(( EParse, 3, _L8("  NextUrl<%S>"), &ptr8 ));
    ptr8.Set( aData.NextUrlAtError() );
    CLOG(( EParse, 3, _L8("  NextUrlAtErr<%S>"), &ptr8 ));
    ptr8.Set( aData.InfoUrl() );
    CLOG(( EParse, 3, _L8("  InfoUrl<%S>"), &ptr8 ));
    ptr16.Set( aData.Price() );
    CLOG(( EParse, 3, _L("  Price<%S>"), &ptr16 ));
    ptr8.Set( aData.Icon() );
    CLOG(( EParse, 3, _L8("  Icon<%S>"), &ptr8 ));

//TODO add logs for OMA 2
#endif /* def __TEST_COD_LOG */
	
	//If there are no media objects present to download, 
    if( !iData->Count() )
    	{
    	User::Leave( KErrCodInvalidDescriptor );	
    	}
    	
    // NULL data for clarity. These are never used later, but don't keep
    // pointers to objects which are out of reach.
    iData = NULL;
    User::LeaveIfError( iError );
    aIsLicenseTag = iIsLicenseTag;
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:101,代码来源:DdParser.cpp


示例3: ConstructL

// ---------------------------------------------------------
// CContextbookContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CContextbookContainer::ConstructL(const TRect& aRect, phonebook_i* i_book, bool i_searchable, const TDesC& title, Cfile_output_base * aLog, CAknIconArray * aIconlist, TInt current_item_index, TInt top_item_index, TBuf<20> current_filter)
{
	CALLSTACKITEM(_L("CContextbookContainer::ConstructL"));

	iCurrentContactId=KErrNotFound;

	iconlist = new (ELeave) CAknIconArray(30);
	//copy
	for (TInt i = 0; i< aIconlist->Count();i++)
	{
		CGulIcon * ic, *icon_from; 
		icon_from= (*aIconlist)[i];
		ic=CGulIcon::NewL( icon_from->Bitmap(), icon_from->Mask());
		ic->SetBitmapsOwnedExternally(ETrue);
		iconlist->AppendL( ic );
	}
	
	iLog = aLog;
	CreateWindowL();

	CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
	CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));

	HBufC* t=HBufC::NewL(title.Length());
	*t=title;
	tp->SetText(t);

	if (iLog) {
		iLog->write_time();
		iLog->write_to_output(_L("Showing "));
		iLog->write_to_output(title);
		iLog->write_nl();
	}

	sendui=CSendAppUi::NewL(0);

	searchable=i_searchable;

	resource_files=new (ELeave) CArrayFixFlat<TInt>(5);

	// for phonebook dialogs
	TFileName resfile=_L("z:\\System\\data\\PBKVIEW.rSC");
	BaflUtils::NearestLanguageFile(iEikonEnv->FsSession(), resfile); //for localization
	resource_files->AppendL(iEikonEnv->AddResourceFileL(resfile)); 
	
	book=i_book;
	book->set_observer(this);

	listbox=new (ELeave) doublelinebox(book,iLog);
	listbox->SetContainerWindowL(*this);
	listbox->ConstructL(this, EAknListBoxSelectionList);
	listbox->SetItemHeightL(40);
	listbox->View()->SetMatcherCursor(EFalse);

	listbox->ItemDrawer()->FormattedCellData()->SetIconArray(iconlist);

	listbox->SetListBoxObserver(this);
	listbox->Model()->SetItemTextArray(book->get_array());
	
	listbox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
	listbox->CreateScrollBarFrameL(ETrue);
	listbox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
	
	listbox->SetCurrentItemIndex(current_item_index);
	listbox->SetTopItemIndex(top_item_index);

	if (is_searchable()) 
	{
		edit=new (ELeave) CEikEdwin;
		edit->SetBorder(TGulBorder::ESingleBlack);
		edit->SetContainerWindowL(*this);
		edit->ConstructL();
		edit->AddEdwinObserverL(this);
		edit->SetFocus(ETrue);
		edit->SetTextL(&current_filter);
		filter();
		
	}

	phone=new (ELeave) phonehelper;
	phone->ConstructL();

	globalNote=CAknGlobalNote::NewL();

	pbkengine=CPbkContactEngine::Static();
	if (pbkengine) {
		owns_engine=false;
	} else {
		pbkengine=CPbkContactEngine::NewL();
		owns_engine=true;
	}
	SetRect(aRect);
   
	ActivateL();
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:100,代码来源:ContextbookContainer.cpp


示例4: SetEmailAddressL

EXPORT_C void CImSSmtpSettings::SetEmailAddressL( const TDesC& aEmailAddress )
	{
	HBufC* newEmailAddress = aEmailAddress.AllocL();
	delete iEmailAddress;
	iEmailAddress = newEmailAddress;
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:6,代码来源:ssmtpset.cpp


示例5: SetMetaAttrL

// ---------------------------------------------------------
// TDdParser::SetMetaAttrL()
// ---------------------------------------------------------
//
void TDdParser::SetMetaAttrL( TDdAttr aAttr, const TDesC& aValue, CMediaObjectData *& aMediaObject )
    {
    TInt ok( ETrue );
    switch( aAttr )
        {
        case EDdName:
            {
            if ( !aMediaObject->Name().Length() )
                {
                ok = aMediaObject->SetNameL( aValue );
                }
            break;
            }

        case EDdDescription:
            {
            if ( !aMediaObject->Description().Length() )
                {
                ok = aMediaObject->SetDescriptionL( aValue );
                }
            break;
            }

        case EDdInstallNotify:
            {
            if ( !aMediaObject->InstallNotify().Length() )
                {
                ok = aMediaObject->SetInstallNotifyL( aValue );
                }
            break;
            }

        case EDdInfoUrl:
            {
            if ( !aMediaObject->InfoUrl().Length() )
                {
                ok = aMediaObject->SetInfoUrlL( aValue );
                }
            break;
            }

        case EDdIcon:
            {
            if ( !aMediaObject->Icon().Length() )
                {
                ok = aMediaObject->SetIconL( aValue );
                }
            break;
            }

        case EDdOrder:
            {
            TBool isPostOrder( EFalse );
            if ( !aValue.CompareF( KDdPost ) )
                {
                isPostOrder = ETrue;
                }
            else if ( aValue.CompareF( KDdAny ) )
                {
                // Expected 'post' or 'any'
                Error( KErrCodInvalidDescriptor );
                break;
				}
            aMediaObject->SetOrderIsPost( isPostOrder );
            break;
            }

        case EDdText:
            {
//TODO for OMA2
/*
            if ( !iData->Text().Length() )
                {
                ok = iData->SetTextL( aValue );
                }
*/
            break;
            }

        default:
            {
            // Unexpected value.
            CodPanic( ECodInternal );
            }
        }
    if ( !ok )
        {
        Error( KErrCodInvalidDescriptor );
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:94,代码来源:DdParser.cpp


示例6: SetErrorPathL

void CWebServerEnv::SetErrorPathL(const TDesC& aErrorPath)
{
	delete iErrorPath;
	iErrorPath = aErrorPath.AllocL();
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:5,代码来源:ws_eng.cpp


示例7: HexToDec

TBool CCommonUtils::HexToDec(const TDesC& aHexDes,TInt& aDec)
{
	TInt i,mid; 
	TInt len = aHexDes.Length();//lstrlen( aHexDes ); 

	//if( len > 9 )//#00ff00ff? 
	//	return EFalse; 

	mid = 0; aDec = 0; 
	for( i = 0;i < len; i++ ) 
	{ 
		if( (aHexDes.Ptr())[i]>='0' && (aHexDes.Ptr())[i]<='9' ) 
		{
			mid = (aHexDes.Ptr())[i]-'0'; 
		}
		else if( (aHexDes.Ptr())[i]>='a'&& (aHexDes.Ptr())[i]<='f' ) 
		{
			mid = (aHexDes.Ptr())[i] -'a' +10; 
		}
		else if( (aHexDes.Ptr())[i]>='A'&& (aHexDes.Ptr())[i]<='F' ) 
		{
			mid = (aHexDes.Ptr())[i] -'A' +10;
		}
		else if ((aHexDes.Ptr())[i] == '#') 
		{
			continue;
		}
		else
		{
			return EFalse; 
		}

		mid <<= ((len-i-1)<<2); 
		aDec |= mid; 

	} 
	return ETrue; 


}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:40,代码来源:CommonUtils.cpp


示例8: mode

/**
Retrieves the database system settings from the settings table.

@param aDbName Logical database name: "main" for the main database or attached database name,
@param aCollationDllName Output parameter, will contain the stored collation dll name,
@param aDbConfigFileVersion Output parameter, will contain the stored database config file version,
@param aSettingsVersion Output parameter, will contain the version of the settings table.
@param aCompactionMode Output parameter. Database compaction mode (one of TSqlCompactionMode enum item values except ESqlCompactionNotSet).

@see TSqlCompactionMode

@leave KErrGeneral, either unable to retrieve the data from the settings table or the 
					stored table version or config file version is invalid or the stored compaction mode is invalid.
	   KErrOverflow, aCollationDllName is not large enough to store the name of the 
	   				 collation dll that is stored in the settings table.
       KErrNoMemory, an out of memory condition has occurred.
	   Note that the function may also leave with other system-wide error codes or SQL
	   errors of ESqlDbError type
@panic SqlDb 2 In _DEBUG mode if iDbHandle is NULL (uninitialized TSqlDbSysSettings object).
*/
void TSqlDbSysSettings::GetSettingsL(const TDesC& aDbName, TDes& aCollationDllName, TInt& aDbConfigFileVersion, 
									 TInt& aSettingsVersion, TSqlCompactionMode& aCompactionMode)
	{
	__ASSERT_DEBUG(iDbHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));

	HBufC* buf = HBufC::NewLC(sizeof(KGetSettingsSql) + aDbName.Length());
	TPtr sql = buf->Des();
			
	//Prepare statement handle
	sql.Format(KGetSettingsSql(), &aDbName);
	sqlite3_stmt* stmtHandle = ::StmtPrepare16L(iDbHandle, sql);
	CleanupStack::PushL(TCleanupItem(&FinalizeStatementHandle, stmtHandle));
	//Move to the first record
	TInt err = ::StmtNext(stmtHandle);
	__SQLLEAVE_IF_ERROR(err);
	//Check that it is a valid row. The error is checked on the previous line. 
	//The "if" bellow will check whether there is a valid record or not.
	if(err != KSqlAtRow)
		{
		__SQLLEAVE(KErrGeneral);
		}
	//Get the system settings version 
	aSettingsVersion = sqlite3_column_int(stmtHandle, KSysVersionColIdx);
	if(aSettingsVersion < ESqlSystemVersion1)
		{
		__SQLLEAVE(KErrGeneral);
		}
	if(aSettingsVersion > ESqlSystemVersion2)
		{
		//The "ConfigFileVersion" column exists and is used to store the most recent
		//version of the database's config file (if there is one) that has 
		//been successfully processed
		aDbConfigFileVersion = sqlite3_column_int(stmtHandle, KConfigFileVersionColIdx);
		if(aDbConfigFileVersion < KSqlNullDbConfigFileVersion)
			{
			__SQLLEAVE(KErrGeneral);
			}
			
		//The "CollationDllName" column exists and its value can be read.
        //The column type might be different than SQLITE_TEXT - malformed database.
        if(sqlite3_column_type(stmtHandle, KCollationDllNameColIdx) != SQLITE_TEXT)
            {
            __SQLLEAVE(KErrGeneral);   
            }
		const void* ptr = sqlite3_column_text16(stmtHandle, KCollationDllNameColIdx);
        //Null column value - this might be an indication of an "out of memory" problem, if the column text  
        //is in UTF8 format. (sqlite3_column_text16() may allocate memory for UTF8->UTF16 conversion)
		__SQLLEAVE_IF_NULL(const_cast<void*>(ptr));
        TPtrC16 src(reinterpret_cast <const TUint16*> (ptr));
        if(src.Length() > aCollationDllName.MaxLength())
            {
            __SQLLEAVE(KErrOverflow);	
            }
        aCollationDllName.Copy(src);
		}
	if(aSettingsVersion > ESqlSystemVersion3)
		{
		aCompactionMode = static_cast <TSqlCompactionMode> (sqlite3_column_int(stmtHandle, KCompactionModeColIdx));
		if(aCompactionMode != ESqlCompactionManual && aCompactionMode != ESqlCompactionBackground && aCompactionMode != ESqlCompactionAuto)
			{
			__SQLLEAVE(KErrGeneral);
			}
		}
	CleanupStack::PopAndDestroy();//TCleanupItem(&FinalizeStatementHandle, stmtHandle)	
	CleanupStack::PopAndDestroy(buf);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:86,代码来源:SqlSrvDbSysSettings.cpp


示例9: StoreAttributesL

// ---------------------------------------------------------
// CNSmlDsProvisioningAdapter::StoreAttributesL
// ---------------------------------------------------------
void CNSmlDsProvisioningAdapter::StoreAttributesL( const TDesC& aType )
    {
    _DBG_FILE("CNSmlDsProvisioningAdapter::StoreAttributesL(): begin");
    
    TInt iDataProvElementCount = iProfiles[iProfiles.Count()-1]->iDataProvElement.Count()-1;
	// Leave if aType cannot be assigned
    if( ( aType.Length() > 0 ) &&
        ( iProfiles[iProfiles.Count()-1]->iDataProvElement[iDataProvElementCount]->iRemoteDBUri ) )
        {
        TBool dataProvIdFoundInZ = FALSE;
        TSmlDataProviderId firstDataProvIdFound = 0;
        TSmlDataProviderId uidFound = 0;

        TBool doSearch = ETrue;
        if ( aType.FindF( KXVcardMimeType ) != KErrNotFound )
            {
            if ( IsOperatorProfile( *iProfiles[iProfiles.Count()-1] ) )
                {
                const CNSmlDsProfileElement& profile = *iProfiles[iProfiles.Count()-1];
                StoreOperatorUrlL( *profile.iHostAddress );
                
                // Do not make a search through adapter implementations
                doSearch = EFalse;
                uidFound = OperatorAdapterUid();
                if ( !uidFound )
                    {
                    // If OperatorAdapterUid returns 0, do a search
                    doSearch = ETrue;
                    }
                }
            }
		// look through every implementation adapter until one found
		// which supports MIME type in question
		
		// The first one located in ROM is chosen. If none found in ROM then
		// the first adapter found is chosen.

		HBufC8 *type = HBufC8::NewLC(aType.Size());
		TPtr8 typePtr = type->Des();
		CnvUtfConverter::ConvertFromUnicodeToUtf8( typePtr, aType);

		// get list of dataproviderIds
		RImplInfoPtrArray implArray;
		CleanupStack::PushL( PtrArrCleanupItemRArr( CImplementationInformation, &implArray ) );
		TUid ifUid = { KNSmlDSInterfaceUid };
		REComSession::ListImplementationsL( ifUid, implArray );
		
        if ( doSearch )
            {
            TInt countProviders = implArray.Count();
            for( TInt i = 0; i < countProviders; i++ )
                {
                CImplementationInformation* implInfo = implArray[i];

                RSyncMLDataProvider dataProvider;
                dataProvider.OpenL( iSession, implInfo->ImplementationUid().iUid );
                CleanupClosePushL( dataProvider );

                TInt mimeTypeCount = dataProvider.MimeTypeCount();
                for( TInt j = 0; j < mimeTypeCount; j++ )
                    {
                    HBufC* mimeType = dataProvider.MimeType( j ).AllocLC();
                    TPtrC8 convMimeType = ConvertTo8LC( *mimeType );
                    if( typePtr.Find( convMimeType ) == 0)
                        {
                        // MIME type in question was found
                        uidFound = implInfo->ImplementationUid().iUid;

                        if( firstDataProvIdFound == 0 )
                            {
                            // save the first in case of none found from ROM
                            firstDataProvIdFound = uidFound;
                            }
					
                        // check whether the provider is located in ROM (drive Z)
                        if( implInfo->Drive() == EDriveZ )
                            {
                            dataProvIdFoundInZ = TRUE;
                            }
                        }
				
                    CleanupStack::PopAndDestroy(2); // mimetype, ConvertTo8LC

                    if( uidFound )
                        {
                        break;
                        }
                    }
				
                CleanupStack::PopAndDestroy(); // dataProvider
			
                if ( dataProvIdFoundInZ )
                    {
                    break;
                    }
                else
                    {
//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:101,代码来源:NSmlDsProvisioningAdapter.cpp


示例10: SetAdvInUse

// ---------------------------------------------------------------------------
// CIRAdvertisement::SetAdvInUse()
// Function to set the advertisement in use
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRAdvertisement::SetAdvInUse( const TDesC& aAdvInUse )
    {
    IRLOG_DEBUG( "CIRAdvertisement::SetAdvInUse - Entering" );
    iAdvInUse = aAdvInUse.Alloc();
    IRLOG_DEBUG( "CIRAdvertisement::SetAdvInUse - Exiting." );
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:11,代码来源:iradvertisement.cpp


示例11: SetActionIdL

void CMtfTestAction::SetActionIdL(const TDesC& aActionId)
{
	iActionId = aActionId.AllocL();
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:4,代码来源:CMtfTestAction.cpp


示例12: ConstructL

	void ConstructL(const TDesC& aText) { iText = aText.AllocL(); }
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:1,代码来源:cwu_welcomeaction.cpp


示例13:

/**
Description:Function is intended to set the integrity password 
@param	aIntegrityPassword, contains the integrity password
@internalTechnology
@test
*/
void CPkcs12Parser::SetIntegrityPasswordL(const TDesC& aIntegrityPassword)
	{
	iIntegrityPassword = aIntegrityPassword.AllocL();
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:10,代码来源:tpkcs12common.cpp


示例14: ConstructL

void CTextModeTestMultiTrans::ConstructL(const TDesC& aHostName)
{
    iHostName = HBufC8::NewL(aHostName.Length());
    iHostName->Des().Copy(aHostName);
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:5,代码来源:T_MultiTrans.cpp


示例15: SetServerPathL

void CWebServerEnv::SetServerPathL(const TDesC& aServerPath)
{
	delete iServerPath;
	iServerPath = aServerPath.AllocL();
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:5,代码来源:ws_eng.cpp


示例16: ConstructL

void CCustomAppInfoData::ConstructL(const TDesC& aShortCaption)
	{
	iShortCaption=aShortCaption.AllocL();
	}
开发者ID:fedor4ever,项目名称:default,代码行数:4,代码来源:APSSERV.CPP


示例17: SetCgiPathL

void CWebServerEnv::SetCgiPathL(const TDesC& aCgiPath)
{
	delete iCgiPath;
	iCgiPath = aCgiPath.AllocL();
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:5,代码来源:ws_eng.cpp


示例18: WriteToFileL

// -----------------------------------------------------------------------------
// Write unicode text to file
// -----------------------------------------------------------------------------
//
void CBCTestLogger::WriteToFileL( RFile& aFile, const TDesC& aText )
    {
    TPtrC8 buf( (TUint8*)aText.Ptr(), aText.Size() );
    aFile.Write( buf );    
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:9,代码来源:bctestlogger.cpp


示例19: SetBackupPathL

void CWebServerEnv::SetBackupPathL(const TDesC& aBackupPath)
{
	delete iBackupPath;
	iBackupPath = aBackupPath.AllocL();
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:5,代码来源:ws_eng.cpp


示例20: StartApplicationL

	EXPORT_C void StartApplicationL(const TUid& aUid, const TDesC& aDocumentName, TInt aRetryInterval, TApaCommand aCommand)
	{
		TUid appToBeStarted = aUid;
		TInt pushed=0;
#ifdef DEBUG
		RFs fs; User::LeaveIfError(fs.Connect()); 
		CleanupClosePushL(fs); pushed++;
		RFile f; User::LeaveIfError(f.Replace(fs, _L("c:\\processmanagement.txt"), EFileWrite));
		CleanupClosePushL(f); pushed++;

		f.Write(_L8("starting\n"));
#endif
		TInt retries=0;
		LOG(_L8("new'ing ls session..."));
		RApaLsSession *lsp;
		lsp=new (ELeave) RApaLsSession;
		LOG(_L8("\n"));
		CleanupStack::PushL(lsp); ++pushed;
		RApaLsSession& ls(*lsp);

		while(retries<80) {
			TInt i_pushed=0;
			LOG(_L8("connecting ls session..."));
			TInt err=ls.Connect();
			LOG(_L8(": "));
			TBuf8<12> msg; msg.Num(err); msg.Append(_L("\n"));
			LOG(msg);
			if (err==KErrNone) {
				CleanupClosePushL(ls); ++i_pushed;
				pushed+=i_pushed;
				break;
			} else {
				CleanupStack::PopAndDestroy(i_pushed);
			}
			LOG(_L8("waiting..."));
			retries++;
			User::After(TTimeIntervalMicroSeconds32(aRetryInterval*1000));
			LOG(_L8("done.\n"));
		}
		LOG(_L8("ls session created\n"));

		LOG(_L8("creating info..."));
		TApaAppInfo* infop=0;
		infop=new (ELeave) TApaAppInfo;
		LOG(_L8("1 "));
		CleanupStack::PushL(infop); ++pushed;
		LOG(_L8("2 "));
		TApaAppInfo& info(*infop);
		LOG(_L8("done\n"));
	
		RWsSession ws;
		User::LeaveIfError(ws.Connect());
		CleanupClosePushL(ws); ++pushed;
		TApaTaskList tl(ws);
		TApaTask app_task=tl.FindApp(aUid);
		TBool exists=app_task.Exists();
		while( !exists && retries<80) {
			TInt pushed=0;

			LOG(_L8("getting info..."));
			TInt err=ls.GetAppInfo(info, appToBeStarted);
			LOG(_L8("done: "));
			TBuf8<12> msg; msg.Num(err); msg.Append(_L("\n"));
			LOG(msg);
			if (err==KErrNone) {
#ifndef __S60V3__
				CApaCommandLine* cmd=CApaCommandLine::NewLC(info.iFullName); pushed++;
#else
				CApaCommandLine* cmd=CApaCommandLine::NewLC(); pushed++;
				cmd->SetExecutableNameL(info.iFullName);
#endif
				cmd->SetCommandL( aCommand );
				if ( aDocumentName.Length() > 0 )
					{					
					cmd->SetDocumentNameL(aDocumentName);
					}
#ifndef __S60V3__
				TRAP(err, EikDll::StartAppL(*cmd));
#else
				err=ls.StartApp(*cmd);
#endif
				CleanupStack::PopAndDestroy(pushed);
				LOG(_L8("StartAppL: "));
				msg.Num(err); msg.Append(_L("\n"));
				LOG(msg);
				if (err==KErrNone) break;	
			} else {
				LOG(_L8("popping..."));
				CleanupStack::PopAndDestroy(pushed);
				LOG(_L8("done\n"));
			}
			LOG(_L8("waiting..."));
			retries++;
			User::After(TTimeIntervalMicroSeconds32(aRetryInterval*1000));
			LOG(_L8("done.\n"));
		}
		LOG(_L8("done\n"));
		CleanupStack::PopAndDestroy(pushed);
	}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:99,代码来源:cc_processmanagement.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TDesC16类代码示例发布时间:2022-05-31
下一篇:
C++ TDes8类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap