Commit Graph

12 Commits

Author SHA1 Message Date
iphydf 4e2dba4d9f chore: Reformat sources with astyle.
Restyled astyle is fixed now.
2024-02-02 01:31:32 +00:00
iphydf 511bfe39c8 cleanup: Use Bazel modules to enforce proper #include hygiene. 2024-01-30 23:51:43 +00:00
iphydf bdd42b5452 refactor: Add common msgpack array packer with callback.
There will be more object arrays that need to be packed. This function
takes care of NULL (creating an empty array), and putting the correct
array size and calling the per-element callback the right amount of
times.
2024-01-18 13:52:35 +00:00
iphydf e7fb91ddb8 refactor: Allow NULL pointers for byte arrays in events.
Some events, notably the file chunk recv one, can give NULL pointers to
the client. Not sure they should, but that's what happens, so we support
it.
2024-01-17 09:13:07 +00:00
iphydf e2c01e457b refactor: Use enum-specific pack functions for enum values.
It's more obvious this way.
2024-01-15 21:47:13 +00:00
iphydf 6caa7ce4b1 cleanup: Move the 2-element array pack out of individual events.
It's common across all events. No need to repeat it.

Co-authored-by: Green Sky <green@g-s.xyz>
2024-01-15 19:04:45 +00:00
iphydf b4d8826228 cleanup: Remove old type-ordered event getters.
These are quite expensive, because they go through all events to index
in a typed array that no longer exists. Clients should index in the
union array and find the event they want themselves, or use dispatch.
2024-01-15 17:29:43 +00:00
Green Sky 8c35e0fefb feat: add ngc events 2024-01-15 16:32:10 +00:00
iphydf 97bdd83937 refactor: Make event dispatch ordered by receive time. 2024-01-15 16:32:10 +00:00
Green Sky 41dfb1c1c0 fix: unpack enum function names in event impl generator 2023-12-24 14:34:34 +01:00
Green Sky 22cd38ad50 adopt event impl generation tool to #2392 2023-12-20 12:13:45 +01:00
Green Sky f31ea1088a add the event impl generation tool 2023-12-20 10:46:59 +01:00