Skip to content

Commit

Permalink
Rename RpcMessage::toToRpcFrame() to RpcMessage::toRpcFrame()
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Nov 5, 2024
1 parent 2ceb06d commit 093233c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libshvchainpack/include/shv/chainpack/rpcmessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class SHVCHAINPACK_DECL_EXPORT RpcMessage
std::string toCpon() const;
std::string toChainPack() const;

RpcFrame toToRpcFrame(Rpc::ProtocolType protocol = Rpc::ProtocolType::ChainPack) const;
RpcFrame toRpcFrame(Rpc::ProtocolType protocol = Rpc::ProtocolType::ChainPack) const;

const RpcValue::MetaData& metaData() const;
RpcValue metaValue(RpcValue::Int key) const;
Expand Down
4 changes: 2 additions & 2 deletions libshvchainpack/src/rpcdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RpcDriver::~RpcDriver() = default;

void RpcDriver::sendRpcMessage(const RpcMessage &msg)
{
RpcDriver::sendRpcFrame(msg.toToRpcFrame(m_clientProtocolType));
RpcDriver::sendRpcFrame(msg.toRpcFrame(m_clientProtocolType));
}

void RpcDriver::sendRpcFrame(RpcFrame &&frame)
Expand All @@ -46,7 +46,7 @@ void RpcDriver::sendRpcFrame(RpcFrame &&frame)
if (!errmsg.empty()) {
throw std::runtime_error("Cannot convert RPC frame to message: " + errmsg);
}
frame = msg.toToRpcFrame(m_clientProtocolType);
frame = msg.toRpcFrame(m_clientProtocolType);
}
auto frame_data = frame.toFrameData();
//logRpcData().nospace() << "FRAME DATA WRITE " << frame_data.size() << " bytes of data:\n" << shv::chainpack::utils::hexDump(frame_data);
Expand Down
2 changes: 1 addition & 1 deletion libshvchainpack/src/rpcmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ std::string RpcMessage::toChainPack() const
return m_value.toChainPack();
}

RpcFrame RpcMessage::toToRpcFrame(Rpc::ProtocolType protocol) const
RpcFrame RpcMessage::toRpcFrame(Rpc::ProtocolType protocol) const
{
auto val = m_value;
auto meta = val.takeMeta();
Expand Down
4 changes: 2 additions & 2 deletions libshviotqt/tests/test_frame_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ vector<string> msg_to_raw_data(const vector<string> &cpons)
auto rv = RpcValue::fromCpon(cpon);
auto msg = RpcMessage(rv);
StreamFrameWriter wr;
wr.addFrame(msg.toToRpcFrame().toFrameData());
wr.addFrame(msg.toRpcFrame().toFrameData());
QByteArray ba;
{
QBuffer buffer(&ba);
Expand All @@ -54,7 +54,7 @@ vector<string> msg_to_raw_data_serial(const vector<string> &cpons, SerialFrameWr
auto rv = RpcValue::fromCpon(cpon);
auto msg = RpcMessage(rv);
SerialFrameWriter wr(crc_check);
wr.addFrame(msg.toToRpcFrame().toFrameData());
wr.addFrame(msg.toRpcFrame().toFrameData());
QByteArray ba;
{
QBuffer buffer(&ba);
Expand Down

0 comments on commit 093233c

Please sign in to comment.