|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface SeSlot
The Secure Element Slot represent an instance of Secure Element.
| Nested Class Summary | |
|---|---|
static class |
SeSlot.SwpStatus
The SwpStatus enumeration |
| Field Summary | |
|---|---|
static int |
SCOPE_BAT_OFF
Scope of the policy: Policy applied in battery off or in battery low (persistent value) |
static int |
SCOPE_BOOT
Scope of the policy: Policy applied when the device boots (persistent value) |
static int |
SCOPE_CURRENT
Scope of the policy: Current value, applied immediately (non-persistent value) |
| Method Summary | |
|---|---|
boolean |
checkAidAccess(byte[] aid,
byte[] impersonationData)
Checks the access to an AID. |
String |
getName()
Returns the name of the Secure Element. |
boolean |
getPolicy(int scope,
boolean cardEmulation,
ConnectionProperty protocol)
Gets the policy of the Secure Element. |
SeSlot.SwpStatus |
getSwpStatus()
Returns the current SWP Status. |
boolean |
isPresent()
Returns true if a Secure Element is present in the slot. |
boolean |
isProtocolSupported(boolean cardEmulation,
ConnectionProperty protocol)
Checks if a protocol is supported by the Secure Element for the RF interface. |
boolean |
isRemovable()
Returns true if a Secure Element is removable. |
boolean |
isUicc()
Returns true if this Secure Element is a UICC. |
Iso7816Part4Connection |
openConnection(boolean force)
Opens a connection with the Secure Element. |
void |
registerEventHandler(SeSlotEventHandler handler)
Registers an event handler for the slot. |
void |
setPolicy(int scope,
boolean cardEmulation,
ConnectionProperty protocol,
boolean value)
Sets the policy of the Secure Element. |
boolean |
supportCommunication()
Returns true if the Secure Element support the communication using openConnection(). |
boolean |
supportConnectivityEvent()
Returns true if the Secure Element may send connectivity events. |
boolean |
supportHotPlugEvent()
Returns true if the slot may send hot-plug events. |
boolean |
supportTransactionEvent()
Returns true if the Secure Element may send transaction events. |
void |
unregisterEventHandler(SeSlotEventHandler handler)
Unregisters an event handler for the slot. |
| Field Detail |
|---|
static final int SCOPE_BOOT
static final int SCOPE_CURRENT
static final int SCOPE_BAT_OFF
| Method Detail |
|---|
String getName()
boolean isPresent()
throws NfcException
IllegalStateException - if another operation is pending with the Secure Element.
NfcException - The Secure Element does not support the communication or
the Secure Element is not responding.
SeSlot.SwpStatus getSwpStatus()
throws NfcException
IllegalStateException - if another operation is pending with the Secure Element.
NfcException - The Secure Element does not support the communication or
the Secure Element is not responding.boolean isRemovable()
boolean isUicc()
boolean supportTransactionEvent()
boolean supportHotPlugEvent()
boolean supportConnectivityEvent()
boolean supportCommunication()
Iso7816Part4Connection openConnection(boolean force)
throws NfcException
If force is set to true, the connection will be open even if:
If force is set to false,
the connection will be created only when the current card emulation is stopped
and when there is no reader communication with an external card.
If there is no card emulation and no reader active, the connection is immediate.
force - the flag forcing the connection.
IllegalStateException - A connection with the Secure Element is already open.
NfcException - The Secure Element does not support the communication or
the Secure Element is not responding.
boolean getPolicy(int scope,
boolean cardEmulation,
ConnectionProperty protocol)
The policy defines the protocol allowed for the secure element with the external RF interface.
scope - the scope of the policy is one of the following values:
SCOPE_BOOT policy applied when the device boots (persistent value),SCOPE_CURRENT current value, applied immediately (non-persistent value), orSCOPE_BAT_OFF policy applied in battery off or in battery low (persistent value)cardEmulation - true for the card emulation policy,
false for the card listener policy.protocol - the protocol of the policy.
true if the specified protocol is allowed by the policy with the specified scope,
false otherwise.
IllegalArgumentException - if protocol is null or the scope value is invalid.
void setPolicy(int scope,
boolean cardEmulation,
ConnectionProperty protocol,
boolean value)
throws NfcException
The policy defines the protocol allowed for the secure element with the RF interface.
scope - the scope of the policy is one of the following values:
SCOPE_BOOT policy applied when the device boots (persistent value),SCOPE_CURRENT current value, applied immediately (non-persistent value), orSCOPE_BAT_OFF policy applied in battery off or in battery low (persistent value)cardEmulation - true for the card emulation policy,
false for the card listener policy.protocol - the protocol of the policy.value - true if the specified protocol is allowed by
the policy with the specified scope, false otherwise.
IllegalArgumentException - if protocol is null or the scope value is invalid.
IllegalArgumentException - if the protocol is not supported by the Secure Element.
SecurityException - if the application is not allowed to the set the policy for this Secrue Element.
IllegalStateException - if another operation is pending with the Secure Element.
NfcException - if an error occures when the policy is set.
boolean isProtocolSupported(boolean cardEmulation,
ConnectionProperty protocol)
cardEmulation - true for the card emulation protocol,
false for the card listener protocol.protocol - the protocol to check.
true if the protocol is supported, false otherwise.
IllegalArgumentException - if protocol is null.
void registerEventHandler(SeSlotEventHandler handler)
throws NfcException
handler - the event handler to register.
IllegalArgumentException - if handler is null.
IllegalStateException - an event handler is already registered for this slot.
NfcException - with code W_ERROR_FEATURE_NOT_SUPPORTED if se does not support this feature.void unregisterEventHandler(SeSlotEventHandler handler)
handler - the event handler to unregister.
IllegalArgumentException - if handler is null or if it is not the registered one.
IllegalStateException - there is not any event handler registered for this slot.
boolean checkAidAccess(byte[] aid,
byte[] impersonationData)
aid - The AID to check (between 5 and 16 bytes inclusive). This value should not be null.impersonationData - The buffer containing the impersonated application data for the authentication. This value should not be null.
IllegalArgumentException - if aid or impersonationData is null.
|
Copyright © 2010-2011 Inside Secure |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||