[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / video / dialogs / GUIDialogVideoBookmarks.h
blob801afcdd3736756c302231b6c2d80d1b13168a93
1 /*
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.
7 */
9 #pragma once
11 #include "guilib/GUIDialog.h"
12 #include "utils/JobManager.h"
13 #include "video/VideoDatabase.h"
14 #include "view/GUIViewControl.h"
16 class CFileItemList;
18 class CGUIDialogVideoBookmarks : public CGUIDialog, public CJobQueue
20 typedef std::map<CJob*, unsigned int> MAPJOBSCHAPS;
22 public:
23 CGUIDialogVideoBookmarks(void);
24 ~CGUIDialogVideoBookmarks(void) override;
25 bool OnMessage(CGUIMessage& message) override;
26 void OnWindowLoaded() override;
27 void OnWindowUnload() override;
28 bool OnAction(const CAction &action) override;
30 /*!
31 \brief Creates a bookmark of the currently playing video file.
33 NOTE: sends a GUI_MSG_REFRESH_LIST message to DialogVideoBookmark on success
34 \return True if creation of bookmark was successful
35 \sa OnAddEpisodeBookmark
37 static bool OnAddBookmark();
39 /*!
40 \brief Creates an episode bookmark of the currently playing file
42 An episode bookmark specifies the end/beginning of episodes on files like: S01E01E02
43 Fails if the current video isn't a multi-episode file
44 NOTE: sends a GUI_MSG_REFRESH_LIST message to DialogVideoBookmark on success
45 \return True, if bookmark was successfully created
46 \sa OnAddBookmark
47 **/
48 static bool OnAddEpisodeBookmark();
51 void Update();
52 protected:
53 void GotoBookmark(int iItem);
54 void ClearBookmarks();
55 static bool AddEpisodeBookmark();
56 static bool AddBookmark(CVideoInfoTag *tag=NULL);
57 void Delete(int item);
58 void Clear();
59 void OnRefreshList();
60 void OnPopupMenu(int item);
61 CGUIControl *GetFirstFocusableControl(int id) override;
63 void OnJobComplete(unsigned int jobID, bool success, CJob* job) override;
65 CFileItemList* m_vecItems;
66 CGUIViewControl m_viewControl;
67 VECBOOKMARKS m_bookmarks;
69 private:
70 void UpdateItem(unsigned int chapterIdx);
72 int m_jobsStarted;
73 std::string m_filePath;
74 CCriticalSection m_refreshSection;
75 MAPJOBSCHAPS m_mapJobsChapter;