From 61fd25fa51d82ed583616b6a5531a9795461db8f Mon Sep 17 00:00:00 2001 From: Bottersnike Date: Tue, 28 Dec 2021 22:29:33 +0000 Subject: [PATCH] Syntax highlight! --- docs.py | 116 ++++--- styles.css | 22 +- tango.css | 77 +++++ templates/base.html | 1 + templates/pages/cardid.html | 123 ++++---- templates/pages/index.html | 3 - templates/pages/packet.html | 52 ++-- templates/pages/proto/apsmanager.html | 12 +- templates/pages/proto/cardmng.html | 114 +++---- templates/pages/proto/dlstatus.html | 44 +-- templates/pages/proto/eacoin.html | 272 ++++++++--------- templates/pages/proto/esign.html | 16 +- templates/pages/proto/esoc.html | 36 +-- templates/pages/proto/eventlog.html | 48 +-- templates/pages/proto/facility.html | 118 ++++---- templates/pages/proto/game/sv4.html | 416 +++++++++++++------------- templates/pages/proto/matching.html | 136 ++++----- templates/pages/proto/message.html | 16 +- templates/pages/proto/package.html | 28 +- templates/pages/proto/pcbevent.html | 28 +- templates/pages/proto/pcbtracker.html | 12 +- templates/pages/proto/playerdata.html | 228 +++++++------- templates/pages/proto/services.html | 24 +- templates/pages/proto/sidmgr.html | 102 +++---- templates/pages/proto/system.html | 174 +++++------ templates/pages/proto/traceroute.html | 24 +- templates/pages/proto/userdata.html | 32 +- templates/pages/protocol.html | 164 +--------- xml_lexer.py | 86 ++++++ 29 files changed, 1304 insertions(+), 1220 deletions(-) create mode 100644 tango.css create mode 100644 xml_lexer.py diff --git a/docs.py b/docs.py index ac5e584..88be5df 100644 --- a/docs.py +++ b/docs.py @@ -1,32 +1,73 @@ from flask import Flask, send_from_directory, render_template from livereload import Server +import xml_lexer + +import re import os + app = Flask(__name__) +app.jinja_options.setdefault('extensions', []).append('jinja2_highlight.HighlightExtension') + + +TEMPLATES = "templates" +PAGES_BASE = "pages" +STATIC = ["images"] + +ROOT = os.environ.get("EA_ROOT", "") + + + +def generate_xrpc_list(): + output = "" + @app.route("/styles.css") def styles(): return send_from_directory(".", "styles.css") +@app.route("/tango.css") +def tango(): + return send_from_directory(".", "tango.css") -for base, folders, files in os.walk("images"): - for name in files: - def handler(base, name): - def handler(): - return send_from_directory(base, name) - return handler - local_base = base.replace("\\", "/").strip(".").strip("/") - route = local_base + "/" + name - if not route.startswith("/"): - route = "/" + route +for i in STATIC: + for base, _, files in os.walk(i): + for name in files: + def handler(base, name): + def handler(): + return send_from_directory(base, name) + return handler + local_base = base.replace("\\", "/").strip(".").strip("/") + route = local_base + "/" + name + if not route.startswith("/"): + route = "/" + route - handler = handler(base, name) - handler.__name__ == route - app.add_url_rule(route, route, handler) + handler = handler(base, name) + handler.__name__ == route + app.add_url_rule(route, route, handler) -TEMPLATES = "templates" -PAGES_BASE = "pages" -for base, folders, files in os.walk(TEMPLATES + "/" + PAGES_BASE): + +for base, _, files in os.walk(TEMPLATES + "/" + PAGES_BASE): if ".git" in base: continue if base.startswith(TEMPLATES): @@ -36,7 +77,11 @@ for base, folders, files in os.walk(TEMPLATES + "/" + PAGES_BASE): if name.endswith(".html"): def handler(base, name): def handler(): - return render_template(os.path.join(base, name).strip("/").replace("\\", "/"), ROOT=os.environ.get("EA_ROOT")) + return render_template( + os.path.join(base, name).strip("/").replace("\\", "/"), + ROOT=ROOT, + generate_xrpc_list=generate_xrpc_list + ) return handler local_base = base.replace("\\", "/").strip(".").strip("/") @@ -54,26 +99,27 @@ for base, folders, files in os.walk(TEMPLATES + "/" + PAGES_BASE): app.add_url_rule(route, route, handler) -from flask import url_for -def has_no_empty_params(rule): - defaults = rule.defaults if rule.defaults is not None else () - arguments = rule.arguments if rule.arguments is not None else () - return len(defaults) >= len(arguments) -@app.route("/site-map") -def site_map(): - links = [] - for rule in app.url_map.iter_rules(): - # Filter out rules we can't navigate to in a browser - # and rules that require parameters - if "GET" in rule.methods and has_no_empty_params(rule): - url = url_for(rule.endpoint, **(rule.defaults or {})) - links.append((url, rule.endpoint)) - return str(links) +# from flask import url_for +# def has_no_empty_params(rule): +# defaults = rule.defaults if rule.defaults is not None else () +# arguments = rule.arguments if rule.arguments is not None else () +# return len(defaults) >= len(arguments) +# @app.route("/site-map") +# def site_map(): +# links = [] +# for rule in app.url_map.iter_rules(): +# if "GET" in rule.methods and has_no_empty_params(rule): +# url = url_for(rule.endpoint, **(rule.defaults or {})) +# links.append((url, rule.endpoint)) +# return str(links) + if __name__ == '__main__': app.config['TEMPLATES_AUTO_RELOAD'] = True app.config['DEBUG'] = True - server = Server(app.wsgi_app) - server.watch("templates") - server.serve(port=3000) \ No newline at end of file + app.run(debug=True, port=3000, host="0.0.0.0") + + # server = Server(app.wsgi_app) + # server.watch(".") + # server.serve(port=3000) \ No newline at end of file diff --git a/styles.css b/styles.css index 357e06b..0ab7986 100644 --- a/styles.css +++ b/styles.css @@ -14,6 +14,7 @@ table { overflow-x: auto; display: block; } + table.code { font-family: monospace; } @@ -28,9 +29,11 @@ td { padding: 2px; min-width: 32px; } + table:not(.code) td { padding: 2px 6px; } + table.code td { text-align: center; } @@ -54,13 +57,16 @@ code { border-radius: 4px; word-break: break-word; } -td > code { + +td>code { word-break: normal; } -code > a { + +code>a { color: inherit; } -pre > code { + +pre>code, .highlight { display: block; word-break: normal; border-radius: 4px; @@ -72,6 +78,14 @@ pre > code { line-height: 1.4; width: min-content; } + +pre>.highlight { + margin-bottom: -16px; +} +.highlight>pre { + margin: 0; +} + pre { max-width: 100%; overflow-x: auto; @@ -90,4 +104,4 @@ details { margin: 4px 0; overflow-x: auto; max-width: 100%; -} +} \ No newline at end of file diff --git a/tango.css b/tango.css new file mode 100644 index 0000000..b0ec841 --- /dev/null +++ b/tango.css @@ -0,0 +1,77 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8f5902 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #204a87 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ +.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 4fc4436..32a6068 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,7 @@ {% block title %}{% endblock %}{% if self.title() %} | {% endif %}e-Amusement API + diff --git a/templates/pages/cardid.html b/templates/pages/cardid.html index 91781da..c5c1139 100644 --- a/templates/pages/cardid.html +++ b/templates/pages/cardid.html @@ -8,24 +8,25 @@ for. My local implementation is in python, so that's all you're getting :). As a free bonus, have some test cases too. It's not great code by any stretch, and it liberally uses assertions rather than proper exceptions, but it should be a good enough starting point for your own version.

-
import binascii
+    
{% highlight 'python' %}
+import binascii
 from Crypto.Cipher import DES3
 
 
-KEY = b""  # Check the DES section for this
+KEY = b""  # Check the DES section for this
 _KEY = bytes(i * 2 for i in KEY)  # Preprocess the key
 
 ALPHABET = "0123456789ABCDEFGHJKLMNPRSTUWXYZ"
 
 
 def enc_des(uid):
-cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
-return cipher.encrypt(uid)
+    cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
+    return cipher.encrypt(uid)
 
 
 def dec_des(uid):
-cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
-return cipher.decrypt(uid)
+    cipher = DES3.new(_KEY, DES3.MODE_CBC, iv=b'\0' * 8)
+    return cipher.decrypt(uid)
 
 
 def checksum(data):
@@ -38,79 +39,79 @@ return chk
 
 
 def pack_5(data):
-data = "".join(f"{i:05b}" for i in data)
-if len(data) % 8 != 0:
-    data += "0" * (8 - (len(data) % 8))
-return bytes(int(data[i:i+8], 2) for i in range(0, len(data), 8))
+    data = "".join(f"{i:05b}" for i in data)
+    if len(data) % 8 != 0:
+        data += "0" * (8 - (len(data) % 8))
+    return bytes(int(data[i:i+8], 2) for i in range(0, len(data), 8))
 
 
 def unpack_5(data):
-data = "".join(f"{i:08b}" for i in data)
-if len(data) % 5 != 0:
-    data += "0" * (5 - (len(data) % 5))
-return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5))
+    data = "".join(f"{i:08b}" for i in data)
+    if len(data) % 5 != 0:
+        data += "0" * (5 - (len(data) % 5))
+    return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5))
 
 
 def to_konami_id(uid):
-assert len(uid) == 16, "UID must be 16 bytes"
+    assert len(uid) == 16, "UID must be 16 bytes"
 
-if uid.upper().startswith("E004"):
-    card_type = 1
-elif uid.upper().startswith("0"):
-    card_type = 2
-else:
-    raise ValueError("Invalid UID prefix")
+    if uid.upper().startswith("E004"):
+        card_type = 1
+    elif uid.upper().startswith("0"):
+        card_type = 2
+    else:
+        raise ValueError("Invalid UID prefix")
 
-kid = binascii.unhexlify(uid)
-assert len(kid) == 8, "ID must be 8 bytes"
+    kid = binascii.unhexlify(uid)
+    assert len(kid) == 8, "ID must be 8 bytes"
 
-out = bytearray(unpack_5(enc_des(kid[::-1]))[:13]) + b'\0\0\0'
+    out = bytearray(unpack_5(enc_des(kid[::-1]))[:13]) + b'\0\0\0'
 
-out[0] ^= card_type
-out[13] = 1
-for i in range(1, 14):
-    out[i] ^= out[i - 1]
-out[14] = card_type
-out[15] = checksum(out)
+    out[0] ^= card_type
+    out[13] = 1
+    for i in range(1, 14):
+        out[i] ^= out[i - 1]
+    out[14] = card_type
+    out[15] = checksum(out)
 
-return "".join(ALPHABET[i] for i in out)
+    return "".join(ALPHABET[i] for i in out)
 
 
 def to_uid(konami_id):
-if konami_id[14] == "1":
-    card_type = 1
-elif konami_id[14] == "2":
-    card_type = 2
-else:
-    raise ValueError("Invalid ID")
+    if konami_id[14] == "1":
+        card_type = 1
+    elif konami_id[14] == "2":
+        card_type = 2
+    else:
+        raise ValueError("Invalid ID")
 
-assert len(konami_id) == 16, f"ID must be 16 characters"
-assert all(i in ALPHABET for i in konami_id), "ID contains invalid characters"
-card = [ALPHABET.index(i) for i in konami_id]
-assert card[11] % 2 == card[12] % 2, "Parity check failed"
-assert card[13] == card[12] ^ 1, "Card invalid"
-assert card[15] == checksum(card), "Checksum failed"
+    assert len(konami_id) == 16, f"ID must be 16 characters"
+    assert all(i in ALPHABET for i in konami_id), "ID contains invalid characters"
+    card = [ALPHABET.index(i) for i in konami_id]
+    assert card[11] % 2 == card[12] % 2, "Parity check failed"
+    assert card[13] == card[12] ^ 1, "Card invalid"
+    assert card[15] == checksum(card), "Checksum failed"
 
-for i in range(13, 0, -1):
-    card[i] ^= card[i - 1]
+    for i in range(13, 0, -1):
+        card[i] ^= card[i - 1]
 
-card[0] ^= card_type
+    card[0] ^= card_type
 
-card_id = dec_des(pack_5(card[:13])[:8])[::-1]
-card_id = binascii.hexlify(card_id).decode().upper()
+    card_id = dec_des(pack_5(card[:13])[:8])[::-1]
+    card_id = binascii.hexlify(card_id).decode().upper()
 
-if card_type == 1:
-    assert card_id[:4] == "E004", "Invalid card type"
-elif card_type == 2:
-    assert card_id[0] == "0", "Invalid card type"
-return card_id
+    if card_type == 1:
+        assert card_id[:4] == "E004", "Invalid card type"
+    elif card_type == 2:
+        assert card_id[0] == "0", "Invalid card type"
+    return card_id
 
 
 if __name__ == "__main__":
-assert to_konami_id("0000000000000000") == "007TUT8XJNSSPN2P", "To KID failed"
-assert to_uid("007TUT8XJNSSPN2P") == "0000000000000000", "From KID failed"
-assert to_uid(to_konami_id("000000100200F000")) == "000000100200F000", "Roundtrip failed"
-
+ assert to_konami_id("0000000000000000") == "007TUT8XJNSSPN2P", "To KID failed" + assert to_uid("007TUT8XJNSSPN2P") == "0000000000000000", "From KID failed" + assert to_uid(to_konami_id("000000100200F000")) == "000000100200F000", "Roundtrip failed" +{% endhighlight %}

e-Amusement cards use 16 digit IDs. KONAMI IDs are also 16 digits. Are they related? Yes! In fact, KONAMI IDs are derived from the ID stored on the e-Amusement card.

@@ -195,7 +196,7 @@ card[0] ^= card_type In most languages?

Haha well you see we can actually cheat and use string manipulation. Wasteful? Incredibly. Efficient? Not at all. Quick and easy? Yup!

-
def pack_5(data):
+        
{% highlight "python" %}def pack_5(data):
     data = "".join(f"{i:05b}" for i in data)
     if len(data) % 8 != 0:
         data += "0" * (8 - (len(data) % 8))
@@ -205,7 +206,7 @@ def unpack_5(data):
     data = "".join(f"{i:08b}" for i in data)
     if len(data) % 5 != 0:
         data += "0" * (5 - (len(data) % 5))
-    return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5))
+ return bytes(int(data[i:i+5], 2) for i in range(0, len(data), 5)){% endhighlight %}

If your language of choice allows this, and you don't care for efficiency, this can be a great time-saver towards get something working. Truth be told my local implementation originally used the Bemani method (it was a line-for-line port, after all), switched to the second method, then I opted for this hacky @@ -272,7 +273,7 @@ card[15] = checksum(card) Either way, my python port didn't do any cleaning up, because we can just use a DES library.

Show me that! -
DES_KEYMAP = [
+        
{% highlight "python" %}DES_KEYMAP = [
     [0x02080008, 0x02082000, 0x00002008, 0x00000000, 0x02002000, 0x00080008, 0x02080000, 0x02082008, 0x00000008, 0x02000000, 0x00082000, 0x00002008, 0x00082008, 0x02002008, 0x02000008, 0x02080000, 0x00002000, 0x00082008, 0x00080008, 0x02002000, 0x02082008, 0x02000008, 0x00000000, 0x00082000, 0x02000000, 0x00080000, 0x02002008, 0x02080008, 0x00080000, 0x00002000, 0x02082000, 0x00000008, 0x00080000, 0x00002000, 0x02000008, 0x02082008, 0x00002008, 0x02000000, 0x00000000, 0x00082000, 0x02080008, 0x02002008, 0x02002000, 0x00080008, 0x02082000, 0x00000008, 0x00080008, 0x02002000, 0x02082008, 0x00080000, 0x02080000, 0x02000008, 0x00082000, 0x00002008, 0x02002008, 0x02080000, 0x00000008, 0x02082000, 0x00082008, 0x00000000, 0x02000000, 0x02080008, 0x00002000, 0x00082008],
     [0x08000004, 0x00020004, 0x00000000, 0x08020200, 0x00020004, 0x00000200, 0x08000204, 0x00020000, 0x00000204, 0x08020204, 0x00020200, 0x08000000, 0x08000200, 0x08000004, 0x08020000, 0x00020204, 0x00020000, 0x08000204, 0x08020004, 0x00000000, 0x00000200, 0x00000004, 0x08020200, 0x08020004, 0x08020204, 0x08020000, 0x08000000, 0x00000204, 0x00000004, 0x00020200, 0x00020204, 0x08000200, 0x00000204, 0x08000000, 0x08000200, 0x00020204, 0x08020200, 0x00020004, 0x00000000, 0x08000200, 0x08000000, 0x00000200, 0x08020004, 0x00020000, 0x00020004, 0x08020204, 0x00020200, 0x00000004, 0x08020204, 0x00020200, 0x00020000, 0x08000204, 0x08000004, 0x08020000, 0x00020204, 0x00000000, 0x00000200, 0x08000004, 0x08000204, 0x08020200, 0x08020000, 0x00000204, 0x00000004, 0x08020004],
     [0x80040100, 0x01000100, 0x80000000, 0x81040100, 0x00000000, 0x01040000, 0x81000100, 0x80040000, 0x01040100, 0x81000000, 0x01000000, 0x80000100, 0x81000000, 0x80040100, 0x00040000, 0x01000000, 0x81040000, 0x00040100, 0x00000100, 0x80000000, 0x00040100, 0x81000100, 0x01040000, 0x00000100, 0x80000100, 0x00000000, 0x80040000, 0x01040100, 0x01000100, 0x81040000, 0x81040100, 0x00040000, 0x81040000, 0x80000100, 0x00040000, 0x81000000, 0x00040100, 0x01000100, 0x80000000, 0x01040000, 0x81000100, 0x00000000, 0x00000100, 0x80040000, 0x00000000, 0x81040000, 0x01040100, 0x00000100, 0x01000000, 0x81040100, 0x80040100, 0x00040000, 0x81040100, 0x80000000, 0x01000100, 0x80040100, 0x80040000, 0x00040100, 0x01040000, 0x81000100, 0x80000100, 0x01000000, 0x81000000, 0x01040100],
@@ -461,7 +462,7 @@ def load_key(key):
     key_data = bytearray(24)
     for i in range(24):
         key_data[i] = 2 * key[i % len(key)]
-    des3_setkey(KEY_DATA, key_data)
+ des3_setkey(KEY_DATA, key_data){% endhighlight %}
{% endblock %} \ No newline at end of file diff --git a/templates/pages/index.html b/templates/pages/index.html index a98cc9e..e2e1210 100644 --- a/templates/pages/index.html +++ b/templates/pages/index.html @@ -78,7 +78,4 @@

Next page - -

This site intentionally looks not-great. I don't feel like changing that, and honestly quite like the - aesthetic.

{% endblock %} \ No newline at end of file diff --git a/templates/pages/packet.html b/templates/pages/packet.html index 051cbc9..bc77e27 100644 --- a/templates/pages/packet.html +++ b/templates/pages/packet.html @@ -2,8 +2,8 @@ {% block body %}

Packet format

-

eAmuse uses XML for its application layer payloads*. This XML is either verbatim, or in a custom packed binary - format.
*Newer games use JSON, but this page is about XML.

+

e-Amusement uses XML for its application layer payloads. This XML is either verbatim, or in a custom packed binary + format.

The XML format

@@ -12,28 +12,32 @@ have a __count attribute indicating how many items are in the array. Binary blobs additionally have a __size attribute indicating their length (this is notably not present on strings, however).

It is perhaps simpler to illustrate with an example, so:

-
<?xml version='1.0' encoding='UTF-8'?>
-<call model="KFC:J:A:A:2019020600" srcid="1000" tag="b0312077">
-    <eventlog method="write">
-        <retrycnt __type="u32" />
-        <data>
-            <eventid __type="str">G_CARDED</eventid>
-            <eventorder __type="s32">5</eventorder>
-            <pcbtime __type="u64">1639669516779</pcbtime>
-            <gamesession __type="s64">1</gamesession>
-            <strdata1 __type="str" />
-            <strdata2 __type="str" />
-            <numdata1 __type="s64">1</numdata1>
-            <numdata2 __type="s64" />
-            <locationid __type="str">ea</locationid>
-        </data>
-    </eventlog>
-</call>
+
{% highlight 'xml' %}
+
+
+    
+        
+        
+            G_CARDED
+            5
+            1639669516779
+            1
+            
+            
+            1
+            
+            ea
+        
+    
+
+{% endhighlight %}

Arrays are encoded by concatenating every value together, with spaces between them. Data types that have multiple values, are serialized similarly.

Therefore, an element storing an array of 3u8 ([(1, 2, 3), (4, 5, 6)]) would look like this

-
<demo __type="3u8" __count="2">1 2 3 4 5 6</demo>
+
{% highlight 'xml' %}
+1 2 3 4 5 6
+{% endhighlight %}

Besides this, this is otherwise a rather standard XML.

Packed binary overview

@@ -182,9 +186,9 @@

This is indexed using the following function, which maps the above encoding IDs to 1, 2, 3, 4 and 5 respectively.

-
char* xml_get_encoding_name(uint encoding_id) {
+    
{% highlight "c" %}char* xml_get_encoding_name(uint encoding_id) {
     return ENCODING_NAME_TABLE[((encoding_id & 0xe0) >> 5) * 4];
-}
+}{% endhighlight %}

While validating ~E isn't technically required, it acts as a useful assertion that the packet being parsed is valid.

@@ -839,7 +843,7 @@

While the intuitive way to understand the packing algorithm is via chunks and buckets, a far more efficient implementation can be made that uses three pointers. Rather than try to explain in words, hopefully this python implementation should suffice as explanation: -

class Packer:
+    
{% highlight "python" %}class Packer:
     def __init__(self, offset=0):
         self._word_cursor = offset
         self._short_cursor = offset
@@ -873,7 +877,7 @@
 
     def notify_skipped(self, no_bytes):
         for _ in range(math.ceil(no_bytes / 4)):
-            self.request_allocation(4)
+ self.request_allocation(4){% endhighlight %}

diff --git a/templates/pages/proto/apsmanager.html b/templates/pages/proto/apsmanager.html index b753aba..f0f08f0 100644 --- a/templates/pages/proto/apsmanager.html +++ b/templates/pages/proto/apsmanager.html @@ -3,11 +3,11 @@

apsmanager

apsmanager.getstat

Request:

-
<call ...>
-    <apsmanager method="getstat" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <apsmanager status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}
{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/cardmng.html b/templates/pages/proto/cardmng.html index ea7af74..59a336b 100644 --- a/templates/pages/proto/cardmng.html +++ b/templates/pages/proto/cardmng.html @@ -46,9 +46,9 @@

Request information about a card that has been inserted or touched against a reader.

Request:

-
<call ...>
-    <cardmng method="inquire" cardid="" cardtype="" update="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}
@@ -56,9 +56,9 @@
update

Response:

-
<response>
-    <cardmng status="status" refid="" dataid="" pcode=""  newflag="" binded="" expired=" ecflag="" useridflag="" extidflag="" lastupdate="" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

To handle this request, we first must lookup if this cardid has ever been seen by our servers before. If not, we abort with a 112 status. Otherwise, we proceeed to check if this card has been seen for this specific game. If we have never seen this card used on this game, it is possible this card was @@ -92,9 +92,9 @@

cardmng.getrefid

Register a new card to this server.

Request:

-
<call ...>
-    <cardmng method="getrefid" cardtype="" cardid=" newflag="" passwd="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}
@@ -107,9 +107,9 @@
newflag

Response:

-
<response>
-    <cardmng status="status" refid="" dataid="" pcode="" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}
@@ -128,32 +128,32 @@

cardmng.bindmodel

Request:

-
<call ...>
-    <cardmng method="bindmodel" refid="" newflag="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <cardmng status="status" dataid="" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

cardmng.bindcard

Request:

-
<call ...>
-    <cardmng method="bindcard" cardtype="" newid="" refid="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <cardmng status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

cardmng.authpass

Test a pin for a card. This request notably uses the refid, so required a cardmng.inquire call to be made first.

Request:

-
<call ...>
-    <cardmng method="authpass" refid="" pass="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}
refid
@@ -166,47 +166,47 @@
refid

Response:

-
<response>
-    <cardmng status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

If the pin is valid, status should be 0. Otherwise, 116.

cardmng.getkeepspan

Request:

-
<call ...>
-    <cardmng method="getkeepspan" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <cardmng status="status" keepspan="" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

cardmng.getkeepremain

Request:

-
<call ...>
-    <cardmng method="getkeepremain" refid="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <cardmng status="status" keepremain="" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

cardmng.getdatalist

Request:

-
<call ...>
-    <cardmng method="getdatalist" refid="" model*="" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <cardmng status="status">
-        <item[]>
-            <mcode __type="str" />
-            <dataid __type="str" />
-            <regtime __type="str" />
-            <lasttime __type="str" />
-            <exptime __type="str" />
-            <expflag __type="u8" />
-        </item[]>
-    </cardmng>
-</response>
+
{% highlight "cxml" %}
+    
+        
+            
+            
+            
+            
+            
+            
+        
+    
+{% endhighlight %}
{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/dlstatus.html b/templates/pages/proto/dlstatus.html index 9ea8144..806d383 100644 --- a/templates/pages/proto/dlstatus.html +++ b/templates/pages/proto/dlstatus.html @@ -3,32 +3,32 @@

dlstatus

dlstatus.done

Request:

-
<call ...>
-    <dlstatus method="done">
-        <url>
-            <param __type="str" />
-        </url>
-        <name __type="str" />
-        <size __type="s32" />
-    </dlstatus>
-</call>
+
{% highlight "cxml" %}
+    
+        
+            
+        
+        
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <dlstatus status="status">
-        <progress __type="s32" />
-    </dlstatus>
-</response>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

dlstatus.progress

Request:

-
<call ...>
-    <dlstatus method="progress" />
-        <progress __type="s32" />
-    </dlstatus>
-</call>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <dlstatus status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}
{% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/eacoin.html b/templates/pages/proto/eacoin.html index ac90e1d..d978c02 100644 --- a/templates/pages/proto/eacoin.html +++ b/templates/pages/proto/eacoin.html @@ -3,178 +3,178 @@

eacoin

eacoin.checkin

Request:

-
<call ...>
-    <eacoin method="checkin">
-        <cardtype __type="str" />
-        <cardid __type="str" />
-        <passwd __type="str" />
-        <ectype __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+        
+        
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status">
-        <sequence __type="s16" />
-        <acstatus __type="u8" />
-        <acid __type="str" />
-        <acname __type="str" />
-        <balance __type="s32" />
-        <sessid __type="str" />
-    </eacoin>
-</response>
+
{% highlight "cxml" %}
+    
+        
+        
+        
+        
+        
+        
+    
+{% endhighlight %}

eacoin.checkout

Request:

-
<call ...>
-    <eacoin method="checkout">
-        <sessid __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

eacoin.consume

Request:

-
<call ...>
-    <eacoin method="consume" esid="">
-        <sessid __type="str" />
-        <sequence __type="s16" />
-        <payment __type="s32" />
-        <service __type="s16" />
-        <itemtype __type="str" />
-        <detail __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+        
+        
+        
+        
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status">
-        <acstatus __type="u8" />
-        <autocharge __type="u8" />
-        <balance __type="s32" />
-    </eacoin>
-</response>
+
{% highlight "cxml" %}
+    
+        
+        
+        
+    
+{% endhighlight %}

eacoin.getbalance

Request:

-
<call ...>
-    <eacoin method="getbalance">
-      <sessid __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+      
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status">
-        <acstatus __type="u8" />
-        <balance __type="s32" />
-    </eacoin>
-</response>
+
{% highlight "cxml" %}
+    
+        
+        
+    
+{% endhighlight %}

eacoin.getecstatus

Request:

-
<call ...>
-    <eacoin method="getecstatus" />
-</call>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status">
-        <ectype __type="str" />
-        <ecstatus __type="u8" />
-    </eacoin>
-</response>
+
{% highlight "cxml" %}
+    
+        
+        
+    
+{% endhighlight %}

eacoin.touch

Request:

-
<call ...>
-    <eacoin method="touch">
-        <sessid __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

eacoin.opchpass

Request:

-
<call ...>
-    <eacoin method="opchpass">
-        <passwd __type="str" />
-        <newpasswd __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

eacoin.opcheckin

Request:

-
<call ...>
-    <eacoin method="opcheckin">
-        <passwd __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status">
-        <sessid __type="str" />
-    </eacoin>
-</response>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

eacoin.opcheckout

Request:

-
<call ...>
-    <eacoin method="opcheckout">
-        <sessid __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status" />
-</response>
+
{% highlight "cxml" %}
+    
+{% endhighlight %}

eacoin.getlog

Request:

-
<call ...>
-    <eacoin method="getlog">
-        <sessid __type="str" />
-        <logtype __type="str" />
-        <ectype __type="str" />
-        <target __type="str" />
-        <perpage __type="s16" />
-        <page __type="s16" />
-        <sesstype __type="str" />
-    </eacoin>
-</call>
+
{% highlight "cxml" %}
+    
+        
+        
+        
+        
+        
+        
+        
+    
+{% endhighlight %}

Response:

-
<response>
-    <eacoin status="status">
-        <processing __type="u8" />
-        <topic>
-            <sumdate __type="str" />
-            <sumfrom __type="str" />
-            <sumto __type="str" />
+
{% highlight "cxml" %}
+    
+        
+        
+            
+            
+            
 
-            <today __type="s32" />
-            <average __type="s32" />
-            <total __type="s32" />
-        </topic>
-        <summary>
-            <items __type="s32" />
-        </summary>
-        <history>
-            <item[]>
-                <date __type="str" />
-                <consume __type="s32" />
-                <service __type="s32" />
-                <cardtype __type="str" />
-                <cardno __type="str" />
-                <title __type="str" />
-                <systemid __type="str" />
-            </item[]>
-        </history>
-    </eacoin>
-</response>
+ + + + + + + + + + + + + + + + <systemid __type="str" /> + </item[]> + </history> + </eacoin> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/esign.html b/templates/pages/proto/esign.html index 88d2b03..6fa0910 100644 --- a/templates/pages/proto/esign.html +++ b/templates/pages/proto/esign.html @@ -3,15 +3,15 @@ <h1><code>esign</code></h1> <h2 id="request"><code>esign.request</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <esign method="request"> +<pre>{% highlight "cxml" %}<call ...> + <esign method="request"> <i>placeholder</i> - </esign> -</call></code></pre> + </esign> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <esign status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <esign status="??status"> <i>placeholder</i> - </esign> -</response></code></pre> + </esign> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/esoc.html b/templates/pages/proto/esoc.html index e38cc9c..9887f91 100644 --- a/templates/pages/proto/esoc.html +++ b/templates/pages/proto/esoc.html @@ -3,28 +3,28 @@ <h1><code>esoc</code></h1> <h2 id="read"><code>esoc.read</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <esoc method="read"> - <senddata /> - </esoc> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <esoc method="read"> + <senddata /> + </esoc> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <esoc status="<i>status</i>"> - <recvdata /> - </esoc> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <esoc status="??status"> + <recvdata /> + </esoc> +</response>{% endhighlight %}</pre> <p>Go figure.</p> <h2 id="write"><code>esoc.write</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <esoc method="write"> - <senddata /> - </esoc> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <esoc method="write"> + <senddata /> + </esoc> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <esoc status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <esoc status="??status" /> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/eventlog.html b/templates/pages/proto/eventlog.html index 2c67e21..bba7daa 100644 --- a/templates/pages/proto/eventlog.html +++ b/templates/pages/proto/eventlog.html @@ -3,22 +3,22 @@ <h1><code>eventlog</code></h1> <h2 id="write"><code>eventlog.write</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <eventlog method="write"> - <retrycnt __type="u32" /> - <data> - <eventid __type="str" /> - <eventorder __type="s32" /> - <pcbtime __type="u64" /> - <gamesession __type="s64" /> - <strdata1 __type="str" /> - <strdata2 __type="str" /> - <numdata1 __type="s64" /> - <numdata2 __type="s64" /> - <locationid __type="str" /> - </data> - </eventlog> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <eventlog method="write"> + <retrycnt __type="u32" /> + <data> + <eventid __type="str" /> + <eventorder __type="s32" /> + <pcbtime __type="u64" /> + <gamesession __type="s64" /> + <strdata1 __type="str" /> + <strdata2 __type="str" /> + <numdata1 __type="s64" /> + <numdata2 __type="s64" /> + <locationid __type="str" /> + </data> + </eventlog> +</call>{% endhighlight %}</pre> <p>Event ID list:</p> <ul> <li><code>G_GAMED</code></li> @@ -27,12 +27,12 @@ <li><code>T_OTDEMO</code></li> </ul> <h3>Response:</h3> -<pre><code><response> - <eventlog status="<i>status</i>"> - <gamesession __type="s64" /> - <logsendflg __type="s32" /> - <logerrlevel __type="s32" /> - <evtidnosendflg __type="s32" /> - </eventlog> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <eventlog status="??status"> + <gamesession __type="s64" /> + <logsendflg __type="s32" /> + <logerrlevel __type="s32" /> + <evtidnosendflg __type="s32" /> + </eventlog> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/facility.html b/templates/pages/proto/facility.html index 6536380..36b674b 100644 --- a/templates/pages/proto/facility.html +++ b/templates/pages/proto/facility.html @@ -3,66 +3,66 @@ <h1><code>facility</code></h1> <h2 id="get"><code>facility.get</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <facility method="get" privateip*="" encoding*="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <facility method="get" privateip*="" encoding*="" /> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <facility expire=""\ status="<i>status</i>"> - <calendar*> - <year __type="s16" /> - <holiday __type="s16" /> - </calendar> - <location> - <id __type="str" /> - <country __type="str" /> - <region __type="str" /> - <name __type="str" /> - <type __type="u8" /> - <countryname __type="str" /> - <countryjname __type="str" /> - <regionname __type="str" /> - <regionjname __type="str" /> - <customercode __type="str" /> - <companycode __type="str" /> - <latitude __type="s32" /> - <longitude __type="s32" /> - <accuracy __type="u8" /> - </location> - <line> - <id __type="str" /> - <class __type="u8" /> - </line> - <portfw> - <globalip __type="ip4" /> - <globalport __type="s16" /> - <privateport __type="s16" /> - </portfw> - <public> - <flag __type="u8" />1</ flag> - <name __type="str" /> - <latitude __type="str">0<latitude> - <longitude __type="str">0<longitude> - </public> - <share> - <eapass*> - <valid __type="?" /> - </eapass> - <eacoin> - <notchamount __type="s32" /> - <notchcount __type="s32" /> - <supplylimit __type="s32">100000<supplylimit> - </eacoin> - <url> - <eapass __type="str">www.ea-pass.konami.net<eapass> - <arcadefan __type="str">www.konami.jp/am<arcadefan> - <konaminetdx __type="str">http://am.573.jp<konaminetdx> - <konamiid __type="str">http://id.konami.jp<konamiid> - <eagate __type="str">http://eagate.573.jp<eagate> - </url> - </share> - </facility> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <facility expire="" status="??status"> + <calendar*> + <year __type="s16" /> + <holiday __type="s16" /> + </calendar> + <location> + <id __type="str" /> + <country __type="str" /> + <region __type="str" /> + <name __type="str" /> + <type __type="u8" /> + <countryname __type="str" /> + <countryjname __type="str" /> + <regionname __type="str" /> + <regionjname __type="str" /> + <customercode __type="str" /> + <companycode __type="str" /> + <latitude __type="s32" /> + <longitude __type="s32" /> + <accuracy __type="u8" /> + </location> + <line> + <id __type="str" /> + <class __type="u8" /> + </line> + <portfw> + <globalip __type="ip4" /> + <globalport __type="s16" /> + <privateport __type="s16" /> + </portfw> + <public> + <flag __type="u8" />1</ flag> + <name __type="str" /> + <latitude __type="str">0<latitude> + <longitude __type="str">0<longitude> + </public> + <share> + <eapass*> + <valid __type="?" /> + </eapass> + <eacoin> + <notchamount __type="s32" /> + <notchcount __type="s32" /> + <supplylimit __type="s32">100000<supplylimit> + </eacoin> + <url> + <eapass __type="str">www.ea-pass.konami.net<eapass> + <arcadefan __type="str">www.konami.jp/am<arcadefan> + <konaminetdx __type="str">http://am.573.jp<konaminetdx> + <konamiid __type="str">http://id.konami.jp<konamiid> + <eagate __type="str">http://eagate.573.jp<eagate> + </url> + </share> + </facility> +</response>{% endhighlight %}</pre> <p><i>I'm not totally sure what type <code>share/eapass/valid</code> is meant to be, but it's optional, so I'd suggest just not bothering and leaving it out :).</i></p> <table> diff --git a/templates/pages/proto/game/sv4.html b/templates/pages/proto/game/sv4.html index 6e2928c..1084bcf 100644 --- a/templates/pages/proto/game/sv4.html +++ b/templates/pages/proto/game/sv4.html @@ -3,365 +3,365 @@ <h1 id="game"><code>game</code></h1> <h2 id="sample"><code>game.sv4_sample</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_sample"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_sample"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="new"><code>game.sv4_new</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_new"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_new"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="load"><code>game.sv4_load</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_load"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_load"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="load_m"><code>game.sv4_load_m</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_load_m"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_load_m"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save"><code>game.sv4_save</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save_m"><code>game.sv4_save_m</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save_m"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save_m"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="common"><code>game.sv4_common</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_common"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_common"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="shop"><code>game.sv4_shop</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_shop"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_shop"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="hiscore"><code>game.sv4_hiscore</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_hiscore"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_hiscore"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="buy"><code>game.sv4_buy</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_buy"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_buy"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="exception"><code>game.sv4_exception</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_exception"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_exception"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="entry_s"><code>game.sv4_entry_s</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_entry_s"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_entry_s"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="entry_e"><code>game.sv4_entry_e</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_entry_e"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_entry_e"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="frozen"><code>game.sv4_frozen</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_frozen"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_frozen"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="lounge"><code>game.sv4_lounge</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_lounge"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_lounge"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save_e"><code>game.sv4_save_e</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save_e"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save_e"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save_pb"><code>game.sv4_save_pb</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save_pb"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save_pb"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save_c"><code>game.sv4_save_c</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save_c"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save_c"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="play_s"><code>game.sv4_play_s</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_play_s"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_play_s"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="play_e"><code>game.sv4_play_e</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_play_e"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_play_e"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="serial"><code>game.sv4_serial</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_serial"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_serial"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save_fi"><code>game.sv4_save_fi</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save_fi"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save_fi"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="print"><code>game.sv4_print</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_print"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_print"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="print_h"><code>game.sv4_print_h</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_print_h"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_print_h"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="load_r"><code>game.sv4_load_r</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_load_r"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_load_r"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> <h2 id="save_campaign"><code>game.sv4_save_campaign</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <game method="sv4_save_campaign"> +<pre>{% highlight "cxml" %}<call ...> + <game method="sv4_save_campaign"> <i>placeholder</i> - </game> -</call></code></pre> + </game> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <game status="<i>status</i>"> +<pre>{% highlight "cxml" %}<response> + <game status="??status"> <i>placeholder</i> - </game> -</response></code></pre> + </game> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/matching.html b/templates/pages/proto/matching.html index e185c2f..5d11743 100644 --- a/templates/pages/proto/matching.html +++ b/templates/pages/proto/matching.html @@ -3,81 +3,81 @@ <h1><code>matching</code></h1> <h2 id="request"><code>matching.request</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <matching method="request"> - <info> - <version __type="s32" /> - </info> - <data> - <matchtyp __type="s32" /> - <matchgrp __type="s32" /> - <matchflg __type="s32" /> - <waituser __type="s32" /> - <waittime __type="s32" /> - <joinip __type="str" /> - <localip __type="str" /> - <localport __type="s32" /> - <dataid __type="str" /> - <gamekind __type="str" /> - <locationid __type="str" /> - <lineid __type="str" /> - <locationcountry __type="str" /> - <locationregion __type="str" /> - </data> - </matching> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <matching method="request"> + <info> + <version __type="s32" /> + </info> + <data> + <matchtyp __type="s32" /> + <matchgrp __type="s32" /> + <matchflg __type="s32" /> + <waituser __type="s32" /> + <waittime __type="s32" /> + <joinip __type="str" /> + <localip __type="str" /> + <localport __type="s32" /> + <dataid __type="str" /> + <gamekind __type="str" /> + <locationid __type="str" /> + <lineid __type="str" /> + <locationcountry __type="str" /> + <locationregion __type="str" /> + </data> + </matching> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <matching status="<i>status</i>"> - <hostid __type="s64" /> - <result __type="s32" /> - <hostip_g __type="str" /> - <hostip_l __type="str" /> - <hostport_l __type="s32" /> - <hostport_g __type="s32" /> - </matching> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <matching status="??status"> + <hostid __type="s64" /> + <result __type="s32" /> + <hostip_g __type="str" /> + <hostip_l __type="str" /> + <hostport_l __type="s32" /> + <hostport_g __type="s32" /> + </matching> +</response>{% endhighlight %}</pre> <h2 id="wait"><code>matching.wait</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <matching method="wait"> - <info> - <version __type="s32" /> - </info> - <data> - <hostid __type="s64" /> - <locationid __type="str" /> - <lineid __type="str" /> - </data> - </matching> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <matching method="wait"> + <info> + <version __type="s32" /> + </info> + <data> + <hostid __type="s64" /> + <locationid __type="str" /> + <lineid __type="str" /> + </data> + </matching> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <matching status="<i>status</i>"> - <result __type="s32" /> - <prwtime __type="s32" /> - </matching> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <matching status="??status"> + <result __type="s32" /> + <prwtime __type="s32" /> + </matching> +</response>{% endhighlight %}</pre> <h2 id="finish"><code>matching.finish</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <matching method="finish"> - <info> - <version __type="s32" /> - </info> - <data> - <hostid __type="s64" /> - <locationid __type="str" /> - <lineid __type="str" /> - </data> - </matching> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <matching method="finish"> + <info> + <version __type="s32" /> + </info> + <data> + <hostid __type="s64" /> + <locationid __type="str" /> + <lineid __type="str" /> + </data> + </matching> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <matching status="<i>status</i>"> - <result __type="s32" /> - </matching> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <matching status="??status"> + <result __type="s32" /> + </matching> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/message.html b/templates/pages/proto/message.html index c2ae346..b966dde 100644 --- a/templates/pages/proto/message.html +++ b/templates/pages/proto/message.html @@ -3,13 +3,13 @@ <h1><code>message</code></h1> <h2 id="get"><code>message.get</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <message method="get" model*="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <message method="get" model*="" /> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <message expire="" status="<i>status</i>"> - <item[] name="" start="" end="" data="" /> - </message> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <message expire="" status="??status"> + <item[] name="" start="" end="" data="" /> + </message> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/package.html b/templates/pages/proto/package.html index bf13885..7b04832 100644 --- a/templates/pages/proto/package.html +++ b/templates/pages/proto/package.html @@ -3,25 +3,25 @@ <h1><code>package</code></h1> <h2 id="list"><code>package.list</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <package method="list" pkgtype="<i>pkgtype</i>" model*="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <package method="list" pkgtype="??pkgtype" model*="" /> +</call>{% endhighlight %}</pre> <p><code>all</code> is the only currently observed value for <code>pkgtype</code></p> <h3>Response:</h3> -<pre><code><response> - <package status="<i>status</i>"> - <item[] url="" /> - </package> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <package status="??status"> + <item[] url="" /> + </package> +</response>{% endhighlight %}</pre> <p>A list of all packages available for download.</p> <h2 id="intend"><code>package.intend</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <package method="intend" url="" model*="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <package method="intend" url="" model*="" /> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <package status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <package status="??status" /> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/pcbevent.html b/templates/pages/proto/pcbevent.html index 89898d7..8ea12ef 100644 --- a/templates/pages/proto/pcbevent.html +++ b/templates/pages/proto/pcbevent.html @@ -3,19 +3,19 @@ <h1><code>pcbevent</code></h1> <h2 id="put"><code>pcbevent.put</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <pcbevent method="put"> - <time __type="time" /> - <seq __type="u32" /> - <item[]> - <name __type="str" /> - <value __type="s32" /> - <time __type="time" /> - </item[]> - </pcbevent> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <pcbevent method="put"> + <time __type="time" /> + <seq __type="u32" /> + <item[]> + <name __type="str" /> + <value __type="s32" /> + <time __type="time" /> + </item[]> + </pcbevent> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <pcbevent status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <pcbevent status="??status" /> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/pcbtracker.html b/templates/pages/proto/pcbtracker.html index 5f226bb..4146f45 100644 --- a/templates/pages/proto/pcbtracker.html +++ b/templates/pages/proto/pcbtracker.html @@ -3,17 +3,17 @@ <h1><code>pcbtracker</code></h1> <h2 id="alive"><code>pcbtracker.alive</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <pcbtracker method="alive" model*="" hardid="" softid="" accountid="" agree="" ecflag="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <pcbtracker method="alive" model*="" hardid="" softid="" accountid="" agree="" ecflag="" /> +</call>{% endhighlight %}</pre> <p><code>ecflag</code> here is determining if the arcade operator allows the use of paseli on this machine.</p> <p><code>agree@</code> and <code>ecflag@</code> appear to either be totally non present, or present with a value of <code>"1"</code>, but then again I may be reading the code wrong, so take that with a pinch of salt. </p> <h3>Response:</h3> -<pre><code><response> - <pcbtracker status="" time="" limit="" ecenable="" eclimit="" > -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <pcbtracker status="" time="" limit="" ecenable="" eclimit="" > +</response>{% endhighlight %}</pre> <p>As you might guess, <code>ecenable@</code> is therefore the flag to determine if paseli is enabled (i.e. the arcade operator and the server both allow its use).</p> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/playerdata.html b/templates/pages/proto/playerdata.html index 8c13228..bedbc29 100644 --- a/templates/pages/proto/playerdata.html +++ b/templates/pages/proto/playerdata.html @@ -3,134 +3,134 @@ <h1><code>playerdata</code></h1> <h2 id="usergamedata_send"><code>playerdata.usergamedata_send</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <playerdata method="usergamedata_send"> - <retrycnt __type="u32" /> - <info> - <version __type="u32" /> - </info> - <data> - <refid __type="str" /> - <dataid __type="str" /> - <gamekind __type="str" /> - <datanum __type="u32" /> - <record> - <d[] __type="str" /> - </record> - </data> - </playerdata> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <playerdata method="usergamedata_send"> + <retrycnt __type="u32" /> + <info> + <version __type="u32" /> + </info> + <data> + <refid __type="str" /> + <dataid __type="str" /> + <gamekind __type="str" /> + <datanum __type="u32" /> + <record> + <d[] __type="str" /> + </record> + </data> + </playerdata> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <playerdata status="<i>status</i>"> - <result __type="s32" /> - </playerdata> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <playerdata status="??status"> + <result __type="s32" /> + </playerdata> +</response>{% endhighlight %}</pre> <h2 id="usergamedata_recv"><code>playerdata.usergamedata_recv</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <playerdata method="usergamedata_recv"> - <info> - <version __type="u32" /> - </info> - <data> - <refid __type="str"> - <dataid __type="str"> - <gamekind __type="str"> - <recv_num __type="u32"> - </data> - </playerdata> -</call></code></pre> -<pre><code><call <i>...</i>> - <playerdata method="usergamedata_recv"> - <data> - <refid __type="str"> - <dataid __type="str"> - <gamekind __type="str"> - <recv_csv __type="str"> - </data> - </playerdata> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <playerdata method="usergamedata_recv"> + <info> + <version __type="u32" /> + </info> + <data> + <refid __type="str"> + <dataid __type="str"> + <gamekind __type="str"> + <recv_num __type="u32"> + </data> + </playerdata> +</call>{% endhighlight %}</pre> +<pre>{% highlight "cxml" %}<call ...> + <playerdata method="usergamedata_recv"> + <data> + <refid __type="str"> + <dataid __type="str"> + <gamekind __type="str"> + <recv_csv __type="str"> + </data> + </playerdata> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <playerdata status="<i>status</i>"> - <player> - <result> - <record_num __type="u32" /> - </result> - <record> - <d[]> - <bin1 __type="str" /> - </d[]> - </record> - </player> - </playerdata> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <playerdata status="??status"> + <player> + <result> + <record_num __type="u32" /> + </result> + <record> + <d[]> + <bin1 __type="str" /> + </d[]> + </record> + </player> + </playerdata> +</response>{% endhighlight %}</pre> <h2 id="usergamedata_inheritance"><code>playerdata.usergamedata_inheritance</code></h2> <p>See: <code>playerdata.usergamedata_recv</code></p> <h2 id="usergamedata_condrecv"><code>playerdata.usergamedata_condrecv</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <playerdata method="usergamedata_condrecv"> - <info> - <version __type="s32" /> - </info> - <data> - <dataid __type="str" /> - <gamekind __type="str" /> - <vkey __type="str" /> - <conditionkey __type="str" /> - <columns_bit __type="u64" /> - <conditions_num __type="u32" /> - <where __type="str" /> - <order_num __type="u32" /> - <order __type="str" /> - <recv_num __type="u32" /> - </info> - </playerdata> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <playerdata method="usergamedata_condrecv"> + <info> + <version __type="s32" /> + </info> + <data> + <dataid __type="str" /> + <gamekind __type="str" /> + <vkey __type="str" /> + <conditionkey __type="str" /> + <columns_bit __type="u64" /> + <conditions_num __type="u32" /> + <where __type="str" /> + <order_num __type="u32" /> + <order __type="str" /> + <recv_num __type="u32" /> + </info> + </playerdata> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <playerdata status="<i>status</i>"> - <player> - <result __type="s32" /> - <record_num __type="s32" /> - <record> - <d[]> - <bin1 __type="str" /> - </d[]> - <record/> - </player> - </playerdata> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <playerdata status="??status"> + <player> + <result __type="s32" /> + <record_num __type="s32" /> + <record> + <d[]> + <bin1 __type="str" /> + </d[]> + <record/> + </player> + </playerdata> +</response>{% endhighlight %}</pre> <h2 id="usergamedata_scorerank"><code>playerdata.usergamedata_scorerank</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <playerdata method="usergamedata_scorerank"> - <info> - <version __type="s32" /> - </info> - <data> - <dataid __type="str" /> - <gamekind __type="str" /> - <ckey __type="str" /> - <conditionkey __type="str" /> - <score __type="str" /> - </data> - </playerdata> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <playerdata method="usergamedata_scorerank"> + <info> + <version __type="s32" /> + </info> + <data> + <dataid __type="str" /> + <gamekind __type="str" /> + <ckey __type="str" /> + <conditionkey __type="str" /> + <score __type="str" /> + </data> + </playerdata> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <playerdata status="<i>status</i>"> - <rank> - <result __type="s32" /> - <rank __type="s32" /> - <updatetime __type="u64" /> - </rank> - </playerdata> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <playerdata status="??status"> + <rank> + <result __type="s32" /> + <rank __type="s32" /> + <updatetime __type="u64" /> + </rank> + </playerdata> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/services.html b/templates/pages/proto/services.html index b752256..1846ba8 100644 --- a/templates/pages/proto/services.html +++ b/templates/pages/proto/services.html @@ -3,19 +3,19 @@ <h1><code>services</code></h1> <h2 id="get"><code>services.get</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <services method="get" model*="" > - <info> - <AVS2 __type="str"><i>AVS2 version</i></AVS2> - </info> - </services> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <services method="get" model*="" > + <info> + <AVS2 __type="str"><i>AVS2 version</i></AVS2> + </info> + </services> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <services expire="" method="get" mode="" status="<i>status</i>"> - <item[] name="<i>service</i>" url="<i>url</i>" /> - </services> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <services expire="" method="get" mode="" status="??status"> + <item[] name="??service" url="??url" /> + </services> +</response>{% endhighlight %}</pre> <p>Known services are:</p> <ul> <li><code>ntp</code></li> diff --git a/templates/pages/proto/sidmgr.html b/templates/pages/proto/sidmgr.html index 99a4ee5..c8315e1 100644 --- a/templates/pages/proto/sidmgr.html +++ b/templates/pages/proto/sidmgr.html @@ -3,72 +3,72 @@ <h1><code>sidmgr</code></h1> <h2 id="create"><code>sidmgr.create</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <sidmgr method="create"> - <cardtype __type="str" /> - <cardid __type="str" /> - <cardgid __type="str" /> - <steal __type="u8" /> - </sidmgr> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <sidmgr method="create"> + <cardtype __type="str" /> + <cardid __type="str" /> + <cardgid __type="str" /> + <steal __type="u8" /> + </sidmgr> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <sidmgr status="<i>status</i>"> - <state __type="u32" /> - <e_count __type="u8" /> - <last __type="time" /> - <locked __type="time" /> - <sid __type="str" /> - <cardid_status __type="u8" /> - <refid __type="str" /> - </sidmgr> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <sidmgr status="??status"> + <state __type="u32" /> + <e_count __type="u8" /> + <last __type="time" /> + <locked __type="time" /> + <sid __type="str" /> + <cardid_status __type="u8" /> + <refid __type="str" /> + </sidmgr> +</response>{% endhighlight %}</pre> <h2 id="open"><code>sidmgr.open</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <sidmgr method="open" sid="" > - <pass __type="str" /> - </sidmgr> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <sidmgr method="open" sid="" > + <pass __type="str" /> + </sidmgr> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <sidmgr status="<i>status</i>"> - <state __type="u32" /> - <refid __type="str" /> - <locked __type="time" /> - </sidmgr> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <sidmgr status="??status"> + <state __type="u32" /> + <refid __type="str" /> + <locked __type="time" /> + </sidmgr> +</response>{% endhighlight %}</pre> <h2 id="touch"><code>sidmgr.touch</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <sidmgr method="touch" sid="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <sidmgr method="touch" sid="" /> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <sidmgr status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <sidmgr status="??status" /> +</response>{% endhighlight %}</pre> <h2 id="branch"><code>sidmgr.branch</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <sidmgr method="branch" sid="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <sidmgr method="branch" sid="" /> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <sidmgr status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <sidmgr status="??status" /> +</response>{% endhighlight %}</pre> <h2 id="close"><code>sidmgr.close</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <sidmgr method="close" sid="" /> - <cause __type="u32" /> - </sidmgr> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <sidmgr method="close" sid="" /> + <cause __type="u32" /> + </sidmgr> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <sidmgr status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <sidmgr status="??status" /> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/system.html b/templates/pages/proto/system.html index c910690..62939c9 100644 --- a/templates/pages/proto/system.html +++ b/templates/pages/proto/system.html @@ -3,104 +3,104 @@ <h1><code>system</code></h1> <h2 id="getmaster"><code>system.getmaster</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <system method="getmaster"> - <data> - <gamekind __type="str" /> - <datatype __type="str" /> - <datakey __type="str" /> - </data> - </system> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <system method="getmaster"> + <data> + <gamekind __type="str" /> + <datatype __type="str" /> + <datakey __type="str" /> + </data> + </system> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <system status="<i>status</i>"> - <result __type="s32" /> - <strdata1 __type="str" /> - <strdata2 __type="str" /> - <updatedate __type="u64" /> - </system> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <system status="??status"> + <result __type="s32" /> + <strdata1 __type="str" /> + <strdata2 __type="str" /> + <updatedate __type="u64" /> + </system> +</response>{% endhighlight %}</pre> <h2 id="getlocationiplist"><code>system.getlocationiplist</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <system method="getlocationiplist"> - <data> - <locationid __type="str" /> - <lineid __type="str" /> - </data> - </system> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <system method="getlocationiplist"> + <data> + <locationid __type="str" /> + <lineid __type="str" /> + </data> + </system> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <system status="<i>status</i>"> - <result __type="s32" /> - <iplist> - <record_num __type="s32" /> - <record[]> - <localconn __type="str" /> - </record[]> - </iplist> - </system> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <system status="??status"> + <result __type="s32" /> + <iplist> + <record_num __type="s32" /> + <record[]> + <localconn __type="str" /> + </record[]> + </iplist> + </system> +</response>{% endhighlight %}</pre> <h2 id="xrpcproxy"><code>system.xrpcproxy</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <system method="xrpcproxy"> - <info> - <version __type="s32" /> - </info> - <data> - <hostid __type="s64" /> - <locationid __type="str" /> - <lineid __type="str" /> - </data> - </system> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <system method="xrpcproxy"> + <info> + <version __type="s32" /> + </info> + <data> + <hostid __type="s64" /> + <locationid __type="str" /> + <lineid __type="str" /> + </data> + </system> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <system status="<i>status</i>"> - <result __type="s32" /> - <pwrtime __type="s32" /> - <matchlist> - <record_num __type="u32" /> - <record[]> - <pcbid __type="str" /> - <statusflg __type="str" /> - <matchgrp __type="s32" /> - <hostid __type="s64" /> - <jointime __type="u64" /> - <connip_g __type="str" /> - <connport_g __type="s32" /> - <connip_l __type="str" /> - <connport_l __type="s32" /> - </record[]> - </matchlist> - </system> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <system status="??status"> + <result __type="s32" /> + <pwrtime __type="s32" /> + <matchlist> + <record_num __type="u32" /> + <record[]> + <pcbid __type="str" /> + <statusflg __type="str" /> + <matchgrp __type="s32" /> + <hostid __type="s64" /> + <jointime __type="u64" /> + <connip_g __type="str" /> + <connport_g __type="s32" /> + <connip_l __type="str" /> + <connport_l __type="s32" /> + </record[]> + </matchlist> + </system> +</response>{% endhighlight %}</pre> <h2 id="convcardnumber"><code>system.convcardnumber</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <system method="convcardnumber"> - <info> - <version __type="s32" /> - </info> - <data> - <card_id __type="str" /> - <card_type __type="s32" /> - </data> - </system> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <system method="convcardnumber"> + <info> + <version __type="s32" /> + </info> + <data> + <card_id __type="str" /> + <card_type __type="s32" /> + </data> + </system> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <system status="<i>status</i>"> - <result __type="s32" /> - <data> - <card_number __type="str" /> - </data> - </system> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <system status="??status"> + <result __type="s32" /> + <data> + <card_number __type="str" /> + </data> + </system> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/traceroute.html b/templates/pages/proto/traceroute.html index f592b80..26ec566 100644 --- a/templates/pages/proto/traceroute.html +++ b/templates/pages/proto/traceroute.html @@ -3,18 +3,18 @@ <h1><code>traceroute</code></h1> <h2 id="send"><code>traceroute.send</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <traceroute proto="" method="send"> - <hop[]> - <valid __type="bool"> - <addr __type="ip4"> - <usec __type="u64"> - </hop[]> - </traceroute> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <traceroute proto="" method="send"> + <hop[]> + <valid __type="bool"> + <addr __type="ip4"> + <usec __type="u64"> + </hop[]> + </traceroute> +</call>{% endhighlight %}</pre> <p><code>hop</code> repeats for every hop (unsurprisingly)</p> <h3>Response:</h3> -<pre><code><response> - <traceroute status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <traceroute status="??status" /> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/proto/userdata.html b/templates/pages/proto/userdata.html index f3da43b..22151e0 100644 --- a/templates/pages/proto/userdata.html +++ b/templates/pages/proto/userdata.html @@ -3,26 +3,26 @@ <h1><code>userdata</code></h1> <h2 id="read"><code>userdata.read</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <userdata method="read" card*="" model*="" label="" /> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <userdata method="read" card*="" model*="" label="" /> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <userdata status="<i>status</i>" time=""> - <b[] __type="" /> - </userdata> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <userdata status="??status" time=""> + <b[] __type="" /> + </userdata> +</response>{% endhighlight %}</pre> <p><code>__type</code> here can be either <code>bin</code> or <code>str</code></p> <h2 id="write"><code>userdata.write</code></h2> <h3>Request:</h3> -<pre><code><call <i>...</i>> - <userdata method="write" card="" time="" model*="" label*="" > - <b[] __type="str" /> - </userdata> -</call></code></pre> +<pre>{% highlight "cxml" %}<call ...> + <userdata method="write" card="" time="" model*="" label*="" > + <b[] __type="str" /> + </userdata> +</call>{% endhighlight %}</pre> <h3>Response:</h3> -<pre><code><response> - <userdata status="<i>status</i>" /> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <userdata status="??status" /> +</response>{% endhighlight %}</pre> {% endblock %} \ No newline at end of file diff --git a/templates/pages/protocol.html b/templates/pages/protocol.html index 403e7e9..16bfd60 100644 --- a/templates/pages/protocol.html +++ b/templates/pages/protocol.html @@ -23,17 +23,17 @@ </details> <p>All requests follow a basic format:</p> -<pre><code><call model="<i>model</i>" srcid="<i>srcid</i>" tag="<i>tag</i>"> - <<i>module</i> method="<i>method</i>" <i>...attributes</i>> - <i>children</i> - </<i>module</i>> -</call></code></pre> +<pre>{% highlight "cxml" %}<call model="??model" srcid="??srcid" tag="??tag"> + <??module method="??method" ...attributes> + ...children + </??module> +</call>{% endhighlight %}</pre> <p>The responses follow a similar format:</p> -<pre><code><response> - <<i>module</i> status="<i>status</i>" <i>...attributes</i>> - <i>children</i> - </<i>module</i>> -</response></code></pre> +<pre>{% highlight "cxml" %}<response> + <??module status="??status" ...attributes> + ...children + </??module> +</response>{% endhighlight %}</pre> <p>With <code>"0"</code> being a successful status. Convention is to identify a specific method as <code><i>module</i>.<i>method</i></code>, and we'll be following this convention in this document too. There are a <i>lot</i> of possible methods, so the majority of this document is a big reference for them all. There are a @@ -103,149 +103,7 @@ <h2>Possible XRPC requests</h2> -<ul> - <li><code><a href="proto/eventlog.html">eventlog.%s</a></code></li> - <ul> - <li><code><a href="proto/eventlog.html#eventlog.write">eventlog.write</a></code></li> - </ul> - <li><code><a href="proto/playerdata.html">playerdata.%s</a></code></li> - <ul> - <li><code><a href="proto/playerdata.html#usergamedata_send">playerdata.usergamedata_send</a></code></li> - <li><code><a href="proto/playerdata.html#usergamedata_recv">playerdata.usergamedata_recv</a></code></li> - <li><code><a href="proto/playerdata.html#usergamedata_inheritance">playerdata.usergamedata_inheritance</a></code> - </li> - <li><code><a href="proto/playerdata.html#usergamedata_condrecv">playerdata.usergamedata_condrecv</a></code> - </li> - <li><code><a href="proto/playerdata.html#usergamedata_scorerank">playerdata.usergamedata_scorerank</a></code> - </li> - </ul> - <li><code><a href="proto/matching.html">matching.%s</a></code></li> - <ul> - <li><code><a href="proto/matching.html#request">matching.request</a></code></li> - <li><code><a href="proto/matching.html#wait">matching.wait</a></code></li> - <li><code><a href="proto/matching.html#finish">matching.finish</a></code></li> - </ul> - <li><code><a href="proto/system.html">system.%s</a></code></li> - <ul> - <li><code><a href="proto/system.html#getmaster">system.getmaster</a></code></li> - <li><code><a href="proto/system.html#getlocationiplist">system.getlocationiplist</a></code></li> - <li><code><a href="proto/system.html#xrpcproxy">system.xrpcproxy</a></code></li> - <li><code><a href="proto/system.html#convcardnumber">system.convcardnumber</a></code></li> - </ul> - <li><code><a href="proto/esoc.html">esoc.%s</a></code></li> - <ul> - <li><code><a href="proto/esoc.html#read">esoc.read</a></code></li> - <li><code><a href="proto/esoc.html#write">esoc.write</a></code></li> - </ul> - <li><code><a href="proto/cardmng.html">cardmng.%s</a></code></li> - <ul> - <li><code><a href="proto/cardmng.html#inquire">cardmng.inquire</a></code></li> - <li><code><a href="proto/cardmng.html#getrefid">cardmng.getrefid</a></code></li> - <li><code><a href="proto/cardmng.html#bindmodel">cardmng.bindmodel</a></code></li> - <li><code><a href="proto/cardmng.html#bindcard">cardmng.bindcard</a></code></li> - <li><code><a href="proto/cardmng.html#authpass">cardmng.authpass</a></code></li> - <li><code><a href="proto/cardmng.html#getkeepspan">cardmng.getkeepspan</a></code></li> - <li><code><a href="proto/cardmng.html#getkeepremain">cardmng.getkeepremain</a></code></li> - <li><code><a href="proto/cardmng.html#getdatalist">cardmng.getdatalist</a></code></li> - </ul> - <li><code><a href="proto/esign.html">esign.%s</a></code></li> - <ul> - <li><code><a href="proto/esign.html#request">esign.request</a></code></li> - </ul> - <li><code><a href="proto/package.html">package.%s</a></code></li> - <ul> - <li><code><a href="proto/package.html#list">package.list</a></code></li> - <li><code><a href="proto/package.html#intend">package.intend</a></code></li> - </ul> - <li><code><a href="proto/userdata.html">userdata.%s</a></code></li> - <ul> - <li><code><a href="proto/userdata.html#read">userdata.read</a></code></li> - <li><code><a href="proto/userdata.html#write">userdata.write</a></code></li> - </ul> - <li><code><a href="proto/services.html">services.%s</a></code></li> - <ul> - <li><code><a href="proto/services.html#get">services.get</a></code></li> - </ul> - <li><code><a href="proto/pcbtracker.html">pcbtracker.%s</a></code></li> - <ul> - <li><code><a href="proto/pcbtracker.html#alive">pcbtracker.alive</a></code></li> - </ul> - <li><code><a href="proto/pcbevent.html">pcbevent.%s</a></code></li> - <ul> - <li><code><a href="proto/pcbevent.html#put">pcbevent.put</a></code></li> - </ul> - <li><code><a href="proto/message.html">message.%s</a></code></li> - <ul> - <li><code><a href="proto/message.html#get">message.get</a></code></li> - </ul> - <li><code><a href="proto/facility.html">facility.%s</a></code></li> - <ul> - <li><code><a href="proto/facility.html#get">facility.get</a></code></li> - </ul> - <li><code><a href="proto/apsmanager.html">apsmanager.%s</a></code></li> - <ul> - <li><code><a href="proto/apsmanager.html#getstat">apsmanager.getstat</a></code></li> - </ul> - <li><code><a href="proto/sidmgr.html">sidmgr.%s</a></code></li> - <ul> - <li><code><a href="proto/sidmgr.html#create">sidmgr.create</a></code></li> - <li><code><a href="proto/sidmgr.html#open">sidmgr.open</a></code></li> - <li><code><a href="proto/sidmgr.html#touch">sidmgr.touch</a></code></li> - <li><code><a href="proto/sidmgr.html#branch">sidmgr.branch</a></code></li> - <li><code><a href="proto/sidmgr.html#close">sidmgr.close</a></code></li> - </ul> - <li><code><a href="proto/dlstatus.html">dlstatus.%s</a></code></li> - <ul> - <li><code><a href="proto/dlstatus.html#done">dlstatus.done</a></code></li> - <li><code><a href="proto/dlstatus.html#progress">dlstatus.progress</a></code></li> - </ul> - <li><code><a href="proto/eacoin.html">eacoin.%s</a></code></li> - <ul> - <li><code><a href="proto/eacoin.html#checkin">eacoin.checkin</a></code></li> - <li><code><a href="proto/eacoin.html#checkout">eacoin.checkout</a></code></li> - <li><code><a href="proto/eacoin.html#consume">eacoin.consume</a></code></li> - <li><code><a href="proto/eacoin.html#getbalance">eacoin.getbalance</a></code></li> - <li><code><a href="proto/eacoin.html#getecstatus">eacoin.getecstatus</a></code></li> - <li><code><a href="proto/eacoin.html#touch">eacoin.touch</a></code></li> - <li><code><a href="proto/eacoin.html#opchpass">eacoin.opchpass</a></code></li> - <li><code><a href="proto/eacoin.html#opcheckin">eacoin.opcheckin</a></code></li> - <li><code><a href="proto/eacoin.html#opcheckout">eacoin.opcheckout</a></code></li> - <li><code><a href="proto/eacoin.html#getlog">eacoin.getlog</a></code></li> - </ul> - <li><code><a href="proto/traceroute.html">traceroute.%s</a></code></li> - <ul> - <li><code><a href="proto/traceroute.html#send">traceroute.send</a></code></li> - </ul> - <li><code><a href="proto/game/sv4.html">game.%s</a></code></li> - <ul> - <li><code><a href="proto/game/sv4.html#sample">game.sv4_sample</a></code></li> - <li><code><a href="proto/game/sv4.html#new">game.sv4_new</a></code></li> - <li><code><a href="proto/game/sv4.html#load">game.sv4_load</a></code></li> - <li><code><a href="proto/game/sv4.html#load_m">game.sv4_load_m</a></code></li> - <li><code><a href="proto/game/sv4.html#save">game.sv4_save</a></code></li> - <li><code><a href="proto/game/sv4.html#save_m">game.sv4_save_m</a></code></li> - <li><code><a href="proto/game/sv4.html#common">game.sv4_common</a></code></li> - <li><code><a href="proto/game/sv4.html#shop">game.sv4_shop</a></code></li> - <li><code><a href="proto/game/sv4.html#hiscore">game.sv4_hiscore</a></code></li> - <li><code><a href="proto/game/sv4.html#buy">game.sv4_buy</a></code></li> - <li><code><a href="proto/game/sv4.html#exception">game.sv4_exception</a></code></li> - <li><code><a href="proto/game/sv4.html#entry_s">game.sv4_entry_s</a></code></li> - <li><code><a href="proto/game/sv4.html#entry_e">game.sv4_entry_e</a></code></li> - <li><code><a href="proto/game/sv4.html#frozen">game.sv4_frozen</a></code></li> - <li><code><a href="proto/game/sv4.html#lounge">game.sv4_lounge</a></code></li> - <li><code><a href="proto/game/sv4.html#save_e">game.sv4_save_e</a></code></li> - <li><code><a href="proto/game/sv4.html#save_pb">game.sv4_save_pb</a></code></li> - <li><code><a href="proto/game/sv4.html#save_c">game.sv4_save_c</a></code></li> - <li><code><a href="proto/game/sv4.html#play_s">game.sv4_play_s</a></code></li> - <li><code><a href="proto/game/sv4.html#play_e">game.sv4_play_e</a></code></li> - <li><code><a href="proto/game/sv4.html#serial">game.sv4_serial</a></code></li> - <li><code><a href="proto/game/sv4.html#save_fi">game.sv4_save_fi</a></code></li> - <li><code><a href="proto/game/sv4.html#print">game.sv4_print</a></code></li> - <li><code><a href="proto/game/sv4.html#print_h">game.sv4_print_h</a></code></li> - <li><code><a href="proto/game/sv4.html#load_r">game.sv4_load_r</a></code></li> - <li><code><a href="proto/game/sv4.html#save_campaign">game.sv4_save_campaign</a></code></li> - </ul> -</ul> +{{ generate_xrpc_list()|safe }} <b>Totally undocumented services (based on <code>services.get</code>):</b> <ul> diff --git a/xml_lexer.py b/xml_lexer.py new file mode 100644 index 0000000..05bacec --- /dev/null +++ b/xml_lexer.py @@ -0,0 +1,86 @@ +from pygments.lexer import RegexLexer +from pygments.token import Text, Comment, Operator, Name, String +from pygments.lexers import _lexer_cache +from pygments.lexers._mapping import LEXERS + + +def italic_attr(lexer, m): + yield m.start(), String, '"' + yield m.start() + 2, Comment, m.group()[3:-1] + yield m.end() - 1, String, '"' + +def italic_generic(lexer, m): + yield m.start(), Comment, m.group() + +def italic_tag(lexer, m): + yield m.start(), Name.Tag, "<" + name = m.group()[3:] + if name.endswith(">"): + yield m.start() + 1, Comment, name[:-1] + yield m.end() - 1, Name.Tag, ">" + else: + yield m.start() + 1, Comment, name + +def italic_tag_close(lexer, m): + yield m.start(), Name.Tag, "</" + yield m.start() + 4, Comment, m.group()[4:-1] + yield m.end() - 1, Name.Tag, ">" + +def repeat_tag_close(lexer, m): + before, _, after = m.group().partition("[]") + yield m.start(), Name.Tag, before + yield m.start() + len(before), Operator, "[]" + yield m.start() + len(before) + 2, Name.Tag, after + +def italic_attr_name(lexer, m): + name, _, after = m.group().partition("*") + yield m.start(), Name.Attribute, name + yield m.start() + len(name), Operator, "*" + yield m.start() + len(name) + 1, Name.Attribute, after + + +class CustomXMLLexer(RegexLexer): + name = "customxml" + aliases = ["cxml"] + + tokens = { + 'root': [ + (r'\s*\.\.\.\w*', Comment), + ('[^<&]+', Text), + (r'&\S*?;', Name.Entity), + (r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc), + (r'<!--(.|\n)*?-->', Comment.Multiline), + (r'<\?.*?\?>', Comment.Preproc), + ('<![^>]*>', Comment.Preproc), + (r'<\s*[\w:.-]+', Name.Tag, 'tag'), + (r'<\s*/\s*[\w:.-]+\s*>', Name.Tag), + (r'<\s*\?\?[\w:.-]+', italic_tag, 'tag'), + (r'<\s*/\s*\?\?[\w:.-]+\s*>', italic_tag_close), + (r'<\s*/\s*[\w:.-]+\[\]\s*>', repeat_tag_close), + ], + 'tag': [ + (r'\*', Operator), + (r'\[\]', Operator), + (r'\s+', Text), + (r'\.\.\.\w*', italic_generic), + (r'[\w.:-]+\s*=', Name.Attribute, 'attr'), + (r'[\w.:-]+\*\s*=', italic_attr_name, 'attr'), + (r'/?\s*>', Name.Tag, '#pop'), + ], + 'attr': [ + (r'\s+', Text), + (r'"\?\?[^"]*?"', italic_attr, "#pop"), + ('".*?"', String, '#pop'), + ("'.*?'", String, '#pop'), + (r'[^\s>]+', String, '#pop'), + ], + } + + def analyse_text(text): + print("hi?") + +_lexer_cache[CustomXMLLexer.__name__] = CustomXMLLexer + +LEXERS["CustomXMLLexer"] = ("xml_lexer", "CustomXMLLexer", ("cxml", ), (), ()) + +__all__ = ("CustomXMLLexer", )