00001 #ifndef CHANNELGROUP_H
00002 #define CHANNELGROUP_H
00003
00004
00005 #include <vector>
00006 using namespace std;
00007
00008
00009 #include <QString>
00010
00011
00012 #include "mythtvexp.h"
00013
00014 class MTV_PUBLIC ChannelGroupItem
00015 {
00016 public:
00017 ChannelGroupItem(const ChannelGroupItem &other) :
00018 grpid(other.grpid), name(other.name) {}
00019 ChannelGroupItem(const uint _grpid, const QString &_name) :
00020 grpid(_grpid), name(_name) {}
00021
00022 bool operator == (uint _grpid) const
00023 { return grpid == _grpid; }
00024
00025 ChannelGroupItem& operator=(const ChannelGroupItem&);
00026
00027 public:
00028 uint grpid;
00029 QString name;
00030 };
00031 typedef vector<ChannelGroupItem> ChannelGroupList;
00032
00035 class MTV_PUBLIC ChannelGroup
00036 {
00037 public:
00038
00039 static ChannelGroupList GetChannelGroups(bool includeEmpty = true);
00040 static bool ToggleChannel(uint chanid, int changrpid, int delete_chan);
00041 static bool AddChannel(uint chanid, int changrpid);
00042 static bool DeleteChannel(uint chanid, int changrpid);
00043 static int GetNextChannelGroup(const ChannelGroupList &sorted, int grpid);
00044 static QString GetChannelGroupName(int grpid);
00045 static int GetChannelGroupId(QString changroupname);
00046
00047 private:
00048
00049 };
00050
00051 #endif