MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / getWeatherSourceByStatus

Method getWeatherSourceByStatus

lib/OpenWeatherPlugin/src/OpenWeatherPlugin.cpp:700–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698}
699
700IOpenWeatherGeneric* OpenWeatherPlugin::getWeatherSourceByStatus()
701{
702 MutexGuard<MutexRecursive> guard(m_mutex);
703 IOpenWeatherGeneric* source = nullptr;
704
705 switch (m_weatherReqStatus)
706 {
707 case WEATHER_REQUEST_STATUS_IDLE:
708 source = static_cast<IOpenWeatherGeneric*>(m_sourceCurrent);
709 break;
710
711 case WEATHER_REQUEST_STATUS_CURRENT_PENDING:
712 source = static_cast<IOpenWeatherGeneric*>(m_sourceCurrent);
713 break;
714
715 case WEATHER_REQUEST_STATUS_FORECAST_REQ:
716 source = static_cast<IOpenWeatherGeneric*>(m_sourceForecast);
717 break;
718
719 case WEATHER_REQUEST_STATUS_FORECAST_PENDING:
720 source = static_cast<IOpenWeatherGeneric*>(m_sourceForecast);
721 break;
722
723 default:
724 break;
725 }
726
727 return source;
728}
729
730void OpenWeatherPlugin::weatherRequestStarted()
731{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected