|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Capi
is the Common ISDN Application Programming Interface (CAPI 2.0)
for Java.
© 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
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 |
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 conrtoller)
CAPI 2.0 equivalent: CAPI_GET_VERSION. |
boolean |
installed()
CAPI 2.0 equivalent: CAPI_INSTALLED. |
void |
putMessage(CapiMessage msg)
CAPI 2.0 equivalent: CAPI_PUT_MESSAGE. |
int |
register(int maxcon,
int maxblocks,
int maxlen)
CAPI 2.0 equivalent: CAPI_REGISTER. |
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 |
waitForSignal(int appID)
CAPI 2.0 equivalent: CAPI_WAIT_FOR_SIGNAL. |
Method Detail |
public java.lang.String getImplementationInfo()
public void addListener(int appID, CapiListener listener)
appID
- the application identification number assigned by register()public void removeListener(int appID, CapiListener listener)
appID
- the application identification number assigned by register()public CapiMessage createMessage(int appID, int type, int number) throws CapiException
appID
- 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 messagepublic CapiMessage createMessage(byte[] msg) throws CapiException
msg
- the binary CAPI 2.0 messagepublic int register(int maxcon, int maxblocks, int maxlen) throws CapiException
maxcon
- the maximum number of logical connectionsmaxblocks
- the maximum number of received data blocksmaxlen
- the maximum size of data block to be transmitted and receivedpublic int register(int bufsize, int maxcon, int maxblocks, int maxlen) throws CapiException
bufsize
- 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 receivedpublic void release(int appID) throws CapiException
appID
- the application identification number assigned by register()public void putMessage(CapiMessage msg) throws CapiException
appID
- the application identification number assigned by register()msg
- the CapiMessage to be sent to the CAPIpublic CapiMessage getMessage(int appID) throws CapiException
appID
- the application identification number assigned by register()public void waitForSignal(int appID) throws CapiException
appID
- the application identification number assigned by register()public boolean installed() throws CapiException
This method always returns a true value or even throws an exception if CAPI 2.0 is not installed correctly.
public java.lang.String getManufacturer() throws CapiException
public java.lang.String getManufacturer(int controller) throws CapiException
controller
- the number of the controller requestedpublic int[] getVersion() throws CapiException
public int[] getVersion(int conrtoller) throws CapiException
controller
- the number of the controller requestedpublic java.lang.String getSerialNumber() throws CapiException
public java.lang.String getSerialNumber(int controller) throws CapiException
controller
- the number of the controller requestedpublic int getNumberOfControllers() throws CapiException
public byte[] getProfile(int controller) throws CapiException
controller
- the number of the controller; a value of 0 may cause an exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |