Sayonara Player
src
Components
Bookmarks
BookmarkStorage.h
1
/* BookmarkStorage.h */
2
3
/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef BOOKMARK_STORAGE_H
22
#define BOOKMARK_STORAGE_H
23
24
#include "Utils/Pimpl.h"
25
#include "Bookmark.h"
26
27
class
MetaData
;
28
class
BookmarkStorage
29
{
30
PIMPL(
BookmarkStorage
)
31
32
public
:
33
enum class
CreationStatus : unsigned char
34
{
35
Success,
36
AlreadyThere,
37
NoDBTrack,
38
DBError,
39
OtherError
40
};
41
42
BookmarkStorage
();
43
BookmarkStorage
(
const
MetaData
& track);
44
45
virtual
~
BookmarkStorage
();
46
51
virtual
CreationStatus
create
(Seconds timestamp);
52
58
bool
remove
(
int
index);
59
60
const
QList<Bookmark>
& bookmarks()
const
;
61
Bookmark
bookmark(
int
index)
const
;
62
63
int
count()
const
;
64
65
void
setTrack(
const
MetaData
& track);
66
const
MetaData
& track()
const
;
67
};
68
69
#endif // BOOKMARK_STORAGE_H
BookmarkStorage::remove
bool remove(int index)
remove single bookmark from database for current track
QList
Definition:
EngineUtils.h:33
Bookmark
Definition:
Bookmark.h:32
BookmarkStorage
Definition:
BookmarkStorage.h:29
MetaData
The MetaData class.
Definition:
MetaData.h:47
BookmarkStorage::create
virtual CreationStatus create(Seconds timestamp)
create a new bookmark for current track and current position
Generated on Fri Jul 16 2021 00:00:00 for Sayonara Player by
1.8.20