2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
27 class CPluginSource : public CAddon
31 enum Content { UNKNOWN, AUDIO, IMAGE, EXECUTABLE, VIDEO };
33 CPluginSource(const cp_extension_t *ext);
34 CPluginSource(const AddonProps &props);
35 virtual ~CPluginSource() {}
36 virtual AddonPtr Clone() const;
37 virtual bool IsType(TYPE type) const;
38 bool Provides(const Content& content) const
40 return content == UNKNOWN ? false : m_providedContent.count(content) > 0;
43 bool ProvidesSeveral() const
45 return m_providedContent.size() > 1;
48 static Content Translate(const CStdString &content);
50 /*! \brief Set the provided content for this plugin
51 If no valid content types are passed in, we set the EXECUTABLE type
52 \param content a space-separated list of content types
54 void SetProvides(const CStdString &content);
55 std::set<Content> m_providedContent;