MCPcopy Create free account
hub / github.com/Kistler-Group/sdbus-cpp / createPlainMessage

Method createPlainMessage

src/Connection.cpp:496–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494}
495
496PlainMessage Connection::createPlainMessage() const
497{
498 sd_bus_message* sdbusMsg{};
499
500 auto r = sdbus_->sd_bus_message_new(bus_.get(), &sdbusMsg, _SD_BUS_MESSAGE_TYPE_INVALID);
501
502 SDBUS_THROW_ERROR_IF(r < 0, "Failed to create a plain message", -r);
503
504 // TODO: const_cast..? Finish the const correctness design
505 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
506 return Message::Factory::create<PlainMessage>(sdbusMsg, const_cast<Connection*>(this), adopt_message);
507}
508
509MethodCall Connection::createMethodCall( const ServiceName& destination
510 , const ObjectPath& objectPath

Callers 1

createPlainMessageFunction · 0.80

Calls 2

sd_bus_message_newMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected