-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e3e978
commit 52edbb5
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...inal/src/org/simalliance/openmobileapi/service/terminals/SamplePluginTerminal/Applet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.simalliance.openmobileapi.service.terminals.SamplePluginTerminal; | ||
|
||
/** | ||
* This mock class implements a minimum subset of the original class | ||
* javacard.framework.Applet | ||
*/ | ||
|
||
public abstract class Applet { | ||
|
||
public static final int INX_CLA = 0; | ||
public static final int INX_INS = 1; | ||
public static final int INX_P1 = 2; | ||
public static final int INX_P2 = 3; | ||
public static final int INX_LC = 4; | ||
public static final int OFFSET_CDATA = 5; | ||
|
||
protected boolean isSelect; | ||
|
||
public boolean isSelect() { return isSelect; } | ||
abstract public byte[] process(byte[] command) throws Throwable; | ||
|
||
/** | ||
* sets the isSelect flag indicating that the current C-APDU | ||
* is a SELECT command. | ||
* The isSelect flag can be queried by the selectingApplet() method | ||
*/ | ||
public void mockSetSelect(boolean isSelect) { | ||
this.isSelect = isSelect; | ||
} // mockSetSelect | ||
|
||
} // class |