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

C++ KNullDesC函数代码示例

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

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



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

示例1: type

EXPORT_C const TPtrC CUrl::Component(TComponent aType) const
	{
	TInt start = KCUrlInvalidCharPos;
	TInt end = KCUrlInvalidCharPos;

	TComponent type(aType);
	if (aType == EUrlFileName)
		type = EUrlPath;


	Part(type, *iUrlDes, start,end);
	if  (start == KCUrlInvalidCharPos || end == KCUrlInvalidCharPos)
			return KNullDesC();

	TInt length = end - start +1; 
	if (end == (*iUrlDes).Length())
		length--;

	TPtrC component((*iUrlDes).Mid(start, length));

	if (aType == EUrlFileName)
		{
		TInt slashPos = component.LocateReverse('/');
		if (slashPos == KErrNotFound)
			return KNullDesC();
		else
			component.Set(component.Right(component.Length() - (slashPos +1)));
		}

	return component;
	}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:31,代码来源:URLBASE.cpp


示例2: _LIT

void UT_CPELogEvent::T_CPELogEvent_SaveL4L(  )
    {
    TLogString test;
    _LIT( KVoipAddress, "[email protected]" );

    iMockContext->ExpectCallL( "CPELogInfo::CallState" ).
        ReturnsL<TPEState>( EPEStateIdle );
    
    iMockContext->ExpectCallL( "CPELogHandling::LogStringDelivery" ).
        ReturnsL( test );
    
    iMockContext->ExpectCallL( "CPELogHandling::LogStringMissed" ).
        ReturnsL( test );
    
    iMockContext->ExpectCallL( "CPELogInfo::PhoneNumberId" ).
        ReturnsL( EPEUnknownNumber );
    
    iMockContext->ExpectCallL( "CPELogInfo::EventType" ).
        ReturnsL( CPELogInfo::EPEVideoCallEvent );
  
    iMockContext->ExpectCallL( "CPELogInfo::CurrentLine" ).
        ReturnsL( CCCECallParameters::ECCELineTypeAux );
    
    iMockContext->ExpectCallL( "CPELogInfo::CallDirection" ).
        ReturnsL( RMobileCall::EMobileTerminated ).
        TimesL( 2 );

    iMockContext->ExpectCallL( "CPELogInfo::Name" ).
        ReturnsL( KNullDesC() );
    
    iMockContext->ExpectCallL( "CPELogInfo::PhoneNumber" ).
        ReturnsL( KNullDesC() );
    
    iMockContext->ExpectCallL( "CPELogInfo::VoipAddress" ).
        ReturnsL( KVoipAddress()).
        TimesL( 2 );
    
    iMockContext->ExpectCallL( "CPELogInfo::MyAddress" ).
        ReturnsL( KNullDesC());
    
    iMockContext->ExpectCallL( "CPELogInfo::Duration" ).
        ReturnsL( 0 );

    iMockContext->ExpectCallL( "CPELogInfo::ContactLink").
        ReturnsL( KNullDesC() ).
        TimesL( 4 );
    
    iMockContext->ExpectCallL( "CPELogInfo::CallState" ).
        ReturnsL<TPEState>( EPEStateIdle ).
        TimesL( 2 );
    
    iMockContext->ExpectCallL( "CPELogInfo::MissedCall" ).
        ReturnsL( ETrue );
    
    iMockContext->ExpectCallL( "CPELogHandlingCommand::AddEvent");
     
    iCPELogEvent->SaveL();
       
    EUNIT_ASSERT_EQUALS( KErrNone, iMockContext->VerifyExpectations() ); 
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:60,代码来源:ut_cpelogevent.cpp


示例3: pLocation

void CEmTubePlaylistEntry::ImportL( RFileReadStream& aStream )
	{
	TInt l = aStream.ReadInt32L();
	if( l )
		{
		iLocation = HBufC::NewL( l );
		TPtr pLocation( iLocation->Des() );
		aStream.ReadL( pLocation, l );
		}
	else
		{
		iLocation = KNullDesC().AllocL();
		}

	l = aStream.ReadInt32L();
	if( l )
		{
		iName = HBufC::NewL( l );
		TPtr pName( iName->Des() );
		aStream.ReadL( pName, l );
		}
	else
		{
		iName = KNullDesC().AllocL();
		}

	iPlayCount = aStream.ReadInt32L();
	iType = (TEmTubePlaylistEntryType)aStream.ReadInt32L();
	TReal t = aStream.ReadReal64L();
	iTime = TTime( Int64( t ) );
	}
开发者ID:Yelinson,项目名称:OpenVideoHub,代码行数:31,代码来源:emTubePlaylistManager.cpp


示例4: JELOG2

// -----------------------------------------------------------------------------
// CPIMAgnToDoAdapter::ExportItemL
// (other items were commented in a header)
// -----------------------------------------------------------------------------
//
void CPIMAgnToDoAdapter::ExportItemL(const MPIMToDoItem& aItem,
                                     CCalEntry& aEntry, TBool aResetEntry)
{
    JELOG2(EPim);
    if (aResetEntry)
    {
        // Reset native entry for exporting new data
        aEntry.SetSummaryL(KNullDesC());
        aEntry.SetDescriptionL(KNullDesC());
        aEntry.SetPriorityL(0);
        aEntry.SetCompletedL(EFalse, aEntry.CompletedTimeL());
    }

    // Export item data to the native ToDo calendar entry
    const MPIMItemData& itemData = aItem.ItemData();
    CArrayFix<TPIMField>* fields = itemData.FieldsLC();

    // Add default values to the calendar entry
    AddDefaultValuesToEntryL(itemData, aEntry);

    // Convert each field to the native ToDo calendar entry
    TInt count = fields->Count();
    for (TInt i = 0; i < count; i++)
    {
        TPIMToDoField field = static_cast<TPIMToDoField>(fields->At(i));
        ConvertToAgnL(field, aEntry, itemData);
    }
    CleanupStack::PopAndDestroy(fields);
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:34,代码来源:cpimagntodoadapter.cpp


示例5: DLTRACEIN

void CNcdExtendedInstallInfo::ConstructL()
    {
    DLTRACEIN((""));
    CNcdPurchaseInstallInfo::BaseConstructL();
    iMimeType = KNullDesC().AllocL();  
    iParameter = KNullDesC().AllocL();  
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:7,代码来源:ncdextendedinstallinfo.cpp


示例6: KNullDesC

// -----------------------------------------------------------------------------
// CProfileExtraTonesImpl::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CProfileExtraTonesImpl::ConstructL()
{
    iIMMessageAlertTone = KNullDesC().AllocL();
    iEmailAlertTone = KNullDesC().AllocL();
    iVideoCallRingingTone = KNullDesC().AllocL();
    iReminderTone = KNullDesC().AllocL();
    iClockAlarmTone = KNullDesC().AllocL();
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:13,代码来源:CProfileExtraTonesImpl.cpp


示例7: KNullDesC

void CBaseMrInfoObject::ConstructL()
    {    
    iSubject = KNullDesC().AllocL();
    iDescription = KNullDesC().AllocL();
    iLocation = KNullDesC().AllocL();
    iUid = KNullDesC().AllocL();
    
    iOrganizer = CBaseMrAttendee::NewL();
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:9,代码来源:BaseMrInfoObject.cpp


示例8: KNullDesC

void CNcdNodeLink::ConstructL()
    {
    iParentIdentifier = CNcdNodeIdentifier::NewL();
    iRequestParentIdentifier = CNcdNodeIdentifier::NewL();
    iMetaDataIdentifier = CNcdNodeIdentifier::NewL();
    iTimeStamp = KNullDesC().AllocL();
    iCatalogsSourceName = KNullDesC().AllocL();
    iServerUri = KNullDesC().AllocL();
    iRemoteUri = KNullDesC().AllocL();
    iMetadataTimeStamp = KNullDesC().AllocL();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:11,代码来源:ncdnodelink.cpp


示例9: RDEBUG

// ----------------------------------------------------------------------------------------
// CTerminalControlServer::StartProcessByFullNameL
// ----------------------------------------------------------------------------------------
void CTerminalControlServer::StartProcessByFullNameL ( const TDesC8& aName )
{
    RDEBUG("CTerminalControlServer::StartProcessByFullNameL");

    // 8bit to 16bit string
    //
    HBufC* fileNameBuf = HBufC::NewLC( aName.Length() );
    TPtr   fileName(fileNameBuf->Des());
    fileName.Copy( aName );

    // Connect to application architecture server
    //
    RApaLsSession apaLs;
    User::LeaveIfError( apaLs.Connect() );
    CleanupClosePushL( apaLs );

    // Create command line for process
    //
    CApaCommandLine* cmd = CApaCommandLine::NewLC();

    cmd->SetExecutableNameL( fileName );
    cmd->SetDocumentNameL( KNullDesC() );
    cmd->SetCommandL( EApaCommandRun );

    // Start application
    //
    User::LeaveIfError( apaLs.StartApp( *cmd ) );

    CleanupStack::PopAndDestroy( cmd );
    CleanupStack::PopAndDestroy( &apaLs );
    CleanupStack::PopAndDestroy( fileNameBuf );
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:35,代码来源:TerminalControlServer.cpp


示例10: _LIT

// -----------------------------------------------------------------------------
// CLibxml2Tester::CompressBufferGZIPL
// test GZIP Compress to buffer
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt CLibxml2Tester::CompressBufferGZIPL(CStifItemParser& aItem)
{
    _LIT(tem,"Error in code");

    // resize heap
    he = UserHeap::ChunkHeap(&KNullDesC(), 0, 20000000);
    if(!he)
    {
        User::Leave(100);
    }
    oldHeap = User::SwitchHeap(he);// Change heaps
    cleanup=CTrapCleanup::New();
    //--
    TInt trapResult;

    // start trap
    TRAP(trapResult,

         TPtrC pInput;
         aItem.GetNextString( pInput );

         TPtrC pOutput;
         aItem.GetNextString( pOutput );
         HBufC8* bufferOutput = CnvUtfConverter::ConvertFromUnicodeToUtf8L(pOutput);
         CleanupStack::PushL( bufferOutput );
         TPtr8 pOutput8 = bufferOutput->Des();


         HBufC8* buffer = ReadFileToBufferL( pInput );
         CleanupStack::PushL( buffer );

         // CVtcpBufferManager::NewL( in.Ptr() ,in.Length());


         CTestBufferManager* bm = CTestBufferManager::NewLC(  buffer->Ptr(), buffer->Size() );
         CEZCompressor* compressor = CEZCompressor::NewLC( *bm );

//    decompressor->DecompressL( pOutput8, buffer->Des() );

         while ( compressor->DeflateL() )
{
    /* empty */
}

TPtrC8 out=bm->OutputData();

           RFs aRFs;
           User::LeaveIfError(aRFs.Connect());
           CleanupClosePushL(aRFs);

           RFile fOut;
           User::LeaveIfError ( fOut.Replace( aRFs, pOutput, EFileWrite ) );
           CleanupClosePushL( fOut );
           User::LeaveIfError ( fOut.Write(out ) );


//WriteFileFromBufferL(pOutput,out)

           CleanupStack::PopAndDestroy( 6 );
    );
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:66,代码来源:xmlengtesterblockssergzip.cpp


示例11: TRAP

void T_CntImageRescaler::testEmptyArgs()
    {
    test.Next(_L("Empty arguments"));

    TPath path;
    TInt err;

    TRAP(err, iRescaler->ResizeImageL(KNullDesC(), path));
    test(err == KErrArgument);

    TRAP(err, iRescaler->ResizeImageL(path, KNullDesC()));
    test(err == KErrArgument);

    TRAP(err, iRescaler->ResizeImageL(path, path));
    test(err == KErrArgument);
    }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:16,代码来源:t_cntimagerescaler.cpp


示例12: iName

// ---------------------------------------------------------------------------
//  Constructor
// ---------------------------------------------------------------------------
//
CConnMonWlanNetwork::CConnMonWlanNetwork(
        const TBuf<KMaxNameLength>& aName,
        TUint aConnectionMode,
        TUint aSignalStrength,
        TUint aSecurityMode,
        TUint aSecurityModeV2,
        TUint aProtectedSetupSupport,
        const TBuf8<KWlanBssId>& aBssId,
        const TDesC& aVendorData )
        :
        iName( aName ),
        iConnectionMode( aConnectionMode ),
        iSignalStrength( aSignalStrength ),
        iSecurityMode( aSecurityMode ),
        iWlanBssId( aBssId ),
        iVendorData( NULL ),
        iSecurityModeV2( aSecurityModeV2 ),
        iProtectedSetupSupport( aProtectedSetupSupport )
    {
    if ( aVendorData != KNullDesC() && aVendorData.Length() > 0 )
        {
        // Can't leave here, copy contents only if enough memory
        iVendorData = HBufC::New( aVendorData.Length() );
        if ( iVendorData )
            {
            iVendorData->Des().Copy( aVendorData );
            }
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:33,代码来源:connmonwlannetwork_v2.cpp


示例13: KNullDesC

TPtrC CPosLmNameIndex::CIndexItem::Name() const
    {
    if ( iName )
        return *iName;
    else
        return KNullDesC();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:7,代码来源:EPos_CPosLmNameIndex.cpp


示例14: DLTRACEIN

void CNcdNodeFolderProxy::InternalizeNodeSeenFolderL() 
    {
    DLTRACEIN((""));
    
    if ( iNodeSeenFolder )
        {
        iNodeSeenFolder->InternalizeL();
        }
    else 
        {
        // Create the object.  
        // Get the handle at first.
        TInt handle( 0 );
        User::LeaveIfError(
            ClientServerSession().SendSync(
                NcdNodeFunctionIds::ENcdNodeSeenFolderHandle,
                KNullDesC(),
                handle,
                Handle() ) );
        
        DLINFO(( "handle: %d", handle ));
       
        iNodeSeenFolder = CNcdNodeSeenFolderProxy::NewL(
            ClientServerSession(), handle, *this );
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:26,代码来源:ncdnodefolderproxy.cpp


示例15: new

// ---------------------------------------------------------------------------
//  Copy Constructor
// ---------------------------------------------------------------------------
//
EXPORT_C CConnMonWlanNetwork* CConnMonWlanNetwork::NewL(
        CConnMonWlanNetwork& aConnMonWlanNetwork )
    {
    CConnMonWlanNetwork* wlanNet;
    if ( aConnMonWlanNetwork.iVendorData )
        {
        wlanNet = new( ELeave ) CConnMonWlanNetwork(
                aConnMonWlanNetwork.iName,
                aConnMonWlanNetwork.iConnectionMode,
                aConnMonWlanNetwork.iSignalStrength,
                aConnMonWlanNetwork.iSecurityMode,
                aConnMonWlanNetwork.iSecurityModeV2,
                aConnMonWlanNetwork.iProtectedSetupSupport,
                aConnMonWlanNetwork.iWlanBssId,
                aConnMonWlanNetwork.iVendorData->Des() );
        }
    else
        {
        wlanNet = new( ELeave ) CConnMonWlanNetwork(
                aConnMonWlanNetwork.iName,
                aConnMonWlanNetwork.iConnectionMode,
                aConnMonWlanNetwork.iSignalStrength,
                aConnMonWlanNetwork.iSecurityMode,
                aConnMonWlanNetwork.iSecurityModeV2,
                aConnMonWlanNetwork.iProtectedSetupSupport,
                aConnMonWlanNetwork.iWlanBssId,
                KNullDesC() );
        }
    return wlanNet;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,代码来源:connmonwlannetwork_v2.cpp


示例16: findPeninputServer

// ---------------------------------------------------------------------------
// RPeninputServerImpl::StartThread
// Creates the server thread on WINS and server process on MARM.
// Access to the thread/process creation is controlled with 
// a global mutex which allows only one client thread to do
// the actual server creation in WINS. In MARM the creation of
// new server exits with KErrAlreadyExits if another thread
// already created it.
// ---------------------------------------------------------------------------
//
TInt RPeninputServerImpl::StartThreadL()
    {
    if(iWaitScheduler)
        return KErrLaunchingServer;
    TInt ret = KErrNone;

    // check if server already exists
    TFindServer findPeninputServer( KPeninputServerName );
    TFullName name;
    if (findPeninputServer.Next( name ) == KErrNone)
        {
        // if server is already running return immediately
        return KErrAlreadyExists;
        } 
    // request status which gets signaled when server has been initialized

    RProcess server;
    User::LeaveIfError(server.Create(KPeninputServerExe,KNullDesC()));
    TRequestStatus status;            
    //User::WaitForRequest(status);
    
    
    iObserver = CPeninputServerObserver::NewL(this,
                                               0);
    server.Rendezvous(iObserver->RequestStatus());
    server.Resume();
    server.Close();
                                               
    iWaitScheduler = CPeninputServerWaiter::NewL(); 
    iWaitScheduler->Start();
    ret = iWaitScheduler->Error();
    
    return ret;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:44,代码来源:penclientimpl.cpp


示例17: DLTRACEIN

void CNcdBundleFolder::ConstructL( const CNcdNodeIdentifier& aIdentifier ) 
    {
    DLTRACEIN((""));
    CNcdParentOfTransparentNode::ConstructL( aIdentifier );
    AssignDesL( iViewType, KNullDesC() );
    DLTRACEOUT((""));
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:7,代码来源:ncdbundlefolder.cpp


示例18: pName

void CEmTubePlaylist::ConstructL( RFileReadStream& aStream )
	{
	TInt l = aStream.ReadInt32L();
	if( l )
		{
		iName = HBufC::NewL( l );
		TPtr pName( iName->Des() );
		aStream.ReadL( pName, l );
		}
	else
		{
		iName = KNullDesC().AllocL();
		}

	iType = (TEmTubePlaylistType)aStream.ReadInt32L();
	iFlags = aStream.ReadInt32L();

	TInt count = aStream.ReadInt32L();
	for(TInt i=0;i<count;i++)
		{
		CEmTubePlaylistEntry* e = CEmTubePlaylistEntry::NewLC();
		e->ImportL( aStream );
		iEntries.AppendL( e );
		CleanupStack::Pop( e );
		}
	}
开发者ID:Yelinson,项目名称:OpenVideoHub,代码行数:26,代码来源:emTubePlaylistManager.cpp


示例19: StartDummyServer

static TInt StartDummyServer()
	{
	const TUidType serverUid(KNullUid, TUid::Uid(KSendAsServerExeUid));
	TRequestStatus started( KRequestPending );
	RProcess server;
	TInt err = server.Create(KDummyServerExe, KNullDesC(), serverUid);

	if( err != KErrNone )
		{
		return err;
		}
	
	TRequestStatus status;
	server.Rendezvous(status);
	if( status != KRequestPending )
		{
		server.Kill(0); // abort start-up
		}
	else
		{
		server.Resume();	// wait for server start-up.
		}
	User::WaitForRequest(status);
	err = (server.ExitType() == EExitPanic ) ? KErrGeneral : status.Int();
	server.Close();
	return err;	
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:27,代码来源:csendasUInotifier.cpp


示例20: DLTRACEIN

void CNcdNodeProxy::ConstructL( )
    {
    DLTRACEIN(("this-ptr as MNcdNode: %X", static_cast<MNcdNode*>( this )));

    // Register the interfaces of this object
    MNcdNode* node( this );
    AddInterfaceL( 
        CCatalogsInterfaceIdentifier::NewL( node, this, MNcdNode::KInterfaceUid ) );

    // Make sure that at least some values are inserted to the link descriptors.
    // So, the references returned from functions of this class will contain at
    // least something.
    iTimestamp = KNullDesC().AllocL();
    iCatalogSourceName = KNullDesC().AllocL(); 
    iExpiredTime = 0;

    // Get the data from the server side.
    // It may be possible that actually not much is received
    // because the node may be in uninitialized state.
    // But at least the namespace and id information should be gotten.
    TRAPD( trapError, InternalizeL() );    

    // This node can not exist if the identifier data is not set.
    // So, if node identifier is not set this should leave and
    // prevent the creation of the node.
    if ( iNodeIdentifier == NULL )
        {
        User::LeaveIfError( trapError );
        }
    
    // Also make sure that parent identifier is set at least to empty value
    if ( iParentIdentifier == NULL )
        {
        // If we have to set the parent identifier here, it means that
        // the node link was not set yet. 
        // If node link was set, then the parent id was also set to correct value. 
        // And, then this value should not be set here.
        iParentIdentifier = CNcdNodeIdentifier::NewL();        
        }
        
    if ( iRealParentIdentifier == NULL ) 
        {
        iRealParentIdentifier = CNcdNodeIdentifier::NewL();
        }

    DLTRACEOUT((""));
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:47,代码来源:ncdnodeproxy.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ KOBJMETHOD函数代码示例发布时间:2022-05-30
下一篇:
C++ KNI_ThrowNew函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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