Package smartcard :: Module CardConnectionDecorator :: Class CardConnectionDecorator
[hide private]
[frames] | no frames]

Class CardConnectionDecorator

source code


Card connection decorator class.

Instance Methods [hide private]
 
__init__(self, cardConnectionComponent)
Construct a new card connection decorator.
source code
 
addSWExceptionToFilter(self, exClass)
call inner component addSWExceptionToFilter
source code
 
addObserver(self, observer)
call inner component addObserver
source code
 
deleteObserver(self, observer)
call inner component deleteObserver
source code
 
connect(self, protocol=None, mode=None, disposition=None)
call inner component connect
source code
 
disconnect(self)
call inner component disconnect
source code
 
getATR(self)
call inner component getATR
source code
 
getProtocol(self)
call inner component getProtocol
source code
 
getReader(self)
call inner component getReader
source code
 
setErrorCheckingChain(self, errorcheckingchain)
call inner component setErrorCheckingChain
source code
 
setProtocol(self, protocol)
call inner component setProtocol
source code
 
transmit(self, bytes, protocol=None)
call inner component transmit
source code
 
control(self, controlCode, bytes=[])
call inner component control
source code
 
getAttrib(self, attribId)
call inner component getAttrib
source code

Inherited from CardConnection.CardConnection: __del__, __enter__, __exit__, doControl, doGetAttrib, doTransmit

Inherited from Observer.Observable: clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, setChanged

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from CardConnection.CardConnection: RAW_protocol, T0_protocol, T15_protocol, T1_protocol

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cardConnectionComponent)
(Constructor)

source code 

Construct a new card connection decorator.

CardConnectionComponent: CardConnection component to decorate

Parameters:
  • reader - name of the reader in which the smartcard to connect to is located.
Overrides: object.__init__

addSWExceptionToFilter(self, exClass)

source code 

call inner component addSWExceptionToFilter

Parameters:
Overrides: CardConnection.CardConnection.addSWExceptionToFilter

addObserver(self, observer)

source code 

call inner component addObserver

Overrides: Observer.Observable.addObserver

deleteObserver(self, observer)

source code 

call inner component deleteObserver

Overrides: Observer.Observable.deleteObserver

connect(self, protocol=None, mode=None, disposition=None)

source code 

call inner component connect

Parameters:
Overrides: CardConnection.CardConnection.connect

disconnect(self)

source code 

call inner component disconnect

Overrides: CardConnection.CardConnection.disconnect

getATR(self)

source code 

call inner component getATR

Overrides: CardConnection.CardConnection.getATR

getProtocol(self)

source code 

call inner component getProtocol

Overrides: CardConnection.CardConnection.getProtocol

getReader(self)

source code 

call inner component getReader

Overrides: CardConnection.CardConnection.getReader

setErrorCheckingChain(self, errorcheckingchain)

source code 

call inner component setErrorCheckingChain

Parameters:
  • errorcheckingchain - a smartcard.sw.ErrorCheckingChain object The error checking strategies in errorchecking chain will be tested with each received response APDU, and a smartcard.sw.SWException.SWException will be raised upon error.
Overrides: CardConnection.CardConnection.setErrorCheckingChain

setProtocol(self, protocol)

source code 

call inner component setProtocol

Parameters:
  • protocol - a bit mask of CardConnection.T0_protocol, CardConnection.T1_protocol, CardConnection.RAW_protocol, CardConnection.T15_protocol e.g. setProtocol(CardConnection.T1_protocol | CardConnection.T0_protocol)
Overrides: CardConnection.CardConnection.setProtocol

transmit(self, bytes, protocol=None)

source code 

call inner component transmit

Parameters:
  • bytes - list of bytes to transmit
  • protocol - the transmission protocol, from CardConnection.T0_protocol, CardConnection.T1_protocol, or CardConnection.RAW_protocol
Overrides: CardConnection.CardConnection.transmit

control(self, controlCode, bytes=[])

source code 

call inner component control

Parameters:
  • controlCode - command code
  • bytes - list of bytes to transmit
Overrides: CardConnection.CardConnection.control

getAttrib(self, attribId)

source code 

call inner component getAttrib

Parameters:
  • attribId - attribute id like SCARD_ATTR_VENDOR_NAME
Overrides: CardConnection.CardConnection.getAttrib