⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pnpnotify.java

📁 usbio Ver 2.40 source code!!! 做USB开发的值得
💻 JAVA
字号:
package de.thesycon.usbio;

/**
 * Class for register plug and play notifications for a guid.
 */
public class PnPNotify implements PnPNotifyInterface, UsbIoErrorCodes
{
	private PnPNotifyInterface interf;

	/**
	 * Disable plug and play notifications for a guid.
	 */
	public native int disablePnPNotification(String guid);

	private native int enablePnPNotification(String guid, PnPNotifyInterface Interface);

	// load dll

	static {
		System.loadLibrary("USBIOJAVA");
	}

	/**
	 * Standard constructor of the PnPNotify class.
	 */
	public PnPNotify () {
		interf = null;
	}

	/**
	 * Constructor of the PnPNotify class.
	 *
	 * @param Interface Reference to a PnPNotifyInterface object.
	 */
	public PnPNotify (PnPNotifyInterface Interface) {
		interf = Interface;
	}

	/**
	 * Enable plug and play notifications for a guid.
	 */
	public int enablePnPNotification(String guid) {
		if (guid == null) {
			return USBIO_ERR_FAILED;
		}
		if (interf == null) {
			return enablePnPNotification(guid,this);
		} else {
			return enablePnPNotification(guid,interf);
		}
	}

	/**
	 * Called if a device is added.
	 */
	public void onAdd() {
	}

	/**
	 * Called if a device is removed
	 */
	public void onRemove() {
	}
}

⌨️ 快捷键说明

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