package NET.worlds.console; import java.io.IOException; public class Netscape implements MainCallback, MainTerminalCallback { private INetscapeRegistry _registry = null; private NSProtocolHandler _protocolHandler = null; public Netscape() { Main.register(this); } @Override public void mainCallback() { Main.unregister(this); try { this._registry = new INetscapeRegistry(); if ((ActiveX.getDebugLevel() & 16) > 0) { System.out.println("OLEDEBUG: Netscape OLE found"); } this._protocolHandler = new NSProtocolHandler(); this._protocolHandler.activate(); if ((ActiveX.getDebugLevel() & 16) > 0) { System.out.println("OLEDEBUG: NSProtocolHandler started"); } this._protocolHandler.register(); boolean reg = this._registry.RegisterProtocol("world", "Gamma.Protocol.1"); if ((ActiveX.getDebugLevel() & 16) > 0) { System.out.println("OLEDEBUG: world: registered with Netscape"); } } catch (IOException var10) { if ((ActiveX.getDebugLevel() & 16) > 0) { System.out.println("OLEDEBUG: No Netscape: " + var10.getMessage()); } } finally { if (this._registry != null) { try { this._registry.Release(); } catch (OLEInvalidObjectException var9) { var9.printStackTrace(System.out); } this._registry = null; } } } @Override public void terminalCallback() { Main.unregister(this); } }