/*
* Templates
* and open the template in the editor.
*/
package com.voice;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
import java.util.Hashtable;
/**
*
* @author GaoYuan <
[email protected]>
*/
public interface SHP_A3 extends Library {
final int ANALOG_CH = 0;
final int INTER_CH = 1;
final int USER_CH = 2;
final int REC_CH = 3;
final int SS1_CH = 4;
final int FAX_CH = 5;
//} As int
////pending reason
//enum{
final int ANALOGOUT_NO_DIALTONE = 0;
final int ANALOGOUT_BUSYTONE = 1;
final int ANALOGOUT_ECHO_NOVOICE = 2;
final int ANALOGOUT_NOANSWER = 3;
final int ANALOGOUT_TALKING_REMOTE_HANGUPED = 4;
final int SS1IN_WAIT_SET_KB = 10;
final int SS1IN_BWD_KB5 = 11;
final int SS1IN_TALKING_REMOTE_HANGUPED = 12; //// 自动呼入时检测到主叫用户先挂机;
final int SS1OUT_TALKING_REMOTE_HANGUPED = 20; //// 自动呼出进入通话后检测到被叫用户先挂机;
final int SS1OUT_NOANSWER = 21; //// 等待被叫用户摘机超时;
final int SS1OUT_NOBWDACK = 22; //// 等待占用应答信号超时;
final int SS1OUT_DIALING_BWD_HANGUP = 23; //// 收到后向拆线信号;
final int SS1OUT_BWD_A5 = 24; //// 收到A=5(空号)信号;
final int SS1OUT_BWD_KB5 = 25; //// 收到KB=5(空号)信号;
final int SS1OUT_BWD_KB2 = 26; //// 用户“市忙”;
final int SS1OUT_BWD_KB3 = 27; //// 用户”长忙“;
final int SS1OUT_BWD_A4 = 28; //// 机键拥塞;
final int SS1OUT_BWD_KB4 = 29; //// 收到KB=4(机键拥塞)信号;
final int SS1OUT_TIMEOUT_BWD_A = 30; //// 等候接收后向A组信号超时;
final int SS1OUT_TIMEOUT_BWD_A_STOP = 31 ; //// 等候后向A组信号停发超时;
final int SS1OUT_TIMEOUT_BWD_KB = 32 ; //// 接收后向KB信号超时;
final int SS1OUT_TIMEOUT_BWD_KB_STOP = 33 ; //// 等候被叫方停发后向KB信号超时;
final int SS1OUT_TIMEOUT_CALLERID_BWD_A1 = 34 ; //// 收到未定义的后向A组信号;
final int SS1OUT_TIMEOUT_CALLERID_BWD_A1_STOP = 35; //// 发送CALLERID时等候后向A组信号停发超时;
final int SS1OUT_UNDEFINED_CALLERID_BWD_A = 36; //// 发送主叫号码时收到未定义的后向A组信号;
final int SS1OUT_UNDEFINED_BWD_A = 37; //// 收到未定义的后向A组信号;
final int SS1OUT_UNDEFINED_BWD_KB = 38 ; //// 收到未定义的KB信号;
//} As int
//enum{
final int S_CALL_STANDBY = 0;
final int S_CALL_PICKUPED = 1;
final int S_CALL_RINGING = 2;
final int S_CALL_TALKING = 3;
final int S_CALL_ANALOG_WAITDIALTONE = 4;
final int S_CALL_ANALOG_TXPHONUM = 5;
final int S_CALL_ANALOG_WAITDIALRESULT = 6;
final int S_CALL_PENDING = 7;
final int S_CALL_OFFLINE = 8;
final int S_CALL_WAIT_REMOTE_PICKUP = 9;
final int S_CALL_ANALOG_CLEAR = 10;
final int S_CALL_SS1_BLOCK = 20;
final int S_CALL_SS1_SAYIDLE = 21;
final int S_CALL_SS1IN_WAIT_PHONUM = 30;
final int S_CALL_SS1IN_WAIT_FWDSTOP = 31;
final int S_CALL_SS1IN_WAIT_CALLERID = 32;
final int S_CALL_SS1IN_WAIT_KD = 33;
final int S_CALL_SS1IN_WAIT_KDSTOP = 34;
final int S_CALL_SS1OUT_WAITBWDACK = 40;
final int S_CALL_SS1OUT_TXPHONENUM = 41;
final int S_CALL_SS1OUT_WAIT_PHONUM = 42;
final int S_CALL_SS1OUT_TXCALLERID = 43;
final int S_CALL_SS1OUT_WAIT_KB = 44;
final int DIAL_STANDBY = 0;
final int DIAL_DIALING = 1;
final int DIAL_ECHOTONE = 2;
final int DIAL_NO_DIALTONE = 3;
final int DIAL_BUSYTONE = 4;
final int DIAL_ECHO_NOVOICE = 5;
final int DIAL_NOVOICE = 6;
final int DIAL_VOICE = 7;
final int DIAL_VOICEF1 = 8;
final int DIAL_VOICEF2 = 9;
final int DIAL_NOANSWER = 10;
final int DIAL_FAILURE = 11;
final int DIAL_INVALID_PHONUM = 12;
SHP_A3 INSTANCE = (SHP_A3)Native.loadLibrary("SHP_A3", SHP_A3.class);
//void printf(String format, Object... args);((Platform.isWindows() ? "msvcrt" : "c"),
public int SsmSetEvent(Integer wEvent,
Integer nReference,boolean bEnable,EVENT_SET_INFO pEventSet);
public int SsmStartCti(String lpSsmCfgFileName,
String lpIndexCfgFileName);
public int SsmCloseCti();
public void SsmGetLastErrMsg(byte[] szErrMsgBuf);
public int SsmGetLastErrCode();
public int SsmGetMaxUsableBoard();
public int SsmGetMaxCfgBoard();
public int SsmGetRxDtmfBufSize();
public int SsmGetAccreditId(int nBId);
public int SsmGetMaxCh();
public int SsmGetChType(int ch);
public int SsmSetMaxIdxSeg(int wMaxIdxSeg);
public int SsmLoadIndexData(int nSegNo,
String pAlias,
int nCodec,
String pVocFile,
int lStartPos,
int lLen);
public int SsmFreeIndexData(int nSegNo);
public int SsmGetTotalIndexSeg();
public int SsmPauseCard();
public int SsmRestartCard();
public int SsmGetAccreditIdEx(int nBId);
public int SsmGetBoardModel(int nBId);
public int SsmGetPciSerialNo(int nBId);
public int SsmSetChState(int ch, int nState);
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ PLAY OPERATION @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
public int SsmSetPlayVolume(int ch, int nVolume);
public int SsmSetDtmfStopPlay(int ch, int bDspf);
public int SsmGetDtmfStopPlayFlag(int ch);
public int SsmSetBargeinStopPlay(int ch, int bBispf);
public int SsmGetBargeinStopPlayFlag(int ch);
public int SsmStopPlay(int ch);
public int SsmPlayFile(int ch,
String pszFileName,
int nFormat,
int dwStartPos,
int dwLen);
public int SsmStopPlayFile(int ch);
public int SsmPausePlay(int ch);
public int SsmRestartPlay(int ch);
public int SsmFastFwdPlay(int ch);
public int SsmFastBwdPlay(int ch);
public int SsmSetPlayTime(int ch, int dwTime);
public int SsmGetPlayedTimeEx(int ch);
public int SsmGetPlayingFileInfo(int ch, int pnFormat, int pnTotalTime);
public int SsmSetPlayPrct(int ch, int dwPercentage);
public int SsmGetPlayedTime(int ch);
public int SsmGetPlayedPercentage(int ch);
public int SsmGetDataBytesToPlay(int ch);
public int SsmCheckPlay(int ch);
public int SsmGetPlayType(int ch);
public int SsmPlayIndexString(int ch, String pszIdxStr);
public int SsmPlayIndexList(int ch, int wIdxListLen, int pwIdxList);
public int SsmStopPlayIndex(int ch);
public int SsmClearFileList(int ch);
public int SsmAddToFileList(int ch,
String pszFileName,
int nFormat,
int dwStartPos,
int dwLen);
public int SsmPlayFileList(int ch);
public int SsmStopPlayFileList(int ch);
public int SsmPlayMem(int ch,
int nFormat,
byte pBuf,
int dwBufSize,
int dwStartOffset,
int dwStopOffset);
public int SsmGetPlayOffset(int ch, int pdwPlayOffset);
public int SsmSetStopPlayOffset(int ch, int dwStopPlayOffset);
public int SsmStopPlayMem(int ch);
public int SsmClearPlayMemList();
public int SsmAddToPlayMemList(byte pBuf,
int dwDataLen,
int nFormat);
public int SsmPlayMemList(int ch,
int pMemList,
int wMemListLen);
public int SsmStopPlayMemList(int ch);
public int SsmSetDTMFStopPlayCharSet(int ch, String lpstrDtmfCharSet);
public int SsmGetDTMFStopPlayCharSet(int ch, String lpstrDtmfCharSet);
public int SsmSetHangupStopPlayFlag(int ch, int bHangupStopRecFlag);
////
public int SsmStopPlayMemBlock(int ch);
public int SsmGetDataBytesPlayed(int ch);
public int SsmSetPlayGain(int c