Rework the way extension parsing works

Review Request #2957 — Created Feb. 17, 2024 and updated

Information

xeme/xeme
default

Reviewers

Some extensions, like starttls have multiple elements in the same namespace. So
to support that, we're removing element names from the extensions and instead
passing the element name into the parse_start and parse_end vfuncs.

Ran with the turtles.
Also ran the extension and extensionmap tests under valgrind.

Summary ID
Rework the way extension parsing works
Some extensions, like starttls have multiple elements in the same namespace. So to support that, we're removing element names from the extensions and instead passing the element name into the parse_start and parse_end vfuncs.
3db354e62dd1cc07aced9f4561827b8b3850c065
Description From Last Updated

I realized this needs some more work/thought. The starttls feature is only valid with stream-features as a parent, but it's …

grimgrim
grim
Review request changed
Change Summary:

made this much messier :-D

Summary:
Add a XemeInputStream parameter to XemeExtension->parse_end
Rework the way extension parsing works
Description:
~  

This now matches the parse_start vfunc and avoids having to store the input

~   stream on extension objects.

  ~

Some extensions, like starttls have multiple elements in the same namespace. So

  ~ to support that, we're removing element names from the extensions and instead
  + passing the element name into the parse_start and parse_end vfuncs.

Testing Done:
~  

Ran with the turtles.

  ~

Ran with the turtles.

  + Also ran the extension and extensionmap tests under valgrind.

Commits:
Summary ID
Add a XemeInputStream parameter to XemeExtension->parse_end
This now matches the parse_start vfunc and avoids having to store the input stream on extension objects.
3f30c1a8e7023279645522b254a2ead0c38556cb
Rework the way extension parsing works
Some extensions, like starttls have multiple elements in the same namespace. So to support that, we're removing element names from the extensions and instead passing the element name into the parse_start and parse_end vfuncs.
3db354e62dd1cc07aced9f4561827b8b3850c065
grim
  1. 
      
  2. Show all issues

    I realized this needs some more work/thought. The starttls feature is only valid with stream-features as a parent, but it's proceed and failure elements happen at the stanza level which has stream:stream as a parent.

    So that said, this current implementation won't work.

  3.