xbmc
GUIDialogSongInfo.h
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 "FileItem.h"
12 #include "guilib/GUIDialog.h"
13 #include "threads/Event.h"
14 
15 #include <memory>
16 
18  public CGUIDialog
19 {
20 public:
21  CGUIDialogSongInfo(void);
22  ~CGUIDialogSongInfo(void) override;
23  bool OnMessage(CGUIMessage& message) override;
24  bool SetSong(CFileItem* item);
25  void SetArtTypeList(CFileItemList& artlist);
26  bool OnAction(const CAction& action) override;
27  bool OnBack(int actionID) override;
28  bool HasUpdatedUserrating() const { return m_hasUpdatedUserrating; }
29 
30  bool HasListItems() const override { return true; }
31  CFileItemPtr GetCurrentListItem(int offset = 0) override;
32  std::string GetContent();
33  //const CFileItemList& CurrentDirectory() const { return m_artTypeList; }
34  bool IsCancelled() const { return m_cancelled; }
35  void FetchComplete();
36 
37  static void ShowFor(CFileItem* pItem);
38 protected:
39  void OnInitWindow() override;
40  void Update();
41  void OnGetArt();
42  void SetUserrating(int userrating);
43  void OnSetUserrating();
44  void OnPlaySong(const std::shared_ptr<CFileItem>& item);
45 
46  CFileItemPtr m_song;
47  CFileItemList m_artTypeList;
48  CEvent m_event;
49  int m_startUserrating;
50  bool m_cancelled;
51  bool m_hasUpdatedUserrating;
52  long m_albumId = -1;
53 
54 };
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
Represents a list of files.
Definition: FileItem.h:713
void OnGetArt()
Definition: GUIDialogSongInfo.cpp:333
void OnInitWindow() override
Called on window open.
Definition: GUIDialogSongInfo.cpp:233
Definition: GUIDialogSongInfo.h:17
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUIDialog.h:35
Definition: GUIMessage.h:365
Represents a file on a share.
Definition: FileItem.h:102