01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package sim.toolkit;
28:
29: import javacard.framework.*;
30:
31: /**
32: * The interface of SAT Accessor.
33: */
34: public interface AccessSAT extends Shareable {
35: /**
36: * Gets the length of the APDUBuffer.
37: * @return requested length
38: */
39: public short getAPDUBufferLength();
40:
41: /**
42: * Gets the maximum length of the APDUBuffer.
43: * @return requested length
44: */
45: public short getAPDUBufferMax();
46:
47: /**
48: * Gets one byte from the APDUBuffer.
49: * @param index Index of requested byte in the buffer
50: * @return requested byte
51: */
52: public byte getAPDUBufferByte(short index);
53:
54: /**
55: * Sets one byte from the APDUBuffer.
56: * @param index Index of byte in the buffer
57: * @param value The value to be set
58: */
59: public void setAPDUBufferByte(short index, byte value);
60:
61: /**
62: * Sets the data in the out buffer.
63: * @param length length of data
64: */
65: public void setOutBufferData(short length);
66:
67: /**
68: * Returns the length of Data that has been set in the out buffer.
69: * @return length of data
70: */
71: public short getOutDataLength();
72:
73: /**
74: * Sets the event listener applet.
75: * @param aid applet AID
76: */
77: public void setEventListener(AID aid);
78:
79: /**
80: * Removes the event listener from the list of listeners.
81: * @param aid applet AID
82: */
83: public void clearEventListener(AID aid);
84:
85: /**
86: * Returns true if the applet corresponding to the AID passed to this
87: * method is found in the list of listeners.
88: * @param aid applet AID
89: * @return true if the applet is a listener and false otherwise
90: */
91: public boolean isEventListenerSet(AID aid);
92: }
|