// ---------------------------------------------------------
// CWlanScanRequest::RunProtectedSetup
// ---------------------------------------------------------
//
void CWlanMgmtClient::RunProtectedSetup(
    TRequestStatus& aStatus,
    const TWlanSsid& aSsid,
    const TWlanWpsPin& /* aWpsPin */,
    CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials )
{
    // Complete the request immediately
    TRequestStatus *status = &aStatus;
    TInt err = KErrNone;
    TWlanProtectedSetupCredentialAttribute attr;
    
    attr.iSsid.Copy(aSsid);
    attr.iSecurityMode = EWlanIapSecurityModeAllowUnsecure;
    attr.iAuthenticationMode = EWlanAuthenticationModeOpen;
    attr.iOperatingMode = EWlanOperatingModeInfrastructure;
    attr.iWepDefaultKey = EWlanDefaultWepKey1;
    
    TRAP(err, aCredentials.AppendL(attr) );
    User::RequestComplete(status, err);
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
//
CArrayFixSeg<TPosLmItemId>* CPosLmNameIndex::GetSortedIdsLC( TInt aFirst, TInt aCount ) const
    {
    if ( iStatus == KErrNone )
        {
        const TInt KGranularity( 512 );
        CArrayFixSeg<TPosLmItemId>* array = new (ELeave) CArrayFixSeg<TPosLmItemId>( KGranularity );
        CleanupStack::PushL( array );
        TInt first = Max( 0, aFirst );
        TInt last = Min( first + aCount, iArray->Count() );
        for ( TInt i = first; i < last; i++ )
            {
            CIndexItem* item = iArray->At(i);
            array->AppendL( item->Id() );
            }
        return array;
        }
    else
        {
        User::Leave( iStatus );
        return NULL;
        }
    }
Exemple #3
0
void CTestList::AppendToListL(const TDesC &aDesc)
{
    TestNameBuf buf(aDesc);
    iTestNames.AppendL(buf);
}