@@ -53,8 +53,10 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
5353 // / @param {number} params.clients[*].id - The channel ID.
5454 // / @param {string} params.clients[*].name - The musician’s name.
5555 // / @param {string} params.clients[*].skillLevel - The musician’s skill level (beginner, intermediate, expert, or null).
56+ // / @param {number} params.clients[*].countryId - The musician’s country ID (see QLocale::Country).
5657 // / @param {string} params.clients[*].country - The musician’s country.
5758 // / @param {string} params.clients[*].city - The musician’s city.
59+ // / @param {number} params.clients[*].instrumentId - The musician’s instrument ID (see CInstPictures::GetTable).
5860 // / @param {string} params.clients[*].instrument - The musician’s instrument.
5961 connect ( pClient, &CClient::ConClientListMesReceived, [=] ( CVector<CChannelInfo> vecChanInfo ) {
6062 QJsonArray arrChanInfo;
@@ -64,8 +66,10 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
6466 { " id" , chanInfo.iChanID },
6567 { " name" , chanInfo.strName },
6668 { " skillLevel" , SerializeSkillLevel ( chanInfo.eSkillLevel ) },
69+ { " countryId" , chanInfo.eCountry },
6770 { " country" , QLocale::countryToString ( chanInfo.eCountry ) },
6871 { " city" , chanInfo.strCity },
72+ { " instrumentId" , chanInfo.iInstrument },
6973 { " instrument" , CInstPictures::GetName ( chanInfo.iInstrument ) },
7074 };
7175 arrChanInfo.append ( objChanInfo );
@@ -99,6 +103,7 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
99103 // / @param {array} params.servers - The server list.
100104 // / @param {string} params.servers[*].address - Socket address (ip_address:port)
101105 // / @param {string} params.servers[*].name - Server name
106+ // / @param {number} params.servers[*].countryId - Server country ID (see QLocale::Country).
102107 // / @param {string} params.servers[*].country - Server country
103108 // / @param {string} params.servers[*].city - Server city
104109 connect ( pClient->getConnLessProtocol (),
@@ -110,6 +115,7 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
110115 QJsonObject objServerInfo{
111116 { " address" , serverInfo.HostAddr .toString () },
112117 { " name" , serverInfo.strName },
118+ { " countryId" , serverInfo.eCountry },
113119 { " country" , QLocale::countryToString ( serverInfo.eCountry ) },
114120 { " city" , serverInfo.strCity },
115121 };
@@ -199,16 +205,20 @@ CClientRpc::CClientRpc ( CClient* pClient, CRpcServer* pRpcServer, QObject* pare
199205 // / @result {number} result.id - The channel ID.
200206 // / @result {string} result.name - The musician’s name.
201207 // / @result {string} result.skillLevel - The musician’s skill level (beginner, intermediate, expert, or null).
208+ // / @result {number} result.countryId - The musician’s country ID (see QLocale::Country).
202209 // / @result {string} result.country - The musician’s country.
203210 // / @result {string} result.city - The musician’s city.
211+ // / @result {number} result.instrumentId - The musician’s instrument ID (see CInstPictures::GetTable).
204212 // / @result {number} result.instrument - The musician’s instrument.
205213 // / @result {string} result.skillLevel - Your skill level (beginner, intermediate, expert, or null).
206214 pRpcServer->HandleMethod ( " jamulusclient/getChannelInfo" , [=] ( const QJsonObject& params, QJsonObject& response ) {
207215 QJsonObject result{
208216 // TODO: We cannot include "id" here is pClient->ChannelInfo is a CChannelCoreInfo which lacks that field.
209217 { " name" , pClient->ChannelInfo .strName },
218+ { " countryId" , pClient->ChannelInfo .eCountry },
210219 { " country" , QLocale::countryToString ( pClient->ChannelInfo .eCountry ) },
211220 { " city" , pClient->ChannelInfo .strCity },
221+ { " instrumentId" , pClient->ChannelInfo .iInstrument },
212222 { " instrument" , CInstPictures::GetName ( pClient->ChannelInfo .iInstrument ) },
213223 { " skillLevel" , SerializeSkillLevel ( pClient->ChannelInfo .eSkillLevel ) },
214224 };
0 commit comments