Create PurpleIRCv3Capabilities for managing capabilities for each connection

Review Request #2100 — Created Nov. 26, 2022 and submitted

Information

pidgin/pidgin
default

Reviewers

This implements everything in capabilities version 302 except for handling the
NEW and DEL commands from the server. I'm not sure how we can test that yet,
so we're ignoring it for now.

After the server has told us about all of the capabilities it supports, we
explicitly request cap-notify which we implictly request when we send
CAP LS 302. This is mostly to test our code and might be removed in the future.

Connected to my local ergo and used ngrep to verify that everything was being sent correctly.

Summary ID
Create PurpleIRCv3Capabilities for managing capabilities for each connection
This implements everything in capabilities version 302 except for handling the NEW and DEL commands from the server. I'm not sure how we can test that yet, so we're ignoring it for now. After the server has told us about all of the capabilities it supports, we explicitly request cap-notify which we implictly request when we send CAP LS 302. This is mostly to test our code and might be removed in the future.
e6a4dbd3828d4cd7adb223c1fe5a90dde83684d5
Description From Last Updated

Is there a reason for connecting to the signal from the same object? Should that be the class handler?

QuLogicQuLogic

nak

QuLogicQuLogic

nacked

QuLogicQuLogic

This is never freed?

QuLogicQuLogic

splitting

QuLogicQuLogic

You can avoid the g_strdup by setting parts[i] = NULL so it won't be freed.

QuLogicQuLogic

Not sure why this can't be inlined?

QuLogicQuLogic

Not unused.

QuLogicQuLogic

Ditto

QuLogicQuLogic

This is just real_found = g_hash_table_lookup_extended(...

QuLogicQuLogic
QuLogic
  1. 
      
  2. Show all issues

    Is there a reason for connecting to the signal from the same object? Should that be the class handler?

    1. hadn't considered that one, that's probably a good move.

  3. Show all issues

    nak

  4. Show all issues

    nacked

  5. Show all issues

    This is never freed?

  6. Show all issues

    splitting

  7. Show all issues

    You can avoid the g_strdup by setting parts[i] = NULL so it won't be freed.

    1. We can't do this, because we have to call g_strfreev which stops at the first NULL.

  8. Show all issues

    Not sure why this can't be inlined?

    1. Do you mean mark the function as inline ?

    2. No, I mean this is a single-line function that's called from only one place, plus it has extra parameters when called that end up unused.

    3. Gotta it, sorry that wasn't clicking for some reason.

  9. Show all issues

    Not unused.

  10. Show all issues

    Ditto

  11. Show all issues

    This is just real_found = g_hash_table_lookup_extended(...

  12. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed