renatofilho@320: /** renatofilho@320: * GMyth Library renatofilho@320: * renatofilho@320: * @file gmyth/gmyth_tvchain.h renatofilho@320: * renatofilho@320: * @brief

This component contains functions for creating and accessing renatofilho@320: * the tvchain functions for live tv playback. renatofilho@320: * renatofilho@320: * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia. renatofilho@320: * @author Hallyson Luiz de Morais Melo renatofilho@320: * renatofilho@320: *//* renatofilho@320: * renatofilho@320: * This program is free software; you can redistribute it and/or modify renatofilho@320: * it under the terms of the GNU Lesser General Public License as published by renatofilho@320: * the Free Software Foundation; either version 2 of the License, or renatofilho@320: * (at your option) any later version. renatofilho@320: * renatofilho@320: * This program is distributed in the hope that it will be useful, renatofilho@320: * but WITHOUT ANY WARRANTY; without even the implied warranty of renatofilho@320: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the renatofilho@320: * GNU General Public License for more details. renatofilho@320: * renatofilho@320: * You should have received a copy of the GNU Lesser General Public License renatofilho@320: * along with this program; if not, write to the Free Software renatofilho@320: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA renatofilho@320: */ renatofilho@320: renatofilho@320: #ifndef LIVETVCHAIN_H_ renatofilho@320: #define LIVETVCHAIN_H_ renatofilho@320: renatofilho@320: #include renatofilho@320: #include renatofilho@320: renatofilho@320: #include "gmyth_common.h" renatofilho@320: #include "gmyth_backendinfo.h" renatofilho@320: renatofilho@320: G_BEGIN_DECLS renatofilho@320: renatofilho@320: #define GMYTH_TVCHAIN_TYPE (gmyth_tvchain_get_type ()) renatofilho@320: #define GMYTH_TVCHAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_TVCHAIN_TYPE, GMythTVChain)) renatofilho@320: #define GMYTH_TVCHAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_TVCHAIN_TYPE, GMythTVChainClass)) renatofilho@320: #define IS_GMYTH_TVCHAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_TVCHAIN_TYPE)) renatofilho@320: #define IS_GMYTH_TVCHAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_TVCHAIN_TYPE)) renatofilho@320: #define GMYTH_TVCHAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_TVCHAIN_TYPE, GMythTVChainClass)) renatofilho@320: renatofilho@320: renatofilho@320: typedef struct _GMythTVChain GMythTVChain; renatofilho@320: typedef struct _GMythTVChainClass GMythTVChainClass; renatofilho@320: renatofilho@320: renatofilho@320: struct LiveTVChainEntry renatofilho@320: { renatofilho@320: GString *chanid; renatofilho@320: renatofilho@320: GTimeVal* starttime; renatofilho@320: GTimeVal* endtime; renatofilho@320: renatofilho@320: gboolean discontinuity; // if true, can't play smooth from last entry renatofilho@320: GString *hostprefix; renatofilho@320: GString *cardtype; renatofilho@320: GString *channum; renatofilho@320: GString *inputname; renatofilho@320: }; renatofilho@320: renatofilho@320: renatofilho@320: struct _GMythTVChainClass renatofilho@320: { renatofilho@320: GObjectClass parent_class; renatofilho@320: renatofilho@320: /* callbacks */ renatofilho@320: /* no one for now */ renatofilho@320: }; renatofilho@320: renatofilho@320: struct _GMythTVChain renatofilho@320: { renatofilho@320: GObject parent; renatofilho@320: renatofilho@320: GString *tvchain_id; renatofilho@320: GList *tvchain_list; renatofilho@320: renatofilho@320: GTimeVal* cur_startts; renatofilho@320: GString *cur_chanid; renatofilho@320: gint cur_pos; renatofilho@320: renatofilho@320: GMythBackendInfo *backend_info; renatofilho@320: }; renatofilho@320: renatofilho@320: renatofilho@320: GType gmyth_tvchain_get_type (void); renatofilho@320: renatofilho@320: gboolean gmyth_tvchain_initialize (GMythTVChain *tvchain, renatofilho@320: GMythBackendInfo *backend_info); renatofilho@320: gboolean gmyth_tvchain_reload_all (GMythTVChain *tvchain); renatofilho@320: GString* gmyth_tvchain_get_id (GMythTVChain *tvchain); renatofilho@320: gint gmyth_tvchain_program_is_at (GMythTVChain *tvchain, renatofilho@320: GString *chanid, GTimeVal* startts); renatofilho@320: renatofilho@320: struct LiveTVChainEntry* gmyth_tvchain_get_entry_at (GMythTVChain *tvchain, renatofilho@320: gint index); renatofilho@320: renatofilho@320: GMythProgramInfo* gmyth_tvchain_entry_to_program (GMythTVChain *tvchain, renatofilho@320: struct LiveTVChainEntry *entry); renatofilho@320: GMythProgramInfo* gmyth_tvchain_get_program_at (GMythTVChain *tvchain, gint index); renatofilho@320: renatofilho@320: G_END_DECLS renatofilho@320: renatofilho@320: #endif /*LIVETVCHAIN_H_*/