MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / DeleteLobby

Method DeleteLobby

source/application/discord/lobby_manager.cpp:205–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void LobbyManager::DeleteLobby(LobbyId lobbyId, std::function<void(Result)> callback)
206{
207 static auto wrapper = [](void* callbackData, EDiscordResult result) -> void {
208 std::unique_ptr<std::function<void(Result)>> cb(
209 reinterpret_cast<std::function<void(Result)>*>(callbackData));
210 if (!cb || !(*cb)) {
211 return;
212 }
213 (*cb)(static_cast<Result>(result));
214 };
215 std::unique_ptr<std::function<void(Result)>> cb{};
216 cb.reset(new std::function<void(Result)>(std::move(callback)));
217 internal_->delete_lobby(internal_, lobbyId, cb.release(), wrapper);
218}
219
220void LobbyManager::ConnectLobby(LobbyId lobbyId,
221 LobbySecret secret,

Callers 2

setJoinLocationMethod · 0.80

Calls 2

releaseMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected