MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / QueueCheckTypeGroupGVariant

Method QueueCheckTypeGroupGVariant

src/common/requiresqueue.cpp:412–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410
411
412GVariant *RequiresQueue::QueueCheckTypeGroupGVariant() const noexcept
413{
414 // Convert the std::vector to a GVariant based array GDBus can use
415 // as the method call response
416 std::vector<std::tuple<ClientAttentionType, ClientAttentionGroup>> qchk_res = QueueCheckTypeGroup();
417
418 GVariantBuilder *bld = glib2::Builder::Create("a(uu)");
419 for (auto &e : qchk_res)
420 {
421 ClientAttentionType type;
422 ClientAttentionGroup group;
423 std::tie(type, group) = e;
424 glib2::Builder::Add(bld,
425 g_variant_new("(uu)",
426 static_cast<uint32_t>(type),
427 static_cast<uint32_t>(group)));
428 }
429 callbacks.RunCallback(CallbackType::CHECK_TYPE_GROUP);
430 return glib2::Builder::FinishWrapped(bld);
431}
432
433
434std::vector<uint32_t> RequiresQueue::QueueCheck(ClientAttentionType type,

Callers 1

QueueSetupMethod · 0.95

Calls 1

RunCallbackMethod · 0.80

Tested by

no test coverage detected