Peter Hutterer
5258a559eb
doc/proto: remove the embedded docs from the proto, use static pages instead
2023-03-08 11:09:58 +10:00
Peter Hutterer
56004836b9
proto: add the context-type attribute to events and requests
...
This allows us to mark/filter requests and events that are only
available on a given context type.
2023-03-08 09:01:03 +10:00
Peter Hutterer
b05b256fd8
scanner: expand the regex to search for protocol names
...
This now finds nested ei_foo.bar.baz too (though it includes the
trailing full stop, if any).
2023-03-07 15:26:36 +10:00
Peter Hutterer
eb9fa07c10
scanner: add a filter to escape ei protocol names
...
By default escape them with backticks for markdown
2023-03-03 11:39:03 +10:00
Peter Hutterer
2fb1ff70e3
scanner: allow '-' for loading a template from stdin
2023-03-03 11:39:03 +10:00
Peter Hutterer
ea3ada1a80
proto: make the documentation an extractable set of XML tags
...
Instead of hiding this in a XML comment, let's make it a proper set of
tags so we can extract it and use it in generated documentation.
2023-03-03 11:38:40 +10:00
Peter Hutterer
c350ac2ee3
src: pass the headerfile as jinja extra data
...
This removes another special handling of the C bindings from the
scanner.
2023-03-03 11:38:40 +10:00
Peter Hutterer
d127f02f0a
scanner: add ability to pass extra data to the jinja templates
...
This makes generation of files with the scanner a lot more flexible -
e.g. one can run the scanner with
--jinja-extra-data='{ "interface": "ei_connection"}'
and then in the jinja template use an if condition to match on this
interface.
2023-03-03 11:38:40 +10:00
Peter Hutterer
2fa7792a33
scanner: drop duplicate import
...
We already import dedent globally
2023-03-03 11:27:01 +10:00
Peter Hutterer
2550a0b54d
scanner: raise SystemExit instead of calling sys.exit
...
Bit nicer (no import sys required for that call) and that's what sys.exit
does that anyway.
2023-03-03 11:27:01 +10:00
Peter Hutterer
1db37c33d5
scanner: allow for cross-referencing enums
...
Add another run to the XML parser so we parse enums before Arguments
that cross-reference enums from other interfaces.
This also fixes a type bug - the enum name string was passed to
Argument.create() as Enum and no-one noticed.
2023-03-03 11:27:01 +10:00
Jonas Ådahl
03c0ab73dd
protocol: Add support for 64 bit integers on the wire
...
This is useful for e.g. not having to split timestamps.
2023-03-03 11:27:01 +10:00
Jonas Ådahl
cad5bc81bb
protocol: Make integer explicitly sized
...
This means 'int' is explicitly 'int32' and 'uint' is explicitly
'uint32' in the protocol XML files.
2023-03-03 11:27:01 +10:00
Peter Hutterer
b7ac763241
protocol: change type=bitmask to use the wayland protocol's bitfield=true
2023-03-03 11:27:01 +10:00
Peter Hutterer
2227690287
scanner: parse the copyright tag
2023-03-03 11:27:01 +10:00
Peter Hutterer
8692e2592a
scanner: use the proper SAXException class
...
The one we get is an internal subclass, let's not do that.
2023-03-03 11:27:01 +10:00
Peter Hutterer
7ad74b9886
scanner: fix mypy errors
2023-03-03 11:27:01 +10:00
Peter Hutterer
e592a3d85a
scanner: fix a few black complaints
2023-03-03 11:27:01 +10:00
Peter Hutterer
c8986b88ba
scanner: parse the descriptions as well
2023-03-03 11:27:01 +10:00
Peter Hutterer
cc0a06aed6
scanner: rename to as_c_arg and c_type for the c-specific functions
2023-03-03 11:27:01 +10:00
Peter Hutterer
4293f2f040
scanner: factor out the protocol type mapping to be global
2023-03-03 11:27:01 +10:00
Peter Hutterer
5e6e4d8fc9
scanner: separate the parser from the actual protocol
...
Let's not leak anything related to XML parsing into the class
we use as the actual protocol description.
2023-03-03 11:27:01 +10:00
Peter Hutterer
4414c91fca
scanner: rename run to run_counter
2023-03-03 11:27:01 +10:00
Peter Hutterer
3499d26300
scanner: slightly clean up the XML error handling
...
Slight improvement in the code, nothing more.
2023-03-03 11:27:01 +10:00
Peter Hutterer
381bc9222a
scanner: don't allow incoming/outgoing for modes other than ei/eis
...
We support mode "brei" now but that doesn't have a definition of incoming or
outgoing.
2023-03-03 11:27:01 +10:00
Peter Hutterer
0e70d06706
scanner: comments and some more type annotations
2023-03-03 11:27:01 +10:00
Peter Hutterer
72c570e096
scanner: pass the Enum to the Entry class
...
So we can compose the fqdn (and possibly do value checks and whatnot)
2023-03-03 11:27:01 +10:00
Peter Hutterer
579f0d07d2
Add a brei-proto.h generated header file
...
This will be needed to have access to the various disconnect reasons in
brei-shared.c.
2023-03-03 11:21:26 +10:00
Peter Hutterer
8a52cbbe10
scanner: detect duplicates in the XML file
2023-03-03 11:21:26 +10:00
Peter Hutterer
e07d4638d5
scanner: drop the Argument.argtype in favour of DBus-type bindings
...
This was a brei-specifc implementation detail that is not really needed,
we can use the single-character dbus-style bindings.
2023-03-03 11:21:26 +10:00
Peter Hutterer
f500a1cd43
scanner: expand the help description
2023-03-03 11:21:26 +10:00
Peter Hutterer
1e4d273cd4
scanner: add the "camel" jinja filter
...
For conversion into CamelCase
2023-03-03 11:21:26 +10:00
Peter Hutterer
8979802893
scanner: rename to ei-scanner
2023-03-03 11:21:26 +10:00