| 1 |
/* |
| 2 |
* Copyright (C) 2005-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "guilib/GUIWindow.h" |
| 12 |
#include "interfaces/IAnnouncer.h" |
| 13 |
#include "utils/Job.h" |
| 14 |
|
| 15 |
class CVariant; |
| 16 |
|
| 17 |
class CGUIWindowHome : |
| 18 |
public CGUIWindow, |
| 19 |
public ANNOUNCEMENT::IAnnouncer, |
| 20 |
public IJobCallback |
| 21 |
{ |
| 22 |
public: |
| 23 |
CGUIWindowHome(void); |
| 24 |
~CGUIWindowHome(void) override; |
| 25 |
void OnInitWindow() override; |
| 26 |
void Announce(ANNOUNCEMENT::AnnouncementFlag flag, |
| 27 |
const std::string& sender, |
| 28 |
const std::string& message, |
| 29 |
const CVariant& data) override; |
| 30 |
|
| 31 |
bool OnMessage(CGUIMessage& message) override; |
| 32 |
bool OnAction(const CAction &action) override; |
| 33 |
|
| 34 |
void OnJobComplete(unsigned int jobID, bool success, CJob *job) override; |
| 35 |
private: |
| 36 |
int m_updateRA; // flag for which recently added items needs to be queried |
| 37 |
void AddRecentlyAddedJobs(int flag); |
| 38 |
|
| 39 |
bool m_recentlyAddedRunning = false; |
| 40 |
int m_cumulativeUpdateFlag = 0; |
| 41 |
}; |