branches/gmyth-0.1b/src/gmyth_epg.h
author rosfran
Fri Feb 09 20:28:36 2007 +0000 (2007-02-09)
branchtrunk
changeset 344 21a15c29957b
permissions -rw-r--r--
[svn r346] Fixes to the socket closing and memory cleanup.
     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  *//*
    13  * 
    14  * This program is free software; you can redistribute it and/or modify
    15  * it under the terms of the GNU Lesser General Public License as published by
    16  * the Free Software Foundation; either version 2 of the License, or
    17  * (at your option) any later version.
    18  *
    19  * This program is distributed in the hope that it will be useful,
    20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    22  * GNU General Public License for more details.
    23  *
    24  * You should have received a copy of the GNU Lesser General Public License
    25  * along with this program; if not, write to the Free Software
    26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    27  */
    28 
    29 #ifndef GMYTH_EPG_H_
    30 #define GMYTH_EPG_H_
    31 
    32 #include <glib-object.h>
    33 
    34 #include "gmyth_query.h"
    35 #include "gmyth_common.h"
    36 
    37 G_BEGIN_DECLS
    38 
    39 #define GMYTH_EPG_TYPE               (gmyth_epg_get_type ())
    40 #define GMYTH_EPG(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_EPG_TYPE, GMythEPG))
    41 #define GMYTH_EPG_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_EPG_TYPE, GMythEPGClass))
    42 #define IS_GMYTH_EPG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_EPG_TYPE))
    43 #define IS_GMYTH_EPG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_EPG_TYPE))
    44 #define GMYTH_EPG_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_EPG_TYPE, GMythEPGClass))
    45 
    46 typedef struct _GMythEPG         GMythEPG;
    47 typedef struct _GMythEPGClass    GMythEPGClass;
    48 
    49 struct _GMythEPGClass
    50 {
    51   GObjectClass parent_class;
    52 
    53   /* callbacks */
    54   /* no one for now */
    55 };
    56 
    57 struct _GMythEPG
    58 {
    59     GObject parent;
    60 
    61 	GMythQuery *sqlquery;
    62 };
    63 
    64 GType          gmyth_epg_get_type (void);
    65 
    66 GMythEPG* gmyth_epg_new (void);
    67 
    68 gboolean gmyth_epg_connect (GMythEPG *gmyth_epg, GMythBackendInfo *backend_info);
    69 gboolean gmyth_epg_disconnect (GMythEPG *gmyth_epg);
    70 
    71 gint gmyth_epg_get_channel_list (GMythEPG *gmyth_epg, GList **glist_ptr);
    72 gint gmyth_epg_get_program_list (GMythEPG *gmyth_epg, GList **proglist,
    73 		const gint chanNum, GTimeVal *starttime, GTimeVal *endtime);
    74 
    75 #endif /*GMYTH_EPG_H_*/