2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "settings/lib/ISettingCallback.h"
12 #include "utils/InfoLoader.h"
16 #define WEATHER_LABEL_LOCATION 10
17 #define WEATHER_IMAGE_CURRENT_ICON 21
18 #define WEATHER_LABEL_CURRENT_COND 22
19 #define WEATHER_LABEL_CURRENT_TEMP 23
20 #define WEATHER_LABEL_CURRENT_FEEL 24
21 #define WEATHER_LABEL_CURRENT_UVID 25
22 #define WEATHER_LABEL_CURRENT_WIND 26
23 #define WEATHER_LABEL_CURRENT_DEWP 27
24 #define WEATHER_LABEL_CURRENT_HUMI 28
26 static const std::string ICON_ADDON_PATH
= "resource://resource.images.weathericons.default";
31 std::string m_overview
;
42 ForecastDay forecast
[NUM_DAYS
];
46 lastUpdateTime
.clear();
48 currentConditions
.clear();
49 currentTemperature
.clear();
50 currentFeelsLike
.clear();
52 currentHumidity
.clear();
53 currentUVIndex
.clear();
54 currentDewPoint
.clear();
56 for (ForecastDay
& f
: forecast
)
66 std::string lastUpdateTime
;
68 std::string currentIcon
;
69 std::string currentConditions
;
70 std::string currentTemperature
;
71 std::string currentFeelsLike
;
72 std::string currentUVIndex
;
73 std::string currentWind
;
74 std::string currentDewPoint
;
75 std::string currentHumidity
;
76 std::string busyString
;
81 : public CInfoLoader
, public ISettingCallback
84 CWeatherManager(void);
85 ~CWeatherManager(void) override
;
86 static bool GetSearchResults(const std::string
&strSearch
, std::string
&strResult
);
88 std::string
GetLocation(int iLocation
);
89 const std::string
& GetLastUpdateTime() const { return m_info
.lastUpdateTime
; }
90 const ForecastDay
&GetForecast(int day
) const;
94 void SetArea(int iLocation
);
97 CJob
*GetJob() const override
;
98 std::string
TranslateInfo(int info
) const override
;
99 std::string
BusyInfo(int info
) const override
;
100 void OnJobComplete(unsigned int jobID
, bool success
, CJob
*job
) override
;
102 void OnSettingChanged(const std::shared_ptr
<const CSetting
>& setting
) override
;
103 void OnSettingAction(const std::shared_ptr
<const CSetting
>& setting
) override
;