gmyth/gmyth/gmyth_epg.h
author melunko
Thu Mar 13 16:29:38 2008 +0000 (2008-03-13)
branchtrunk
changeset 942 c93bfa74c71f
parent 925 4a8d56080089
permissions -rw-r--r--
[svn r951] gmyth now is 0.8.1. Added methods epg_is_connected() and scheduler_is_connected()
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_epg.h
     5  * 
     6  * @brief <p> GMythEPG class provides access to the program and channel data
     7  * from the Electronic Program Guide (EPG) of the Mythtv backend.
     8  *
     9  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    10  * @author Leonardo Sobral Cunha <leonardo.cunha@indt.org.br>
    11  * 
    12  * This program is free software; you can redistribute it and/or modify
    13  * it under the terms of the GNU Lesser General Public License as published by
    14  * the Free Software Foundation; either version 2 of the License, or
    15  * (at your option) any later version.
    16  *
    17  * This program is distributed in the hope that it will be useful,
    18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20  * GNU General Public License for more details.
    21  *
    22  * You should have received a copy of the GNU Lesser General Public License
    23  * along with this program; if not, write to the Free Software
    24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    25  */
    26 
    27 #ifndef GMYTH_EPG_H_
    28 #define GMYTH_EPG_H_
    29 
    30 #include <glib-object.h>
    31 
    32 #include "gmyth_query.h"
    33 #include "gmyth_common.h"
    34 
    35 G_BEGIN_DECLS
    36 #define GMYTH_EPG_TYPE               (gmyth_epg_get_type ())
    37 #define GMYTH_EPG(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_EPG_TYPE, GMythEPG))
    38 #define GMYTH_EPG_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_EPG_TYPE, GMythEPGClass))
    39 #define IS_GMYTH_EPG(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_EPG_TYPE))
    40 #define IS_GMYTH_EPG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_EPG_TYPE))
    41 #define GMYTH_EPG_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_EPG_TYPE, GMythEPGClass))
    42 typedef struct _GMythEPG GMythEPG;
    43 typedef struct _GMythEPGClass GMythEPGClass;
    44 
    45 struct _GMythEPGClass {
    46     GObjectClass parent_class;
    47 };
    48 
    49 struct _GMythEPG {
    50     GObject         parent;
    51 
    52     GMythQuery     *sqlquery;
    53     GMythBackendInfo *backend_info;
    54 };
    55 
    56 GType     gmyth_epg_get_type              (void) G_GNUC_CONST;;
    57 GMythEPG* gmyth_epg_new                   (void);
    58 gboolean  gmyth_epg_connect               (GMythEPG           *gmyth_epg,
    59                                            GMythBackendInfo   *backend_info);
    60 gboolean  gmyth_epg_is_connected (GMythEPG *gmyth_epg);
    61 	
    62 gboolean  gmyth_epg_disconnect            (GMythEPG           *gmyth_epg);
    63 gint      gmyth_epg_get_channel_list      (GMythEPG           *gmyth_epg,
    64                                            GList              **glist_ptr);
    65 gint      gmyth_epg_get_program_list      (GMythEPG           *gmyth_epg,
    66                                            GList              **proglist,
    67                                            gint               chanNum,
    68                                            GTimeVal           *starttime,
    69                                            GTimeVal           *endtime);
    70 GMythChannelInfo*gmyth_epg_get_channel_info     (GMythEPG           *gmyth_epg,
    71                                                  gint               channel_id);
    72 gboolean  gmyth_epg_channel_has_icon      (GMythEPG           *gmyth_epg,
    73                                            GMythChannelInfo   *channel);
    74 gboolean  gmyth_epg_channel_get_icon      (GMythEPG           *gmyth_epg,
    75                                            GMythChannelInfo   *channel,
    76                                            guint8             **data, 
    77                                            guint              *length);
    78 
    79 G_END_DECLS
    80 #endif                          /* GMYTH_EPG_H_ */