Skip to content

Commit dcac4cc

Browse files
ann0seemcfnord
andcommitted
Apply stylistic changes
Co-authored-by: mcfnord <mcfnord@users.noreply.github.com>
1 parent b7d7a14 commit dcac4cc

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

docs/JSON-RPC.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ Results:
131131

132132
### jamulus/pollServerList
133133

134-
Request list of servers in a directory
134+
Request list of servers in a directory.
135135

136136
Parameters:
137137

138138
| Name | Type | Description |
139139
| --- | --- | --- |
140-
| params.directory | string | socket address of directory to query, e.g. anygenre1.jamulus.io:22124. |
140+
| params.directory | string | Socket address of directory to query. Example: anygenre1.jamulus.io:22124. |
141141

142142
Results:
143143

@@ -167,7 +167,7 @@ Results:
167167
| result.country | string | The musician’s country. |
168168
| result.city | string | The musician’s city. |
169169
| result.instrumentId | number | The musician’s instrument ID (see CInstPictures::GetTable). |
170-
| result.instrument | string | The musician’s instrument. |
170+
| result.instrument | number | The musician’s instrument. |
171171
| result.skillLevel | string | Your skill level (beginner, intermediate, expert, or null). |
172172

173173

@@ -500,7 +500,7 @@ Parameters:
500500

501501
| Name | Type | Description |
502502
| --- | --- | --- |
503-
| params.state | number | The recorder state |
503+
| params.state | number | The recorder state. |
504504

505505

506506
### jamulusclient/serverInfoReceived
@@ -511,9 +511,9 @@ Parameters:
511511

512512
| Name | Type | Description |
513513
| --- | --- | --- |
514-
| params.address | string | The server socket address |
515-
| params.pingtime | number | The round-trip ping time in ms |
516-
| params.numClients | number | The quantity of clients connected to the server |
514+
| params.address | string | The server socket address. |
515+
| params.pingtime | number | The round-trip ping time, in milliseconds. |
516+
| params.numClients | number | The number of clients connected to the server. |
517517

518518

519519
### jamulusclient/serverListReceived
@@ -525,10 +525,10 @@ Parameters:
525525
| Name | Type | Description |
526526
| --- | --- | --- |
527527
| params.servers | array | The server list. |
528-
| params.servers[*].address | string | Socket address (ip_address:port) |
529-
| params.servers[*].name | string | Server name |
528+
| params.servers[*].address | string | Socket address (ip_address:port). |
529+
| params.servers[*].name | string | Server name. |
530530
| params.servers[*].countryId | number | Server country ID (see QLocale::Country). |
531-
| params.servers[*].country | string | Server country |
532-
| params.servers[*].city | string | Server city |
531+
| params.servers[*].country | string | Server country. |
532+
| params.servers[*].city | string | Server city. |
533533

534534

src/clientrpc.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
101101
/// @rpc_notification jamulusclient/serverListReceived
102102
/// @brief Emitted when the server list is received.
103103
/// @param {array} params.servers - The server list.
104-
/// @param {string} params.servers[*].address - Socket address (ip_address:port)
105-
/// @param {string} params.servers[*].name - Server name
104+
/// @param {string} params.servers[*].address - Socket address (ip_address:port).
105+
/// @param {string} params.servers[*].name - Server name.
106106
/// @param {number} params.servers[*].countryId - Server country ID (see QLocale::Country).
107-
/// @param {string} params.servers[*].country - Server country
108-
/// @param {string} params.servers[*].city - Server city
107+
/// @param {string} params.servers[*].country - Server country.
108+
/// @param {string} params.servers[*].city - Server city.
109109
connect ( pClient->getConnLessProtocol(),
110110
&CProtocol::CLServerListReceived,
111111
[=] ( CHostAddress /* unused */, CVector<CServerInfo> vecServerInfo ) {
@@ -130,9 +130,9 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
130130

131131
/// @rpc_notification jamulusclient/serverInfoReceived
132132
/// @brief Emitted when a server info is received.
133-
/// @param {string} params.address - The server socket address
134-
/// @param {number} params.pingtime - The round-trip ping time in ms
135-
/// @param {number} params.numClients - The quantity of clients connected to the server
133+
/// @param {string} params.address - The server socket address.
134+
/// @param {number} params.pingtime - The round-trip ping time, in milliseconds.
135+
/// @param {number} params.numClients - The number of clients connected to the server.
136136
connect ( pClient, &CClient::CLPingTimeWithNumClientsReceived, [=] ( CHostAddress InetAddr, int iPingTime, int iNumClients ) {
137137
pRpcServer->BroadcastNotification (
138138
"jamulusclient/serverInfoReceived",
@@ -145,15 +145,15 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
145145
connect ( pClient, &CClient::Disconnected, [=]() { pRpcServer->BroadcastNotification ( "jamulusclient/disconnected", QJsonObject{} ); } );
146146

147147
/// @rpc_notification jamulusclient/recorderState
148-
/// @brief Emitted when the client is connected to a server who's recorder state changes.
149-
/// @param {number} params.state - The recorder state
148+
/// @brief Emitted when the client is connected to a server whose recorder state changes.
149+
/// @param {number} params.state - The recorder state.
150150
connect ( pClient, &CClient::RecorderStateReceived, [=] ( const ERecorderState newRecorderState ) {
151151
pRpcServer->BroadcastNotification ( "jamulusclient/recorderState", QJsonObject{ { "state", newRecorderState } } );
152152
} );
153153

154154
/// @rpc_method jamulus/pollServerList
155-
/// @brief Request list of servers in a directory
156-
/// @param {string} params.directory - socket address of directory to query, e.g. anygenre1.jamulus.io:22124.
155+
/// @brief Request list of servers in a directory.
156+
/// @param {string} params.directory - Socket address of directory to query. Example: anygenre1.jamulus.io:22124.
157157
/// @result {string} result - "ok" or "error" if bad arguments.
158158
pRpcServer->HandleMethod ( "jamulusclient/pollServerList", [=] ( const QJsonObject& params, QJsonObject& response ) {
159159
auto jsonDirectoryIp = params["directory"];

0 commit comments

Comments
 (0)