diff -r f3cdc7844178 -r ba5dc9bff3a1 gst-plugins-mythtv/src/gmyth_file_transfer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gst-plugins-mythtv/src/gmyth_file_transfer.h Mon Oct 23 15:42:46 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 __GMYTH_FILE_TRANSFER_H__ +#define __GMYTH_FILE_TRANSFER_H__ + +#include + +#include +#include "gmyth_uri.h" +#include "gmyth_livetv.h" + +#include +#include +#include +#include +#include +#include + +#define G_BEGIN_DECLS + +#define GMYTH_FILE_TRANSFER_TYPE (gmyth_file_transfer_get_type ()) +#define GMYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransfer)) +#define GMYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass)) +#define IS_GMYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE)) +#define IS_GMYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE)) +#define GMYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass)) + + +typedef struct _GMythFileTransfer GMythFileTransfer; +typedef struct _GMythFileTransferClass GMythFileTransferClass; + +struct _GMythFileTransferClass +{ + GObjectClass parent_class; + + /* callbacks */ + /* no one for now */ +}; + +struct _GMythFileTransfer +{ + GObject parent; + + /* Myth URI structure */ + const GMythURI *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 gmyth_file_transfer_get_type (void); + +GMythFileTransfer* gmyth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version ); + +gint gmyth_file_transfer_read(GMythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited); + +gint64 gmyth_file_transfer_seek(GMythFileTransfer *transfer, guint64 pos, gint whence); + +gboolean gmyth_file_transfer_playback_setup( GMythFileTransfer **transfer, gboolean live_tv ); + +gboolean gmyth_file_transfer_setup( GMythFileTransfer **transfer, gboolean live_tv ); + +gboolean gmyth_file_transfer_livetv_setup( GMythFileTransfer **transfer, GMythSocket *live_sock ); + +void gmyth_file_transfer_spawntv ( GMythFileTransfer *file_transfer, GString *tvchain_id ); + +gboolean gmyth_file_transfer_is_recording( GMythFileTransfer *file_transfer ); + +gint64 gmyth_file_transfer_get_file_position( GMythFileTransfer *file_transfer ); + +#define G_END_DECLS + +#endif /* __GMYTH_FILE_TRANSFER_H__ */