summaryrefslogtreecommitdiff
path: root/NET/worlds/console/Netscape.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/console/Netscape.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
Diffstat (limited to 'NET/worlds/console/Netscape.java')
-rw-r--r--NET/worlds/console/Netscape.java55
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);
+ }
+}