4 * @file gmyth/gmyth_tvchain.h
6 * @brief <p> This component contains functions for creating and accessing
7 * the tvchain functions for live tv playback.
9 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
10 * @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU Lesser General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU Lesser General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef LIVETVCHAIN_H_
29 #define LIVETVCHAIN_H_
31 #include <glib-object.h>
34 #include "gmyth_common.h"
35 #include "gmyth_backendinfo.h"
38 #define GMYTH_TVCHAIN_TYPE (gmyth_tvchain_get_type ())
39 #define GMYTH_TVCHAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_TVCHAIN_TYPE, GMythTVChain))
40 #define GMYTH_TVCHAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_TVCHAIN_TYPE, GMythTVChainClass))
41 #define IS_GMYTH_TVCHAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_TVCHAIN_TYPE))
42 #define IS_GMYTH_TVCHAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_TVCHAIN_TYPE))
43 #define GMYTH_TVCHAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_TVCHAIN_TYPE, GMythTVChainClass))
44 typedef struct _GMythTVChain GMythTVChain;
45 typedef struct _GMythTVChainClass GMythTVChainClass;
48 struct LiveTVChainEntry {
54 gboolean discontinuity; // if true, can't play smooth from
63 struct _GMythTVChainClass {
64 GObjectClass parent_class;
74 struct _GMythTVChain {
80 GTimeVal *cur_startts;
84 GMythBackendInfo *backend_info;
89 GType gmyth_tvchain_get_type(void);
91 GMythTVChain *gmyth_tvchain_new();
93 gboolean gmyth_tvchain_initialize(GMythTVChain * tvchain,
94 GMythBackendInfo * backend_info);
95 gboolean gmyth_tvchain_reload_all(GMythTVChain * tvchain);
96 GString *gmyth_tvchain_get_id(GMythTVChain * tvchain);
97 gint gmyth_tvchain_program_is_at(GMythTVChain * tvchain,
101 struct LiveTVChainEntry *gmyth_tvchain_get_entry_at(GMythTVChain * tvchain,
104 GMythProgramInfo *gmyth_tvchain_entry_to_program(GMythTVChain * tvchain, struct LiveTVChainEntry
106 GMythProgramInfo *gmyth_tvchain_get_program_at(GMythTVChain * tvchain,
109 GList *gmyth_tvchain_get_program_info_from_channel(GMythTVChain *
114 GList *gmyth_tvchain_get_program_info_list(GMythTVChain *
118 #endif /* LIVETVCHAIN_H_ */