gmyth/src/gmyth_epg.h
author melunko
Mon Aug 13 22:54:55 2007 +0100 (2007-08-13)
branchtrunk
changeset 801 e51af4d0caf5
parent 754 cb885ee44618
permissions -rw-r--r--
[svn r807] Added gmyth_scheduler_add_schedule_full() method
     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      * callbacks 
    50      */
    51     /*
    52      * no one for now 
    53      */
    54 };
    55 
    56 struct _GMythEPG {
    57     GObject         parent;
    58 
    59     GMythQuery     *sqlquery;
    60     GMythBackendInfo *backend_info;
    61 };
    62 
    63 GType           gmyth_epg_get_type              (void) G_GNUC_CONST;;
    64 GMythEPG*       gmyth_epg_new                   (void);
    65 gboolean        gmyth_epg_connect               (GMythEPG           *gmyth_epg,
    66                                                  GMythBackendInfo   *backend_info);
    67 gboolean        gmyth_epg_disconnect            (GMythEPG           *gmyth_epg);
    68 gint            gmyth_epg_get_channel_list      (GMythEPG           *gmyth_epg,
    69                                                  GList              **glist_ptr);
    70 gint            gmyth_epg_get_program_list      (GMythEPG           *gmyth_epg,
    71                                                  GList              **proglist,
    72                                                  gint               chanNum,
    73                                                  GTimeVal           *starttime,
    74                                                  GTimeVal           *endtime);
    75 GMythChannelInfo*gmyth_epg_get_channel_info     (GMythEPG           *gmyth_epg,
    76                                                  gint               channel_id);
    77 gboolean        gmyth_epg_channel_has_icon      (GMythEPG           *gmyth_epg,
    78                                                  GMythChannelInfo   *channel);
    79 gboolean        gmyth_epg_channel_get_icon      (GMythEPG           *gmyth_epg,
    80                                                  GMythChannelInfo   *channel,
    81                                                  guint8             **data, 
    82                                                  guint              *length);
    83 
    84 G_END_DECLS
    85 #endif                          /* GMYTH_EPG_H_ */