[svn r535] Fixed to the older GMythFileTransfer revision (no GObject inheritance).
4 * @file gmyth/gmyth_file_transfer.h
6 * @brief <p> GMythFileTransfer deals with the file streaming media remote/local
7 * transfering to the MythTV frontend.
9 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
10 * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef __GMYTH_FILE_TRANSFER_H__
30 #define __GMYTH_FILE_TRANSFER_H__
32 #include <glib-object.h>
35 #include "gmyth_socket.h"
36 #include "gmyth_uri.h"
37 #include "gmyth_backendinfo.h"
43 #include <sys/socket.h>
48 #define GMYTH_FILE_TRANSFER_TYPE (gmyth_file_transfer_get_type ())
49 #define GMYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransfer))
50 #define GMYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass))
51 #define IS_GMYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE))
52 #define IS_GMYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE))
53 #define GMYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass))
56 GMYTH_FILE_TRANSFER_READ_OK = 0,
57 GMYTH_FILE_TRANSFER_READ_NEXT_PROG_CHAIN = 1,
58 GMYTH_FILE_TRANSFER_READ_ERROR = 2,
59 GMYTH_FILE_TRANSFER_READ_EOF = 3
60 } GMythFileTransferReadResult;
63 typedef struct _GMythFileTransfer GMythFileTransfer;
64 typedef struct _GMythFileTransferClass GMythFileTransferClass;
65 typedef struct _GMythFileTransferPrivate GMythFileTransferPrivate;
67 struct _GMythFileTransfer
73 struct _GMythFileTransferClass
75 GObjectClass parent_class;
78 guint program_info_changed_handler_signal_id;
80 /* signal default handlers */
81 void (*program_info_changed_handler) ( GMythFileTransfer *transfer,
82 gint msg_code, gpointer livetv_recorder );
86 GType gmyth_file_transfer_get_type (void);
87 GMythFileTransfer* gmyth_file_transfer_new (GMythBackendInfo *backend_info);
88 gchar* gmyth_file_transfer_get_file_name (GMythFileTransfer *transfer);
89 gboolean gmyth_file_transfer_open (GMythFileTransfer *transfer,
90 const gchar* filename);
91 void gmyth_file_transfer_close (GMythFileTransfer *transfer);
92 gboolean gmyth_file_transfer_is_open (GMythFileTransfer *transfer);
93 GMythFileTransferReadResult
94 gmyth_file_transfer_read (GMythFileTransfer *transfer,
97 gboolean read_unlimited);
98 gint64 gmyth_file_transfer_seek (GMythFileTransfer *transfer,
101 gboolean gmyth_file_transfer_settimeout (GMythFileTransfer *transfer,
103 guint64 gmyth_file_transfer_get_filesize (GMythFileTransfer *transfer);
105 void gmyth_file_transfer_emit_program_info_changed_signal (
106 GMythFileTransfer *transfer,
108 gpointer live_tv_recorder );
112 #endif /* __GMYTH_FILE_TRANSFER_H__ */