~ubuntu-branches/ubuntu/precise/gmlive/precise

« back to all changes in this revision

Viewing changes to src/sopcastchannel.h

  • Committer: Bazaar Package Importer
  • Author(s): Aron Xu
  • Date: 2010-01-28 10:02:52 UTC
  • Revision ID: james.westby@ubuntu.com-20100128100252-b0yb0n4zm7s85ce7
Tags: upstream-0.22.2
Import upstream version 0.22.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * =====================================================================================
 
3
 * 
 
4
 *       Filename:  sopcastchannel.h
 
5
 * 
 
6
 *    Description:  sopcast的列表支持
 
7
 * 
 
8
 *        Version:  1.0
 
9
 *        Created:  2007年12月04日 20时11分23秒 CST
 
10
 *       Revision:  none
 
11
 *       Compiler:  gcc
 
12
 * 
 
13
 *         Author:  lerosua (), lerosua@gmail.com
 
14
 *        Company:  Cyclone
 
15
 * 
 
16
 * =====================================================================================
 
17
 */
 
18
 
 
19
#ifndef  SOPCASTCHANNEL_FILE_HEADER_INC
 
20
#define  SOPCASTCHANNEL_FILE_HEADER_INC
 
21
#include "channel.h"
 
22
#include <libxml/parser.h>
 
23
#include <libxml/tree.h>
 
24
 
 
25
class GMplayer;
 
26
class SopcastChannel:public Channel
 
27
{
 
28
        public:
 
29
                SopcastChannel(MainWindow* parent_);
 
30
                bool init();
 
31
                /**
 
32
                 * @brief 读取频道列表
 
33
                 * @param filename 残疾列表
 
34
                 * @return 返回真则读取顺利,返回假则文件读取遇到错误
 
35
                 */
 
36
                bool read_channels(const char* filename);
 
37
                void  addLine(int users,const Glib::ustring& name,const std::string& sream,const Glib::ustring& groupname);
 
38
                void refresh_list();
 
39
                typedef sigc::signal<void> type_signal_stop;
 
40
                type_signal_stop signal_stop_refresh()
 
41
                { return signal_stop_refresh_; }
 
42
 
 
43
                typedef sigc::signal<void> type_signal_start;
 
44
                type_signal_start signal_start_refresh()
 
45
                { return signal_start_refresh_; }       
 
46
 
 
47
        protected:
 
48
                LivePlayer* get_player(const std::string& stream,TypeChannel page);
 
49
                void wait_wget_exit(GPid pid, int);
 
50
        private:
 
51
                int parse_channel (Gtk::TreeModel::iterator& iter, xmlNode* a_node);
 
52
 
 
53
                void parse_channels(xmlNode* a_node);
 
54
                void parse_group(xmlNode* a_node);
 
55
 
 
56
                type_signal_stop  signal_stop_refresh_;
 
57
                type_signal_start signal_start_refresh_;
 
58
 
 
59
                int wget_pid;
 
60
                bool refresh;
 
61
 
 
62
};
 
63
 
 
64
 
 
65
 
 
66
#endif   /* ----- #ifndef SOPCASTCHANNEL_FILE_HEADER_INC  ----- */
 
67