-
Notifications
You must be signed in to change notification settings - Fork 238
3532: Add jamulusserver/setDirectory request #3533
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
3532: Add jamulusserver/setDirectory request #3533
Conversation
92df09a to
efcef61
Compare
ann0see
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check that the server UI responds as expected?
src/serverrpc.cpp
Outdated
| } | ||
|
|
||
| QJsonValue CServerRpc::SerializeRegistrationStatus ( ESvrRegStatus eSvrRegStatus ) | ||
| const std::unordered_map<EDirectoryType, std::string> CServerRpc::sumDirectoryTypeToString = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a place where we already have those pre defined directories? Isn't it somewhere in util.h?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a function to return the translated name. This is a serialisation of the enum, though, so it must not use the translations.
efcef61 to
adf5f45
Compare
adf5f45 to
a0f38c9
Compare
No - it would be the same as any other RPC-based change, though. For example, void CServer::SetWelcomeMessage ( const QString& strNWelcMess )
{
// we need a mutex to secure access
QMutexLocker locker ( &MutexWelcomeMessage );
strWelcomeMessage = strNWelcMess;
// restrict welcome message to maximum allowed length
strWelcomeMessage = strWelcomeMessage.left ( MAX_LEN_CHAT_TEXT );
}That won't update the UI, as there's no signal being raised. Actually... So it's probably going to do better than the welcome message. (It won't get the text updates -- but at least the status will show up.) |
|
Thanks. And indeed, the UI is semi in line. It does not go to "None" correctly, but shows that the server is no longer registered. Changing custom/any genre 1/... works though. |
|
Mmm, that means It should do that if changing from Hmm, looks like it's definitely missing on the recording stuff, so hopefully it's not relying on But it's a bit limited: Those when someone connects or everyone disconnect (not under UI control). Aforementioned registration feedback, as it's asynchronous. These two have unix signals connected to them, so those got wired to the UI. And also depend on whether the server has anyone connected. No idea... |
|
So you'd argue that the refactoring is definitely Jamulus 4? What's your take on this PR otherwise: Merge and release or wait? I'd be in slight favor of merging even though this is a feature. Otherwise it could take a very long time to be published. |
|
Yep, the additional handling for RPC is definitely out of scope for this feature. I've kicked off an "all targets" build as the legacy macOS originally failed, just in case: |
|
@pljones I've tagged this for the upcoming release. |
|
Top Guys that you have done this. |
Short description of changes
CHANGELOG: Server RPC: Add jamulusserver/setDirectory request
Context: Fixes an issue?
Fixes: 3532
Does this change need documentation? What needs to be documented and how?
RPC documentation regenerated.
Status of this Pull Request
I've tested with nc, changing one of my servers from registered with a custom directory to unregistered and then back.
What is missing until this pull request can be merged?
Reviewing.
Ideally, testing by @anprdev to confirm it meets their requirements.
Checklist
make clang_formathas gone wacky againAUTOBUILD: Please build all targets