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 "addons/Addon.h"
12 #include "addons/AddonEvents.h"
13 #include "threads/CriticalSection.h"
17 class CService
: public CAddon
20 explicit CService(const AddonInfoPtr
& addonInfo
);
23 class CServiceAddonManager
26 explicit CServiceAddonManager(CAddonMgr
& addonMgr
);
27 ~CServiceAddonManager();
35 * Start service by add-on id.
37 void Start(const AddonPtr
& addon
);
38 void Start(const std::string
& addonId
);
46 * Stop service by add-on id.
48 void Stop(const std::string
& addonId
);
51 void OnEvent(const AddonEvent
& event
);
53 void Stop(const std::map
<std::string
, int>::value_type
& service
);
55 CAddonMgr
& m_addonMgr
;
56 CCriticalSection m_criticalSection
;
57 /** add-on id -> script id */
58 std::map
<std::string
, int> m_services
;