Пример #1
0
int AbstractPort::activeStreamCount()
{
    int count = 0;

    // TODO: cache this value or keep track of this during add/delete/modify
    for (int i = 0; i < streamCount(); i++) {
        if (streamList_[i]->isEnabled())
            count++;
    }

    return count;
}
Пример #2
0
// ---------------------------------------------------------------------------
// CNcmSession::StreamIndexL
// ---------------------------------------------------------------------------
//
TUint CNcmSession::StreamIndexL( TUint aStreamId )
    {   
    TInt streamCount( iStreams.Count() );
    
    for ( TInt i = 0; i < streamCount; i++ )
        {
        if ( iStreams[i]->StreamId() == aStreamId )
            {
            return i;
            }
        }
    User::Leave( KErrNotFound );
    return KErrNone; // for warning removal on compile
    }