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


C++ TName::Trim方法代码示例

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


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

示例1: IsConnectionL

// ---------------------------------------------------------
// CActiveDisconnectDlgPlugin::IsConnectionL
// ---------------------------------------------------------
//
TBool CActiveDisconnectDlgPlugin::IsConnectionL( 
                                            CConnectionInfo* aConnectionInfo )
    {
    CLOG_ENTERFN( "CActiveDisconnectDlgPlugin::IsConnectionL" );
    
    TBool result( EFalse );
    
    TUint i( 0 );
    TUint connectionCount( 0 );
    TUint connNum( 0 );
    TUint subConnectionCount( 0 );
    TUint connId( 0 );    
    TInt bearer( 0 );
    TInt connStatus( 0 );

    //TRequestStatus status;
    TName apName;

    RConnectionMonitor connMon;
    result = connMon.ConnectL();
    CLOG_WRITEF( _L( "result: %d" ), result );     
    
    CDisconnectDlgActiveWaiter* waiter = CDisconnectDlgActiveWaiter::NewL();
    CleanupStack::PushL( waiter );
    
    connMon.GetConnectionCount( connNum, waiter->iStatus );
    waiter->WaitForRequest();
    //User::WaitForRequest( status );
    CLOG_WRITEF( _L( "status: %d" ), waiter->iStatus.Int() );  
    CLOG_WRITEF( _L( "connNum: %d" ), connNum );     
           
    for( i = 1; i < ( connNum + 1 ) && !connectionCount; ++i )
        {
        connMon.GetConnectionInfo( i, connId, subConnectionCount );

        connMon.GetStringAttribute( connId, 0, KIAPName, apName, waiter->iStatus );
        waiter->WaitForRequest();
        //User::WaitForRequest( status );
        CLOG_WRITEF( _L( "KIAPName status: %d" ), waiter->iStatus.Int() );     
         
    
        connMon.GetIntAttribute( connId, 0, KBearer, bearer, waiter->iStatus );
        waiter->WaitForRequest();
        //User::WaitForRequest( status );
        CLOG_WRITEF( _L( "KBearer status: %d" ), waiter->iStatus.Int() );     
        

        connMon.GetIntAttribute( connId, 0, KConnectionStatus, connStatus, 
                                 waiter->iStatus );
        waiter->WaitForRequest();
        //User::WaitForRequest( status );
        CLOG_WRITEF( _L( "KConnectionStatus status: %d" ), waiter->iStatus.Int() );     
        
        TUint iapId( 0 );
        connMon.GetUintAttribute( connId, 0, KIAPId, iapId, waiter->iStatus ); 
        waiter->WaitForRequest();
        //User::WaitForRequest( status );
        CLOG_WRITEF(_L( "KIAPId status: %d" ), waiter->iStatus.Int() );  
        CLOG_WRITEF(_L( "iapId: %d" ), iapId );
        
        TConnMonTimeBuf timeBuf;
        connMon.GetPckgAttribute( connId, 0, KStartTime, timeBuf, waiter->iStatus );
        waiter->WaitForRequest();
        CLOG_WRITEF(_L( "KStartTime status: %d" ), waiter->iStatus.Int() ); 
       
        switch( bearer )
            {
            case EBearerGPRS :
            case EBearerEdgeGPRS :
            case EBearerExternalGPRS : 
            case EBearerExternalEdgeGPRS :
            case EBearerWCDMA :
            case EBearerExternalWCDMA :
#ifdef __WINS__
            case EBearerLAN :
#endif // WINS
                {
                if ( ( connStatus == KLinkLayerOpen ) ||
                     ( connStatus == KConnectionOpen && 
                       bearer >= EBearerExternalCSD ) )
                    {      
                    apName.Trim();
                    if( apName.Left( KMrouterName().Length() ).
                        CompareF( KMrouterName ) )
                        {
                        ++connectionCount;
                        aConnectionInfo->SetIapNameL( apName );
                        aConnectionInfo->SetBearerType( bearer );
                        aConnectionInfo->SetConnId( connId );
                        aConnectionInfo->SetIAPId( iapId );
                        aConnectionInfo->SetStartTime( timeBuf() );
                        
                        TConnMonClientEnumBuf clientEnum;
                        connMon.GetPckgAttribute( connId, 0, KClientInfo,
                                                    clientEnum, waiter->iStatus );
                        waiter->WaitForRequest();
//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:101,代码来源:ActiveDisconnectDlgPlugin.cpp


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