diff --git a/pw_rpc/nanopb/public/pw_rpc/nanopb/client_reader_writer.h b/pw_rpc/nanopb/public/pw_rpc/nanopb/client_reader_writer.h index 3af256cff7..a5d3cfac1a 100644 --- a/pw_rpc/nanopb/public/pw_rpc/nanopb/client_reader_writer.h +++ b/pw_rpc/nanopb/public/pw_rpc/nanopb/client_reader_writer.h @@ -43,7 +43,7 @@ class NanopbUnaryResponseClientCall : public UnaryResponseClientCall { CallType call( client.ClaimLocked(), channel_id, service_id, method_id, serde); - call.set_on_completed_locked(std::move(on_completed)); + call.set_nanopb_on_completed_locked(std::move(on_completed)); call.set_on_error_locked(std::move(on_error)); if constexpr (sizeof...(Request) == 0u) { @@ -78,7 +78,7 @@ class NanopbUnaryResponseClientCall : public UnaryResponseClientCall { LockGuard lock(rpc_lock()); MoveUnaryResponseClientCallFrom(other); serde_ = other.serde_; - set_on_completed_locked(std::move(other.nanopb_on_completed_)); + set_nanopb_on_completed_locked(std::move(other.nanopb_on_completed_)); return *this; } @@ -86,7 +86,7 @@ class NanopbUnaryResponseClientCall : public UnaryResponseClientCall { Function&& on_completed) PW_LOCKS_EXCLUDED(rpc_lock()) { LockGuard lock(rpc_lock()); - set_on_completed_locked(std::move(on_completed)); + set_nanopb_on_completed_locked(std::move(on_completed)); } Status SendClientStream(const void* payload) PW_LOCKS_EXCLUDED(rpc_lock()) { @@ -95,7 +95,7 @@ class NanopbUnaryResponseClientCall : public UnaryResponseClientCall { } private: - void set_on_completed_locked( + void set_nanopb_on_completed_locked( Function&& on_completed) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { nanopb_on_completed_ = std::move(on_completed); @@ -142,7 +142,7 @@ class NanopbStreamResponseClientCall : public StreamResponseClientCall { CallType call( client.ClaimLocked(), channel_id, service_id, method_id, serde); - call.set_on_next_locked(std::move(on_next)); + call.set_nanopb_on_next_locked(std::move(on_next)); call.set_on_completed_locked(std::move(on_completed)); call.set_on_error_locked(std::move(on_error)); @@ -167,7 +167,7 @@ class NanopbStreamResponseClientCall : public StreamResponseClientCall { LockGuard lock(rpc_lock()); MoveStreamResponseClientCallFrom(other); serde_ = other.serde_; - set_on_next_locked(std::move(other.nanopb_on_next_)); + set_nanopb_on_next_locked(std::move(other.nanopb_on_next_)); return *this; } @@ -190,11 +190,12 @@ class NanopbStreamResponseClientCall : public StreamResponseClientCall { void set_on_next(Function&& on_next) PW_LOCKS_EXCLUDED(rpc_lock()) { LockGuard lock(rpc_lock()); - set_on_next_locked(std::move(on_next)); + set_nanopb_on_next_locked(std::move(on_next)); } private: - void set_on_next_locked(Function&& on_next) + void set_nanopb_on_next_locked( + Function&& on_next) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { nanopb_on_next_ = std::move(on_next); diff --git a/pw_rpc/nanopb/public/pw_rpc/nanopb/server_reader_writer.h b/pw_rpc/nanopb/public/pw_rpc/nanopb/server_reader_writer.h index fd931c4565..02cd8dfb88 100644 --- a/pw_rpc/nanopb/public/pw_rpc/nanopb/server_reader_writer.h +++ b/pw_rpc/nanopb/public/pw_rpc/nanopb/server_reader_writer.h @@ -103,18 +103,19 @@ class BaseNanopbServerReader : public NanopbServerCall { PW_LOCKS_EXCLUDED(rpc_lock()) { internal::LockGuard lock(internal::rpc_lock()); MoveNanopbServerCallFrom(other); - set_on_next_locked(std::move(other.nanopb_on_next_)); + set_nanopb_on_next_locked(std::move(other.nanopb_on_next_)); return *this; } void set_on_next(Function&& on_next) PW_LOCKS_EXCLUDED(rpc_lock()) { internal::LockGuard lock(internal::rpc_lock()); - set_on_next_locked(std::move(on_next)); + set_nanopb_on_next_locked(std::move(on_next)); } private: - void set_on_next_locked(Function&& on_next) + void set_nanopb_on_next_locked( + Function&& on_next) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { nanopb_on_next_ = std::move(on_next); diff --git a/pw_rpc/pwpb/public/pw_rpc/pwpb/client_reader_writer.h b/pw_rpc/pwpb/public/pw_rpc/pwpb/client_reader_writer.h index 8da82f25c6..a03bd4671e 100644 --- a/pw_rpc/pwpb/public/pw_rpc/pwpb/client_reader_writer.h +++ b/pw_rpc/pwpb/public/pw_rpc/pwpb/client_reader_writer.h @@ -48,7 +48,7 @@ class PwpbUnaryResponseClientCall : public UnaryResponseClientCall { CallType call( client.ClaimLocked(), channel_id, service_id, method_id, serde); - call.set_on_completed_locked(std::move(on_completed)); + call.set_pwpb_on_completed_locked(std::move(on_completed)); call.set_on_error_locked(std::move(on_error)); if constexpr (sizeof...(Request) == 0u) { @@ -95,14 +95,14 @@ class PwpbUnaryResponseClientCall : public UnaryResponseClientCall { PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { MoveUnaryResponseClientCallFrom(other); serde_ = other.serde_; - set_on_completed_locked(std::move(other.pwpb_on_completed_)); + set_pwpb_on_completed_locked(std::move(other.pwpb_on_completed_)); } void set_on_completed( Function&& on_completed) PW_LOCKS_EXCLUDED(rpc_lock()) { LockGuard lock(rpc_lock()); - set_on_completed_locked(std::move(on_completed)); + set_pwpb_on_completed_locked(std::move(on_completed)); } // Sends a streamed request. @@ -122,7 +122,7 @@ class PwpbUnaryResponseClientCall : public UnaryResponseClientCall { } private: - void set_on_completed_locked( + void set_pwpb_on_completed_locked( Function&& on_completed) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { pwpb_on_completed_ = std::move(on_completed); @@ -175,7 +175,7 @@ class PwpbStreamResponseClientCall : public StreamResponseClientCall { CallType call( client.ClaimLocked(), channel_id, service_id, method_id, serde); - call.set_on_next_locked(std::move(on_next)); + call.set_pwpb_on_next_locked(std::move(on_next)); call.set_on_completed_locked(std::move(on_completed)); call.set_on_error_locked(std::move(on_error)); @@ -222,13 +222,13 @@ class PwpbStreamResponseClientCall : public StreamResponseClientCall { PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { MoveStreamResponseClientCallFrom(other); serde_ = other.serde_; - set_on_next_locked(std::move(other.pwpb_on_next_)); + set_pwpb_on_next_locked(std::move(other.pwpb_on_next_)); } void set_on_next(Function&& on_next) PW_LOCKS_EXCLUDED(rpc_lock()) { LockGuard lock(rpc_lock()); - set_on_next_locked(std::move(on_next)); + set_pwpb_on_next_locked(std::move(on_next)); } // Sends a streamed request. @@ -248,7 +248,8 @@ class PwpbStreamResponseClientCall : public StreamResponseClientCall { } private: - void set_on_next_locked(Function&& on_next) + void set_pwpb_on_next_locked( + Function&& on_next) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { pwpb_on_next_ = std::move(on_next); diff --git a/pw_rpc/pwpb/public/pw_rpc/pwpb/server_reader_writer.h b/pw_rpc/pwpb/public/pw_rpc/pwpb/server_reader_writer.h index b365cf9f24..1bc1b5977c 100644 --- a/pw_rpc/pwpb/public/pw_rpc/pwpb/server_reader_writer.h +++ b/pw_rpc/pwpb/public/pw_rpc/pwpb/server_reader_writer.h @@ -155,17 +155,17 @@ class BasePwpbServerReader : public PwpbServerCall { void MoveBasePwpbServerReaderFrom(BasePwpbServerReader& other) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { MovePwpbServerCallFrom(other); - set_on_next_locked(std::move(other.pwpb_on_next_)); + set_pwpb_on_next_locked(std::move(other.pwpb_on_next_)); } void set_on_next(Function&& on_next) PW_LOCKS_EXCLUDED(rpc_lock()) { LockGuard lock(rpc_lock()); - set_on_next_locked(std::move(on_next)); + set_pwpb_on_next_locked(std::move(on_next)); } private: - void set_on_next_locked(Function&& on_next) + void set_pwpb_on_next_locked(Function&& on_next) PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) { pwpb_on_next_ = std::move(on_next);