diff --git a/src/raspberrypi/rascsi_interface.proto b/src/raspberrypi/rascsi_interface.proto index 820267e8..77ba1ddf 100644 --- a/src/raspberrypi/rascsi_interface.proto +++ b/src/raspberrypi/rascsi_interface.proto @@ -174,7 +174,7 @@ message PbOperationParameter { // The list of parameters supported by an operation message PbOperationMetaData { // The operation name at the time the server-side protobuf code was generated. - string name = 1; + string server_side_name = 1; // Optional short localized description, key is the lower case locale (e.g. en, de). // Falling back to "en" is recommended if a description for a particular language is missing. map description = 2; diff --git a/src/raspberrypi/rascsi_response.cpp b/src/raspberrypi/rascsi_response.cpp index 3562fca1..0df85d66 100644 --- a/src/raspberrypi/rascsi_response.cpp +++ b/src/raspberrypi/rascsi_response.cpp @@ -467,7 +467,7 @@ PbOperationInfo *RascsiResponse::GetOperationInfo(PbResult& result) void RascsiResponse::CreateOperation(PbOperationInfo *operation_info, PbOperationMetaData *meta_data, const PbOperation& operation, const string& description) { - meta_data->set_name(PbOperation_Name(operation)); + meta_data->set_server_side_name(PbOperation_Name(operation)); (*meta_data->mutable_description())["en"] = description; int ordinal = PbOperation_descriptor()->FindValueByName(PbOperation_Name(operation))->index(); (*operation_info->mutable_operations())[ordinal] = *meta_data; diff --git a/src/raspberrypi/rasctl_display.cpp b/src/raspberrypi/rasctl_display.cpp index 7edcdf4c..61e22153 100644 --- a/src/raspberrypi/rasctl_display.cpp +++ b/src/raspberrypi/rasctl_display.cpp @@ -279,7 +279,7 @@ void RasctlDisplay::DisplayOperationInfo(const PbOperationInfo& operation_info) const map operations = { operation_info.operations().begin(), operation_info.operations().end() }; // Copies result into a map sorted by operation name - PbOperationMetaData *unknown_operation = new PbOperationMetaData(); + const PbOperationMetaData *unknown_operation = new PbOperationMetaData(); map sorted_operations; for (const auto& operation : operations) { if (PbOperation_IsValid(static_cast(operation.first))) { @@ -287,13 +287,13 @@ void RasctlDisplay::DisplayOperationInfo(const PbOperationInfo& operation_info) } else { // If the server-side operation is unknown for the client use the server-provided operation name - sorted_operations[operation.second.name()] = *unknown_operation; + sorted_operations[operation.second.server_side_name()] = *unknown_operation; } } cout << "Remote operations supported by rascsi and their parameters:" << endl; for (const auto& operation : sorted_operations) { - if (!operation.second.name().empty()) { + if (!operation.second.server_side_name().empty()) { cout << " " << operation.first; if (!operation.second.description().empty()) { cout << " (" << operation.second.description().at("en") << ")";