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.
16 class CFileItem
; typedef std::shared_ptr
<CFileItem
> CFileItemPtr
;
26 PARTYMODECONTEXT_UNKNOWN
,
27 PARTYMODECONTEXT_MUSIC
,
28 PARTYMODECONTEXT_VIDEO
31 class CPartyModeManager final
34 CPartyModeManager(void);
36 bool Enable(PartyModeContext context
=PARTYMODECONTEXT_MUSIC
, const std::string
& strXspPath
= "");
39 void OnSongChange(bool bUpdatePlayed
= false);
40 void AddUserSongs(PLAYLIST::CPlayList
& tempList
, bool bPlay
= false);
41 void AddUserSongs(CFileItemList
& tempList
, bool bPlay
= false);
42 bool IsEnabled(PartyModeContext context
=PARTYMODECONTEXT_UNKNOWN
) const;
44 int GetMatchingSongs();
45 int GetMatchingSongsPicked();
46 int GetMatchingSongsLeft();
47 int GetRelaxedSongs();
49 PartyModeContext
GetType() const;
53 bool AddRandomSongs();
54 void Add(CFileItemPtr
&pItem
);
57 void SendUpdateMessage();
58 void OnError(int iError
, const std::string
& strLogMessage
);
62 PLAYLIST::Id
GetPlaylistId() const;
73 int m_iMatchingSongsPicked
;
74 int m_iMatchingSongsLeft
;
79 std::vector
<std::pair
<int, int>> m_songIDCache
;
82 extern CPartyModeManager g_partyModeManager
;