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

Method requestName

src/Connection.cpp:135–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void Connection::requestName(const ServiceName& name)
136{
137 SDBUS_CHECK_SERVICE_NAME(name.c_str());
138
139 auto r = sdbus_->sd_bus_request_name(bus_.get(), name.c_str(), 0);
140 SDBUS_THROW_ERROR_IF(r < 0, "Failed to request bus name", -r);
141
142 // In some cases we need to explicitly notify the event loop
143 // to process messages that may have arrived while executing the call
144 wakeUpEventLoopIfMessagesInQueue();
145}
146
147void Connection::releaseName(const ServiceName& name)
148{

Callers 8

createBusConnectionFunction · 0.80
TYPED_TESTFunction · 0.80
TESTFunction · 0.80
SetUpTestSuiteMethod · 0.80
TESTFunction · 0.80
mainFunction · 0.80

Calls 2

sd_bus_request_nameMethod · 0.80
getMethod · 0.45

Tested by 4

TYPED_TESTFunction · 0.64
TESTFunction · 0.64
SetUpTestSuiteMethod · 0.64
TESTFunction · 0.64