Move serialization templates and VFS code to lib.base

Not being able to use common enums in code in lib.base was
getting to be really annoying. It always should have been in
base anyways.
This commit is contained in:
Salad Dais
2021-05-23 10:39:20 +00:00
parent 058b9f5313
commit 237a409ee0
9 changed files with 13 additions and 101 deletions

View File

@@ -113,7 +113,7 @@ If you want to compare against an enum or a flag class in defined in `templates.
Decoded messages are displayed in the log pane, clicking one will show the request and
response for HTTP messages, and a human-friendly form for UDP messages. Some messages and
fields have [special packers defined](https://github.com/SaladDais/Hippolyzer/blob/master/hippolyzer/lib/proxy/templates.py)
fields have [special packers defined](https://github.com/SaladDais/Hippolyzer/blob/master/hippolyzer/lib/base/templates.py)
that will give a more human-readable form of enum or binary fields, with the original form beside or below it.
For example, an `AgentUpdate` message may show up in the log pane like:
@@ -323,7 +323,7 @@ If you are a viewer developer, please put them in a viewer.
[LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html). If you have a good reason why, I might dual license.
This package [includes portions of the Second Life(TM) Viewer Artwork](https://github.com/SaladDais/Hippolyzer/tree/master/hippolyzer/lib/proxy/data),
This package [includes portions of the Second Life(TM) Viewer Artwork](https://github.com/SaladDais/Hippolyzer/tree/master/hippolyzer/lib/base/data),
Copyright (C) 2008 Linden Research, Inc. The viewer artwork is licensed under the Creative Commons
Attribution-Share Alike 3.0 License.

View File

@@ -16,7 +16,7 @@ from hippolyzer.lib.proxy.http_flow import HippoHTTPFlow
from hippolyzer.lib.proxy.message import ProxiedMessage
from hippolyzer.lib.proxy.region import ProxiedRegion
from hippolyzer.lib.proxy.sessions import Session, SessionManager
from hippolyzer.lib.proxy.vfs import STATIC_VFS
from hippolyzer.lib.base.vfs import STATIC_VFS
JOINT_REPLS = {

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@ from typing import *
import hippolyzer.lib.base.serialization as se
from hippolyzer.lib.base.datatypes import UUID
from hippolyzer.lib.base.helpers import get_resource_filename
from hippolyzer.lib.proxy.templates import AssetType
from hippolyzer.lib.base.templates import AssetType
@dataclasses.dataclass
@@ -63,5 +63,5 @@ class VFS:
return self._data_fh.read(block.size)
_static_path = get_resource_filename("lib/proxy/data/static_index.db2")
_static_path = get_resource_filename("lib/base/data/static_index.db2")
STATIC_VFS = VFS(_static_path)

View File

@@ -63,9 +63,9 @@ setup(
'lib/base/message/data/message_template.msg',
'lib/base/message/data/message.xml',
'lib/base/network/data/ca-bundle.crt',
'lib/proxy/data/static_data.db2',
'lib/proxy/data/static_index.db2',
'lib/proxy/data/LICENSE-artwork.txt',
'lib/base/data/static_data.db2',
'lib/base/data/static_index.db2',
'lib/base/data/LICENSE-artwork.txt',
],
},
entry_points={

View File

@@ -1,7 +1,7 @@
import unittest
from hippolyzer.lib.base.datatypes import UUID
from hippolyzer.lib.proxy.vfs import STATIC_VFS
from hippolyzer.lib.base.vfs import STATIC_VFS
class StaticVFSTest(unittest.TestCase):