diff -r 265cdb1c59e3 -r 29720bf82e86 gst-plugins-mythtv/src/myth_file_transfer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gst-plugins-mythtv/src/myth_file_transfer.h Tue Sep 26 16:02:15 2006 +0100 @@ -0,0 +1,93 @@ +/* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2-*- */ + +#ifndef __MYTH_FILE_TRANSFER_H__ +#define __MYTH_FILE_TRANSFER_H__ + +#include + +#include +#include "myth_uri.h" +#include "myth_livetv.h" + +#include +#include +#include +#include +#include +#include + +#define G_BEGIN_DECLS + +#define MYTH_FILE_TRANSFER_TYPE (myth_file_transfer_get_type ()) +#define MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransfer)) +#define MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass)) +#define IS_MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE)) +#define IS_MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE)) +#define MYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass)) + + +typedef struct _MythFileTransfer MythFileTransfer; +typedef struct _MythFileTransferClass MythFileTransferClass; + +struct _MythFileTransferClass +{ + GObjectClass parent_class; + + /* callbacks */ + /* no one for now */ +}; + +struct _MythFileTransfer +{ + GObject parent; + + /* Myth URI structure */ + const MythURI *uri; + + /* MythTV version number */ + gint mythtv_version; + + /* socket descriptors */ + GMythSocket *control_sock; + GMythSocket *event_sock; + GMythSocket *sock; + + guint64 readposition; + guint64 filesize; + gboolean timeoutisfast; + gboolean userreadahead; + gboolean live_tv; + gint retries; + + GString *query; + + gint rec_id; + gint recordernum; + gint card_id; + GString *hostname; + gint port; +}; + +GType myth_file_transfer_get_type (void); + +MythFileTransfer* myth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version ); + +gint myth_file_transfer_read(MythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited); + +guint64 myth_file_transfer_seek(MythFileTransfer *transfer, guint64 pos, gint whence); + +gboolean myth_file_transfer_playback_setup( MythFileTransfer **transfer, gboolean live_tv ); + +gboolean myth_file_transfer_setup( MythFileTransfer **transfer, gboolean live_tv ); + +gboolean myth_file_transfer_livetv_setup( MythFileTransfer **transfer, GMythSocket *live_sock ); + +void myth_file_transfer_spawntv ( MythFileTransfer *file_transfer, GString *tvchain_id ); + +gboolean myth_file_transfer_is_recording( MythFileTransfer *file_transfer ); + +guint64 myth_file_transfer_get_file_position( MythFileTransfer *file_transfer ); + +#define G_END_DECLS + +#endif /* __MYTH_FILE_TRANSFER_H__ */