本文整理汇总了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();
//.........这里部分代码省略.........