Debian Codegraph @

src/playlistmanager/file/KConfigSyncRelStore.h

raw
1 /****************************************************************************************
2 * Copyright (c) 2010 Bart Cerneels <[email protected]> *
3 * Copyright (c) 2011 Lucas Lira Gomes <[email protected]> *
4 * *
5 * This program is free software; you can redistribute it and/or modify it under *
6 * the terms of the GNU General Public License as published by the Free Software *
7 * Foundation; either version 2 of the License, or (at your option) any later *
8 * version. *
9 * *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY *
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
12 * PARTICULAR PURPOSE. See the GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License along with *
15 * this program. If not, see <http://www.gnu.org/licenses/>. *
16 ****************************************************************************************/
17 #ifndef KCONFIGSYNCRELSTORE_H
18 #define KCONFIGSYNCRELSTORE_H
19
20 #include "playlistmanager/SyncRelationStorage.h"
21
22 #include <QMap>
23
24 class KConfigGroup;
25
26 class KConfigSyncRelStore : public SyncRelationStorage
27 {
28 public:
29 KConfigSyncRelStore();
30
31 ~KConfigSyncRelStore() override;
32
33 void addSync( const Playlists::PlaylistPtr master, const Playlists::PlaylistPtr slave ) override;
34 bool hasToSync( Playlists::PlaylistPtr master, Playlists::PlaylistPtr slave ) const override;
35 SyncedPlaylistPtr asSyncedPlaylist( const Playlists::PlaylistPtr playlist ) override;
36
37 private:
38 KConfigGroup syncedPlaylistsConfig() const;
39
40 QMap<QUrl,SyncedPlaylistPtr> m_syncMasterMap;
41 QMultiMap<QUrl,QUrl> m_syncSlaveMap;
42 };
43
44 #endif // KCONFIGSYNCRELSTORE_H