tapipeer.java

来自「tapi的java封装」· Java 代码 · 共 52 行

JAVA
52
字号
/*
*	JTAPI library copyright 1998 by Web4Groups consortium (http://Web4Groups.at)
*/

import java.telephony.*;
import java.telephony.events.*;


public class TAPIPeer implements JtapiPeer {



	public String getName() {
		return "TAPIPeer";
	}


	public Provider getProvider(String name) {
		Class providerClass = null;
		Provider provider = null;

		try {
			providerClass = Class.forName(name);
			provider = (Provider)providerClass.newInstance();
		}

		catch (Exception e) {
			System.out.println("There is no class for provider: " + name);
			e.printStackTrace();
		}

		return provider;
	}


	public String[] getServices() {
		String str[] = new String[6];
		str[0] = "\nServices supported by this implementation:\n\n";
		str[1] = "- present any incoming calls to the application\n";
		str[2] = "- playing of wave files (can be a URL) over the telephone line\n";
		str[3] = "- recording of wave files over the telephone line\n";
		str[4] = "- detect DTMF and pulse tones if the hardware supports it\n";
		str[5] = "- send a file as fax (in various supported formats)\n";
		return str;
	}


}
      


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?