wim/Scard/inc/ScardAccessControl.inl
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 26 Jan 2010 15:20:08 +0200
changeset 0 164170e6151a
permissions -rw-r--r--
Revision: 201004

/*
* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Inline functions for smart card access control
*
*/



//  INCLUDES
#include "ScardMessageStack.h"
#include "ScardSession.h"

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CScardAccessControl::ReaderID
// Return reader ID
// -----------------------------------------------------------------------------
//
inline const TReaderID CScardAccessControl::ReaderID() const 
    {
    return iReaderID;
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::Reader
// Return reader object
// -----------------------------------------------------------------------------
//
inline MScardReader* CScardAccessControl::Reader() const
    {
    return iReader;
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::CancelByTimeOut
// Cancel operations by timeout
// -----------------------------------------------------------------------------
//
void CScardAccessControl::CancelByTimeOut( CScardCommandTimer* aTimer )
    {
    iManager->CancelByTimeOut( aTimer );
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::ChannelStatus
// Return channel status
// -----------------------------------------------------------------------------
//
inline TUint16 CScardAccessControl::ChannelStatus()
    {
    return iManager->ChannelStatus();
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::ChannelOpenedYet
// Is channel opened yet. Return ETrue/EFalse
// -----------------------------------------------------------------------------
//
inline const TBool CScardAccessControl::ChannelOpenedYet( const TInt8 aChannel )
    {
    return iManager->ChannelOpenedYet( aChannel );
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::AddSessionToChannelL
// Add session to the channel
// -----------------------------------------------------------------------------
//
inline const TBool CScardAccessControl::AddSessionToChannelL(
    const TInt8 aChannel,
    const TInt aSessionID )
    {
    return iManager->AddSessionToChannelL( aChannel, aSessionID );
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::UnreservedLogicalChannel
// Return unreserved logical channel
// -----------------------------------------------------------------------------
//
inline const TInt8 CScardAccessControl::UnreservedLogicalChannel() const
    {
    return iManager->UnreservedLogicalChannel();
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::RemoveSessionFromChannelL
// Remove Session From Channel
// -----------------------------------------------------------------------------
//
inline const TBool CScardAccessControl::RemoveSessionFromChannelL(
    const TInt8 aChannel,
    const TInt aSessionID )
    {
    return iManager->RemoveSessionL( aChannel, aSessionID );
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::ValidateChannelL
// Validate channel
// -----------------------------------------------------------------------------
//
inline void CScardAccessControl::ValidateChannelL(
    const TInt8 aChannel, 
    const TInt aSessionID )
    {
    iManager->ValidateChannelL( aChannel, aSessionID );
    }

// -----------------------------------------------------------------------------
// CScardAccessControl::HandleNextMessageL
// Handle Next Message
// -----------------------------------------------------------------------------
//
inline void CScardAccessControl::HandleNextMessageL(
    const TMessageHandle& aHandle )
    {
    if ( aHandle.iSessionID != ENoSession )
        {
        ( SessionBase( aHandle.iSessionID ) )->ServiceL( aHandle );
        }
    }

// End of File