[svn r324] Added function to request how many recorders are available.
4 * @file gmyth/gmyth_recorder.h
6 * @brief <p> GMythRecorder class defines functions for playing live tv.
8 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
9 * @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 __GMYTH_RECORDER_H__
29 #define __GMYTH_RECORDER_H__
31 #include <glib-object.h>
33 #include "gmyth_socket.h"
34 #include "gmyth_programinfo.h"
40 #include <sys/socket.h>
45 #define GMYTH_RECORDER_TYPE (gmyth_recorder_get_type ())
46 #define GMYTH_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_RECORDER_TYPE, GMythRecorder))
47 #define GMYTH_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_RECORDER_TYPE, GMythRecorderClass))
48 #define IS_GMYTH_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_RECORDER_TYPE))
49 #define IS_GMYTH_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_RECORDER_TYPE))
50 #define GMYTH_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_RECORDER_TYPE, GMythRecorderClass))
53 typedef struct _GMythRecorder GMythRecorder;
54 typedef struct _GMythRecorderClass GMythRecorderClass;
56 struct _GMythRecorderClass
58 GObjectClass parent_class;
68 /* socket descriptor */
69 GMythSocket *myth_socket;
76 typedef enum _GMythRecorderChannelChangeDirection {
77 CHANNEL_DIRECTION_UP = 0,
78 CHANNEL_DIRECTION_DOWN,
79 CHANNEL_DIRECTION_FAVORITE,
80 CHANNEL_DIRECTION_SAME
81 } GMythRecorderChannelChangeDirection;
83 GType gmyth_recorder_get_type (void);
85 GMythRecorder* gmyth_recorder_new (int num,
89 gboolean gmyth_recorder_setup (GMythRecorder *recorder);
90 gboolean gmyth_recorder_spawntv (GMythRecorder *recorder,
93 gboolean gmyth_recorder_spawntv_no_tvchain (GMythRecorder *recorder);
95 gboolean gmyth_recorder_stop_livetv (GMythRecorder *recorder);
97 gboolean gmyth_recorder_send_frontend_ready_command (GMythRecorder *recorder);
99 gboolean gmyth_recorder_check_channel (GMythRecorder *recorder, gint channel);
101 gboolean gmyth_recorder_check_channel_name (GMythRecorder *recorder, gchar* channel);
103 gboolean gmyth_recorder_set_channel (GMythRecorder *recorder,
106 gboolean gmyth_recorder_set_channel_name (GMythRecorder *recorder,
107 const gchar* channel);
109 gboolean gmyth_recorder_change_channel (GMythRecorder *recorder,
110 const GMythRecorderChannelChangeDirection direction);
112 gboolean gmyth_recorder_pause_recording ( GMythRecorder *recorder );
114 GMythProgramInfo *gmyth_recorder_get_current_program_info ( GMythRecorder *recorder );
116 gint64 gmyth_recorder_get_file_position ( GMythRecorder *recorder );
118 gboolean gmyth_recorder_is_recording ( GMythRecorder *recorder );
122 #endif /* __GMYTH_REMOTE_ENCODER_H__ */