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 "guilib/GUIDialog.h"
12 #include "video/VideoDatabase.h"
13 #include "view/GUIViewControl.h"
17 class CGUIDialogVideoBookmarks
: public CGUIDialog
20 CGUIDialogVideoBookmarks(void);
21 ~CGUIDialogVideoBookmarks(void) override
;
22 bool OnMessage(CGUIMessage
& message
) override
;
23 void OnWindowLoaded() override
;
24 void OnWindowUnload() override
;
25 bool OnAction(const CAction
&action
) override
;
28 \brief Creates a bookmark of the currently playing video file.
30 NOTE: sends a GUI_MSG_REFRESH_LIST message to DialogVideoBookmark on success
31 \return True if creation of bookmark was successful
32 \sa OnAddEpisodeBookmark
34 static bool OnAddBookmark();
37 \brief Creates an episode bookmark of the currently playing file
39 An episode bookmark specifies the end/beginning of episodes on files like: S01E01E02
40 Fails if the current video isn't a multi-episode file
41 NOTE: sends a GUI_MSG_REFRESH_LIST message to DialogVideoBookmark on success
42 \return True, if bookmark was successfully created
45 static bool OnAddEpisodeBookmark();
50 void GotoBookmark(int iItem
);
51 void ClearBookmarks();
52 static bool AddEpisodeBookmark();
53 static bool AddBookmark(CVideoInfoTag
*tag
=NULL
);
54 void Delete(int item
);
57 void OnPopupMenu(int item
);
58 CGUIControl
*GetFirstFocusableControl(int id
) override
;
60 CFileItemList
* m_vecItems
;
61 CGUIViewControl m_viewControl
;
62 VECBOOKMARKS m_bookmarks
;
65 std::string m_filePath
;
66 CCriticalSection m_refreshSection
;