diff options
Diffstat (limited to 'NET/worlds/console/Netscape.java')
| -rw-r--r-- | NET/worlds/console/Netscape.java | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/NET/worlds/console/Netscape.java b/NET/worlds/console/Netscape.java new file mode 100644 index 0000000..3e7cbdd --- /dev/null +++ b/NET/worlds/console/Netscape.java @@ -0,0 +1,55 @@ +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); + } +} |