branches/gmyth-0.1b/src/gmyth_livetv.h
author renatofilho
Thu Feb 01 18:42:01 2007 +0000 (2007-02-01)
branchtrunk
changeset 320 22a17127789e
permissions -rwxr-xr-x
[svn r322] created branch gmyth-0.1b
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_livetv.h
     5  * 
     6  * @brief <p> GMythLiveTV starts a remote TV session with the MythTV backend.
     7  *
     8  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
     9  * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
    10  *
    11  *//*
    12  * 
    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.
    17  *
    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.
    22  *
    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
    26  */
    27 
    28 #ifndef GMYTH_LIVETV_H_
    29 #define GMYTH_LIVETV_H_
    30 
    31 #include <glib.h>
    32 #include <glib-object.h>
    33 
    34 #include "gmyth_recorder.h"
    35 #include "gmyth_tvchain.h"
    36 #include "gmyth_monitor_handler.h"
    37 #include "gmyth_file_transfer.h"
    38 #include "gmyth_programinfo.h"
    39 #include "gmyth_backendinfo.h"
    40 
    41 G_BEGIN_DECLS
    42 
    43 #define GMYTH_LIVETV_TYPE               (gmyth_livetv_get_type ())
    44 #define GMYTH_LIVETV(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_LIVETV_TYPE, GMythLiveTV))
    45 #define GMYTH_LIVETV_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_LIVETV_TYPE, GMythLiveTVClass))
    46 #define IS_GMYTH_LIVETV(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_LIVETV_TYPE))
    47 #define IS_GMYTH_LIVETV_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_LIVETV_TYPE))
    48 #define GMYTH_LIVETV_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_LIVETV_TYPE, GMythLiveTVClass))
    49 
    50 typedef struct _GMythLiveTV         GMythLiveTV;
    51 typedef struct _GMythLiveTVClass    GMythLiveTVClass;
    52 
    53 struct _GMythLiveTVClass
    54 {
    55   GObjectClass parent_class;
    56 
    57   /* callbacks */
    58 };
    59 
    60 struct _GMythLiveTV
    61 {
    62 	GObject 						parent;
    63 	
    64 	GString 				 		*local_hostname;
    65 	
    66 	GMythBackendInfo 		*backend_info;
    67 
    68 	GMythRecorder 	 		*recorder;
    69 	GMythTVChain 				*tvchain;
    70 	GMythProgramInfo 		*proginfo;
    71 	
    72 	GMythFileTransfer 	*file_transfer;
    73 	
    74 	GMythMonitorHandler *monitor;
    75 	GMythURI						*uri;
    76 
    77 	gboolean 						is_livetv;
    78 	gboolean 						setup_done;
    79 
    80 };
    81 
    82 GType          gmyth_livetv_get_type (void);
    83 
    84 GMythLiveTV* 	 gmyth_livetv_new ();
    85 
    86 void gmyth_livetv_start_playing (GMythLiveTV *livetv);
    87 void gmyth_livetv_stop_playing (GMythLiveTV *livetv);
    88 
    89 gboolean gmyth_livetv_setup (GMythLiveTV *livetv, GMythBackendInfo *backend_info);
    90 gboolean gmyth_livetv_channel_setup ( GMythLiveTV *livetv, gint channel, GMythBackendInfo *backend_info );
    91 gboolean gmyth_livetv_channel_name_setup ( GMythLiveTV *livetv, gchar* channel, GMythBackendInfo *backend_info );
    92 gboolean gmyth_livetv_next_program_chain ( GMythLiveTV *livetv );
    93 
    94 GMythFileTransfer *gmyth_livetv_create_file_transfer( GMythLiveTV *livetv );
    95 
    96 gboolean gmyth_livetv_monitor_handler_start( GMythLiveTV *livetv );
    97 void gmyth_livetv_monitor_handler_stop( GMythLiveTV *livetv );
    98 
    99 G_END_DECLS
   100 
   101 #endif /*GMYTH_LIVETV_H_*/