MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / printDev

Method printDev

cli/application.cpp:650–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648}
649
650void Application::printDev(const SyncthingDev *dev) const
651{
652 cout << " - " << TextAttribute::Bold << dev->name.toLocal8Bit().data() << '\n' << TextAttribute::Reset;
653 printProperty("ID", dev->id);
654 printProperty("Status", dev->statusString());
655 printProperty("Addresses", dev->addresses);
656 printProperty("Compression", dev->compression);
657 printProperty("Cert name", dev->certName);
658 printProperty("Connection address", dev->connectionAddress);
659 printProperty("Connection type", dev->connectionType);
660 printProperty("Connection local", dev->connectionLocal);
661 printProperty("Client version", dev->clientVersion);
662 printProperty("Last seen", dev->lastSeen);
663 if (dev->totalIncomingTraffic > 0) {
664 printProperty("Incoming traffic", dataSizeToString(static_cast<std::uint64_t>(dev->totalIncomingTraffic)).data());
665 }
666 if (dev->totalOutgoingTraffic > 0) {
667 printProperty("Outgoing traffic", dataSizeToString(static_cast<std::uint64_t>(dev->totalOutgoingTraffic)).data());
668 }
669 cout << '\n';
670}
671
672void Application::printStatus(const ArgumentOccurrence &)
673{

Callers

nothing calls this directly

Calls 3

printPropertyFunction · 0.85
dataMethod · 0.45
statusStringMethod · 0.45

Tested by

no test coverage detected