Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-RPC: Extend jamulusserver/getClients method #2918

Merged
merged 1 commit into from
May 16, 2023

Conversation

Rob-NY
Copy link
Contributor

@Rob-NY Rob-NY commented Oct 17, 2022

Short description of changes

Expands jamulusserver/getClients method to include all elements of a user profile as well as the number of active client connections. Changes were made so they are backward compatible with the prior message format.

CHANGELOG: RPC: jamulusserver/getClients method expanded to include all elements of a user profile as well as the number of active client connections.

Context: Fixes an issue?

Addresses issue #2488 and comments in #2890

Does this change need documentation? What needs to be documented and how?

JSON-RPC documentation was updated via python tool and is included in this PR.

Status of this Pull Request

What is missing until this pull request can be merged?

Compile tested on Linux only.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

src/serverrpc.cpp Outdated Show resolved Hide resolved
src/util.h Outdated Show resolved Hide resolved
@hoffie hoffie added this to Triage in Tracking (old) via automation Oct 17, 2022
@hoffie hoffie added this to the Release 3.10.0 milestone Oct 17, 2022
src/util.h Outdated Show resolved Hide resolved
@hoffie hoffie changed the title Extend jamulusserver/getClients RPC method JSON-RPC: Extend jamulusserver/getClients method Oct 17, 2022
@Rob-NY Rob-NY force-pushed the extend_getclients_rpc branch 2 times, most recently from e185efd to 722fa16 Compare October 22, 2022 14:00
@Rob-NY Rob-NY force-pushed the extend_getclients_rpc branch 2 times, most recently from 9a7d726 to dbfb722 Compare November 9, 2022 02:03
@ann0see
Copy link
Member

ann0see commented Nov 15, 2022

I'd like to have this in the next release...

@Rob-NY Rob-NY force-pushed the extend_getclients_rpc branch 2 times, most recently from 7caf87b to e35226c Compare November 16, 2022 03:54
@Rob-NY
Copy link
Contributor Author

Rob-NY commented Nov 16, 2022

I'd like to have this in the next release...

Me too. I've fixed what I believe are the issues raised (as opposed to philosophical questions), squashed and pushed. Once this is merged I will resubmit the dependent PR.

@hoffie hoffie moved this from Triage to Waiting on Team in Tracking (old) Nov 16, 2022
Copy link
Member

@hoffie hoffie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and sorry for not commenting earlier. Looks good to me in general despite two questions (see inline comments).

src/serverrpc.cpp Outdated Show resolved Hide resolved
src/util.h Outdated Show resolved Hide resolved
@Rob-NY
Copy link
Contributor Author

Rob-NY commented Nov 24, 2022

I'd like to have this in the next release...

@hoffie - is there anything I still need to do to move this along? I'm asking because I'd like to resubmit the dependent PR which builds upon this basic one as a candidate as well. I believe I've addressed all the refactor requests and questions.

@ann0see ann0see changed the base branch from master to main December 26, 2022 19:06
@pljones
Copy link
Collaborator

pljones commented Jan 5, 2023

@Rob-NY there are a number of unanswered requests.

@Rob-NY
Copy link
Contributor Author

Rob-NY commented Jan 5, 2023

@Rob-NY there are a number of unanswered requests.

ISO Country code standardization: I have no idea how to approach this at this time, so I asked to pass on this for the time being - no response.

In November, @hoffie asked you if we really wanted to expose the translated strings in some areas of this api - no response.

I made the changes for the "Skillset: NONE" vs. "not set" request as well as all the others raised here. If I missed something, please point it out to me and I'll address right away.

@ann0see
Copy link
Member

ann0see commented Jan 5, 2023

Ok. So then there was a misunderstanding on both sides about the state of this PR.

I‘ll look where I can help if I have time.

src/util.h Outdated Show resolved Hide resolved
src/serverrpc.cpp Outdated Show resolved Hide resolved
Copy link
Member

@ann0see ann0see left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. See ann0see@f3d6bea
I hope we can agree on removing these methods as:

  1. The country code is inconsistent between QT5 and QT6 (we already expose the country name which is not optimal but probably ok)
  2. The skill level is translated and thus inconsistent. Alternatively, we'd find a way to only use the English translation. However, I think using just IDs is fine in this case, as the Jamulus protocol specifies the meaning. I believe that if we remove this - to stay consistent we should also remove the text translations of other translated names.

Tracking (old) automation moved this from Waiting on Team to Waiting Externally Mar 25, 2023
@pljones pljones moved this from Waiting Externally to In Progress in Tracking (old) Apr 19, 2023
@ann0see
Copy link
Member

ann0see commented Apr 26, 2023

@pljones @Rob-NY would you be ok with my proposed changes?

@Rob-NY
Copy link
Contributor Author

Rob-NY commented Apr 28, 2023

@pljones @Rob-NY would you be ok with my proposed changes?

No issue.

@ann0see ann0see self-requested a review May 3, 2023 20:54
@ann0see ann0see moved this from In Progress to Waiting on Team in Tracking (old) May 3, 2023
@ann0see
Copy link
Member

ann0see commented May 3, 2023

@Rob-NY @pljones pushed my commit. Waiting on further review now.

@ann0see
Copy link
Member

ann0see commented May 4, 2023

Ok. Rebased. Will do a new local test now.

Copy link
Member

@ann0see ann0see left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local testing says this is ok. still, we could remove the instrument name - as it is translated and thus not reliable. Qt doesn't seem to support any short name for countries, so the country name is probably the best we can get.

@ann0see ann0see requested a review from pljones May 4, 2023 21:00
@ann0see
Copy link
Member

ann0see commented May 9, 2023

@pljones (and maybe @dtinth) Could you please review this (especially from a C++ dev viewpoint)? I'd like to have this in. The legacy and iOS build failures are unrelated.

Copy link
Contributor

@dtinth dtinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.

vecChanInfo in CServerDlg seems unused but that's fine I guess.

docs/JSON-RPC.md Outdated
| result.clients | array | The list of connected clients. |
| result.clients[*].id | number | The client’s channel id. |
| result.clients[*].address | string | The client’s address (ip:port). |
| result.clients[*].name | string | The client’s name. |
| result.clients[*].jitterBufferSize | number | The client’s jitter buffer size. |
| result.clients[*].channels | number | The number of audio channels of the client. |
| result.clients[*].instrumentCode | number | The id of the instrument for this channel. |
| result.clients[*].instrumentName | number | The text name of the instrument for this channel. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instrumentName | number? That sounds strange. What is it meant to represent? The position in the enum? In which case it's redundant.

Copy link
Member

@ann0see ann0see May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could remove the instrument name

I think this is wrongly documented and should be a string (but I still believe it should be removed due to the translation issue.)

@pljones
Copy link
Collaborator

pljones commented May 10, 2023

I'd like a new issue raised with the changes requested here but not made. Once that's done, I'm happy to approve it.

@ann0see
Copy link
Member

ann0see commented May 11, 2023

@pljones

For fixable stuff, I'd only have the removal of translated content (= instrument name).
I believe there is more, but I think others have raised these issues:

@pljones
Copy link
Collaborator

pljones commented May 12, 2023

@pljones

For fixable stuff, I'd only have the removal of translated content (= instrument name). I believe there is more, but I think others have raised these issues:

Yes, it's probably mostly the use of strings where the number would be better that should be fixed (at some point):
#2918 (comment)

@ann0see
Copy link
Member

ann0see commented May 13, 2023

Ok. I've now removed the instrument name too.
@pljones could you please go through the comments (especially your comments) and open the issue? I think you have more context.

Copy link
Collaborator

@pljones pljones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve anyway on the basis nothing here is breaking as far as I can see. The countryName issue is complicated because of Qt 5/6 rather than anything else, as far as I remember and I wasn't involved much in the solution there.

Tracking (old) automation moved this from Waiting on Team to In Progress May 16, 2023
@ann0see ann0see merged commit 4f6eb99 into jamulussoftware:main May 16, 2023
13 of 15 checks passed
Tracking (old) automation moved this from In Progress to Done May 16, 2023
@pljones pljones added the JSON-RPC Related to the JSON-RPC API label Jun 4, 2023
@pljones pljones removed this from Done in Tracking (old) Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON-RPC Related to the JSON-RPC API
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants