Merge pull request #4775 from jmarshallnz/empty_episode_playcount
[vuplus_xbmc] / xbmc / interfaces / IAnnouncer.h
1 #pragma once
2 /*
3  *      Copyright (C) 2005-2013 Team XBMC
4  *      http://xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, see
18  *  <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 class CVariant;
23 namespace ANNOUNCEMENT
24 {
25   enum AnnouncementFlag
26   {
27     Player        = 0x001,
28     Playlist      = 0x002,
29     GUI           = 0x004,
30     System        = 0x008,
31     VideoLibrary  = 0x010,
32     AudioLibrary  = 0x020,
33     Application   = 0x040,
34     Input         = 0x080,
35     PVR           = 0x100,
36     Other         = 0x200
37   };
38
39   #define ANNOUNCE_ALL (Player | Playlist | GUI | System | VideoLibrary | AudioLibrary | Application | Input | ANNOUNCEMENT::PVR | Other)
40
41   /*!
42     \brief Returns a string representation for the 
43     given AnnouncementFlag
44     \param notification Specific AnnouncementFlag
45     \return String representation of the given AnnouncementFlag
46     */
47   inline const char *AnnouncementFlagToString(const AnnouncementFlag &notification)
48   {
49     switch (notification)
50     {
51     case Player:
52       return "Player";
53     case Playlist:
54       return "Playlist";
55     case GUI:
56       return "GUI";
57     case System:
58       return "System";
59     case VideoLibrary:
60       return "VideoLibrary";
61     case AudioLibrary:
62       return "AudioLibrary";
63     case Application:
64       return "Application";
65     case Input:
66       return "Input";
67     case PVR:
68       return "PVR";
69     case Other:
70       return "Other";
71     default:
72       return "Unknown";
73     }
74   }
75
76   class IAnnouncer
77   {
78   public:
79     IAnnouncer() { };
80     virtual ~IAnnouncer() { };
81     virtual void Announce(AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data) = 0;
82   };
83 }