[svn r36] Some fixes on the myth file transfer offset number representation.
1 /* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2-*- */
3 #ifndef __MYTH_FILE_TRANSFER_H__
4 #define __MYTH_FILE_TRANSFER_H__
6 #include <glib-object.h>
8 #include <gmyth/gmyth_socket.h>
10 #include "myth_livetv.h"
16 #include <sys/socket.h>
21 #define MYTH_FILE_TRANSFER_TYPE (myth_file_transfer_get_type ())
22 #define MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransfer))
23 #define MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass))
24 #define IS_MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE))
25 #define IS_MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE))
26 #define MYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass))
29 typedef struct _MythFileTransfer MythFileTransfer;
30 typedef struct _MythFileTransferClass MythFileTransferClass;
32 struct _MythFileTransferClass
34 GObjectClass parent_class;
40 struct _MythFileTransfer
44 /* Myth URI structure */
47 /* MythTV version number */
50 /* socket descriptors */
51 GMythSocket *control_sock;
52 GMythSocket *event_sock;
57 gboolean timeoutisfast;
58 gboolean userreadahead;
71 GType myth_file_transfer_get_type (void);
73 MythFileTransfer* myth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version );
75 gint myth_file_transfer_read(MythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited);
77 guint64 myth_file_transfer_seek(MythFileTransfer *transfer, guint64 pos, gint whence);
79 gboolean myth_file_transfer_playback_setup( MythFileTransfer **transfer, gboolean live_tv );
81 gboolean myth_file_transfer_setup( MythFileTransfer **transfer, gboolean live_tv );
83 gboolean myth_file_transfer_livetv_setup( MythFileTransfer **transfer, GMythSocket *live_sock );
85 void myth_file_transfer_spawntv ( MythFileTransfer *file_transfer, GString *tvchain_id );
87 gboolean myth_file_transfer_is_recording( MythFileTransfer *file_transfer );
89 guint64 myth_file_transfer_get_file_position( MythFileTransfer *file_transfer );
93 #endif /* __MYTH_FILE_TRANSFER_H__ */