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

Method checkWhetherIdle

cli/application.cpp:1096–1123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1094}
1095
1096bool Application::checkWhetherIdle() const
1097{
1098 for (const RelevantDir &dir : m_relevantDirs) {
1099 switch (dir.dirObj->status) {
1100 case SyncthingDirStatus::Unknown:
1101 case SyncthingDirStatus::Idle:
1102 break;
1103 default:
1104 return false;
1105 }
1106 }
1107 for (const SyncthingDev *dev : m_relevantDevs) {
1108 switch (dev->status) {
1109 case SyncthingDevStatus::Unknown:
1110 case SyncthingDevStatus::Disconnected:
1111 if (m_args.requireDevsConnected.isPresent()) {
1112 return false;
1113 }
1114 break;
1115 case SyncthingDevStatus::ThisDevice:
1116 case SyncthingDevStatus::Idle:
1117 break;
1118 default:
1119 return false;
1120 }
1121 }
1122 return true;
1123}
1124
1125void Application::checkPwdOperationPresent(const ArgumentOccurrence &occurrence)
1126{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected