|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.sourceforge.jcapi.Jcapi
Jcapi is a Java wrapper for the CAPI.
It uses the Java Native Interface to load a platform
dependent shared library which gives access to the Common ISDN API
(CAPI20) shared library delivered whith the ISDN adapter device.
© 2002 Holger Gräfe
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Contact to author: holger.graefe@gmx.de
Project website: http://jcapi.sourceforge.net
| Constructor Summary | |
Jcapi()
|
|
| Method Summary | |
void |
addListener(int appID,
CapiListener listener)
adds the given reference to a List of CapiListeners that will be notified of CapiEvents for the given application ID. |
CapiMessage |
createMessage(byte[] msg)
constructs a new CapiMessage object from a binary message. |
CapiMessage |
createMessage(int appID,
int type,
int number)
constructs a new CapiMessage object. |
java.lang.String |
getImplementationInfo()
returns an information about the used implementation of this interface. |
java.lang.String |
getManufacturer()
CAPI 2.0 equivalent: CAPI_MANUFACTURER. |
java.lang.String |
getManufacturer(int controller)
CAPI 2.0 equivalent: CAPI_MANUFACTURER. |
CapiMessage |
getMessage(int appID)
CAPI 2.0 equivalent: CAPI_GET_MESSAGE. |
int |
getNewMessageNumber()
|
int |
getNumberOfControllers()
CAPI 2.0 equivalent: CAPI_GET_PROFILE with parameter 0. |
byte[] |
getProfile(int controller)
CAPI 2.0 equivalent: CAPI_GET_PROFILE with parameter <>0. |
java.lang.String |
getSerialNumber()
CAPI 2.0 equivalent: CAPI_GET_SERIAL_NUMBER. |
java.lang.String |
getSerialNumber(int controller)
CAPI 2.0 equivalent: CAPI_GET_SERIAL_NUMBER. |
int[] |
getVersion()
CAPI 2.0 equivalent: CAPI_GET_VERSION. |
int[] |
getVersion(int controller)
CAPI 2.0 equivalent: CAPI_GET_VERSION. |
boolean |
installed()
CAPI 2.0 equivalent: CAPI_INSTALLED. |
static void |
main(java.lang.String[] argv)
|
void |
putMessage(CapiMessage message)
CAPI 2.0 equivalent: CAPI_PUT_MESSAGE. |
int |
register()
calls the register method with default parameters. |
int |
register(int maxcon,
int maxblocks,
int maxlen)
calls the register method with a default bufsize
parameter. |
int |
register(int bufsize,
int maxcon,
int maxblocks,
int maxlen)
CAPI 2.0 equivalent: CAPI_REGISTER. |
void |
release(int appID)
CAPI 2.0 equivalent: CAPI_RELEASE. |
void |
removeListener(int appID,
CapiListener listener)
removes a CapiListener previously added with addListener(). |
void |
test()
|
void |
test(java.io.PrintWriter out)
|
void |
waitForSignal(int appID)
CAPI 2.0 equivalent: CAPI_WAIT_FOR_SIGNAL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Jcapi()
| Method Detail |
public boolean installed()
throws CapiException
CapiThis method always returns a true value or even throws an exception if CAPI 2.0 is not installed correctly.
installed in interface Capiorg.capi.capi20.Capi
public java.lang.String getManufacturer()
throws CapiException
CapigetManufacturer in interface Capiorg.capi.capi20.Capi
public java.lang.String getManufacturer(int controller)
throws CapiException
CapigetManufacturer in interface Capiorg.capi.capi20.Capicontroller - the number of the controller requestedpublic java.lang.String getImplementationInfo()
CapigetImplementationInfo in interface Capiorg.capi.capi20.Capi
public java.lang.String getSerialNumber()
throws CapiException
CapigetSerialNumber in interface Capiorg.capi.capi20.Capi
public java.lang.String getSerialNumber(int controller)
throws CapiException
CapigetSerialNumber in interface Capiorg.capi.capi20.Capicontroller - the number of the controller requested
public int[] getVersion()
throws CapiException
CapigetVersion in interface Capiorg.capi.capi20.Capi
public int[] getVersion(int controller)
throws CapiException
CapigetVersion in interface Capiorg.capi.capi20.Capicontroller - the number of the controller requested
public CapiMessage createMessage(int appID,
int type,
int number)
throws CapiException
CapicreateMessage in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()type - the message type, which correspond with the CAPI message fields
"command" and "subcommand"number - the identification number of this message
public CapiMessage createMessage(byte[] msg)
throws CapiException
CapicreateMessage in interface Capiorg.capi.capi20.Capimsg - the binary CAPI 2.0 message
public int register()
throws CapiException
register method with default parameters.
public int register(int maxcon,
int maxblocks,
int maxlen)
throws CapiException
register method with a default bufsize
parameter.register in interface Capi
public int register(int bufsize,
int maxcon,
int maxblocks,
int maxlen)
throws CapiException
Capiregister in interface Capiorg.capi.capi20.Capibufsize - the size of the buffer, typical
bufsize = 1024 + (1024 * maxcon) maxcon - the maximum number of logical connectionsmaxblocks - the maximum number of received data blocksmaxlen - the maximum size of data block to be transmitted and received
public void release(int appID)
throws CapiException
Capirelease in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()
public int getNumberOfControllers()
throws CapiException
CapigetNumberOfControllers in interface Capiorg.capi.capi20.Capi
public byte[] getProfile(int controller)
throws CapiException
CapigetProfile in interface Capiorg.capi.capi20.Capicontroller - the number of the controller; a value of 0 may cause an exception
public void putMessage(CapiMessage message)
throws CapiException
CapiputMessage in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()msg - the CapiMessage to be sent to the CAPI
public CapiMessage getMessage(int appID)
throws CapiException
CapigetMessage in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()
public void addListener(int appID,
CapiListener listener)
CapiaddListener in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()
public void removeListener(int appID,
CapiListener listener)
CapiremoveListener in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()
public void waitForSignal(int appID)
throws CapiException
CapiwaitForSignal in interface Capiorg.capi.capi20.CapiappID - the application identification number assigned by register()public int getNewMessageNumber()
public void test(java.io.PrintWriter out)
public void test()
public static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||