gmyth/src/gmyth_livetv.h
author rosfran
Wed Dec 06 13:50:55 2006 +0000 (2006-12-06)
branchtrunk
changeset 203 a43fed947ec8
parent 117 b90cf50ca3dc
child 213 631f2cf13501
permissions -rwxr-xr-x
[svn r204] Fixed problem with the MonitorHandler thread, removed from FileTransfer.
rosfran@68
     1
/**
rosfran@68
     2
 * GMyth Library
rosfran@68
     3
 *
rosfran@68
     4
 * @file gmyth/gmyth_livetv.h
rosfran@68
     5
 * 
rosfran@68
     6
 * @brief <p> GMythLiveTV starts a remote TV session with the MythTV backend.
rosfran@68
     7
 *
rosfran@68
     8
 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
rosfran@68
     9
 * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
rosfran@68
    10
 *
rosfran@68
    11
 *//*
rosfran@68
    12
 * 
rosfran@68
    13
 * This program is free software; you can redistribute it and/or modify
rosfran@68
    14
 * it under the terms of the GNU Lesser General Public License as published by
rosfran@68
    15
 * the Free Software Foundation; either version 2 of the License, or
rosfran@68
    16
 * (at your option) any later version.
rosfran@68
    17
 *
rosfran@68
    18
 * This program is distributed in the hope that it will be useful,
rosfran@68
    19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
rosfran@68
    20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rosfran@68
    21
 * GNU General Public License for more details.
rosfran@68
    22
 *
rosfran@68
    23
 * You should have received a copy of the GNU Lesser General Public License
rosfran@68
    24
 * along with this program; if not, write to the Free Software
rosfran@68
    25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
rosfran@68
    26
 */
rosfran@68
    27
rosfran@41
    28
#ifndef GMYTH_LIVETV_H_
rosfran@41
    29
#define GMYTH_LIVETV_H_
rosfran@41
    30
rosfran@41
    31
#include <glib-object.h>
rosfran@41
    32
rosfran@65
    33
#include "gmyth_recorder.h"
rosfran@42
    34
#include "gmyth_tvchain.h"
rosfran@42
    35
#include "gmyth_common.h"
melunko@117
    36
#include "gmyth_backendinfo.h"
rosfran@203
    37
#include "gmyth_monitor_handler.h"
rosfran@41
    38
rosfran@42
    39
#include "gmyth_file_transfer.h"
rosfran@41
    40
rosfran@41
    41
#define G_BEGIN_DECLS
rosfran@41
    42
rosfran@41
    43
#define GMYTH_LIVETV_TYPE               (gmyth_livetv_get_type ())
rosfran@41
    44
#define GMYTH_LIVETV(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_LIVETV_TYPE, GMythLiveTV))
rosfran@41
    45
#define GMYTH_LIVETV_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_LIVETV_TYPE, GMythLiveTVClass))
rosfran@41
    46
#define IS_GMYTH_LIVETV(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_LIVETV_TYPE))
rosfran@41
    47
#define IS_GMYTH_LIVETV_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_LIVETV_TYPE))
rosfran@41
    48
#define GMYTH_LIVETV_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_LIVETV_TYPE, GMythLiveTVClass))
rosfran@41
    49
rosfran@41
    50
typedef struct _GMythLiveTV         GMythLiveTV;
rosfran@41
    51
typedef struct _GMythLiveTVClass    GMythLiveTVClass;
rosfran@41
    52
rosfran@41
    53
struct _GMythLiveTVClass
rosfran@41
    54
{
rosfran@41
    55
  GObjectClass parent_class;
rosfran@41
    56
rosfran@41
    57
  /* callbacks */
rosfran@41
    58
};
rosfran@41
    59
rosfran@41
    60
struct _GMythLiveTV
rosfran@41
    61
{
rosfran@41
    62
	GObject parent;
rosfran@41
    63
rosfran@41
    64
	// Backend connection related variables
rosfran@41
    65
	GString *backend_hostname;
rosfran@41
    66
	gint backend_port;
rosfran@41
    67
	GString *local_hostname;
rosfran@41
    68
rosfran@65
    69
	GMythRecorder *recorder;
rosfran@41
    70
	GMythTVChain *tvchain;
rosfran@41
    71
	GMythProgramInfo *proginfo;
rosfran@203
    72
	
rosfran@203
    73
	GMythMonitorHandler *monitor;
rosfran@41
    74
rosfran@41
    75
	gboolean is_livetv;
rosfran@41
    76
rosfran@41
    77
};
rosfran@41
    78
rosfran@41
    79
GType          gmyth_livetv_get_type (void);
rosfran@41
    80
rosfran@41
    81
GMythLiveTV* gmyth_livetv_new ();
rosfran@41
    82
rosfran@41
    83
void gmyth_livetv_start_playing (GMythLiveTV *livetv);
rosfran@41
    84
void gmyth_livetv_stop_playing (GMythLiveTV *livetv);
rosfran@41
    85
melunko@107
    86
gboolean gmyth_livetv_is_recording ( GMythLiveTV *livetv );
melunko@107
    87
	
melunko@107
    88
melunko@117
    89
gboolean gmyth_livetv_setup (GMythLiveTV *livetv, GMythBackendInfo *backend_info);
rosfran@54
    90
gboolean gmyth_livetv_next_program_chain ( GMythLiveTV *livetv );
rosfran@41
    91
rosfran@41
    92
#define G_END_DECLS
rosfran@41
    93
rosfran@41
    94
#endif /*GMYTH_LIVETV_H_*/