1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gst-plugins-mythtv/src/myth_file_transfer.h Thu Sep 28 16:06:43 2006 +0100
1.3 @@ -0,0 +1,93 @@
1.4 +/* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2-*- */
1.5 +
1.6 +#ifndef __MYTH_FILE_TRANSFER_H__
1.7 +#define __MYTH_FILE_TRANSFER_H__
1.8 +
1.9 +#include <glib-object.h>
1.10 +
1.11 +#include <gmyth/gmyth_socket.h>
1.12 +#include "myth_uri.h"
1.13 +#include "myth_livetv.h"
1.14 +
1.15 +#include <stdio.h>
1.16 +#include <stdlib.h>
1.17 +#include <string.h>
1.18 +#include <netdb.h>
1.19 +#include <sys/socket.h>
1.20 +#include <unistd.h>
1.21 +
1.22 +#define G_BEGIN_DECLS
1.23 +
1.24 +#define MYTH_FILE_TRANSFER_TYPE (myth_file_transfer_get_type ())
1.25 +#define MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransfer))
1.26 +#define MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass))
1.27 +#define IS_MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE))
1.28 +#define IS_MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE))
1.29 +#define MYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass))
1.30 +
1.31 +
1.32 +typedef struct _MythFileTransfer MythFileTransfer;
1.33 +typedef struct _MythFileTransferClass MythFileTransferClass;
1.34 +
1.35 +struct _MythFileTransferClass
1.36 +{
1.37 + GObjectClass parent_class;
1.38 +
1.39 + /* callbacks */
1.40 + /* no one for now */
1.41 +};
1.42 +
1.43 +struct _MythFileTransfer
1.44 +{
1.45 + GObject parent;
1.46 +
1.47 + /* Myth URI structure */
1.48 + const MythURI *uri;
1.49 +
1.50 + /* MythTV version number */
1.51 + gint mythtv_version;
1.52 +
1.53 + /* socket descriptors */
1.54 + GMythSocket *control_sock;
1.55 + GMythSocket *event_sock;
1.56 + GMythSocket *sock;
1.57 +
1.58 + guint64 readposition;
1.59 + guint64 filesize;
1.60 + gboolean timeoutisfast;
1.61 + gboolean userreadahead;
1.62 + gboolean live_tv;
1.63 + gint retries;
1.64 +
1.65 + GString *query;
1.66 +
1.67 + gint rec_id;
1.68 + gint recordernum;
1.69 + gint card_id;
1.70 + GString *hostname;
1.71 + gint port;
1.72 +};
1.73 +
1.74 +GType myth_file_transfer_get_type (void);
1.75 +
1.76 +MythFileTransfer* myth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version );
1.77 +
1.78 +gint myth_file_transfer_read(MythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited);
1.79 +
1.80 +guint64 myth_file_transfer_seek(MythFileTransfer *transfer, guint64 pos, gint whence);
1.81 +
1.82 +gboolean myth_file_transfer_playback_setup( MythFileTransfer **transfer, gboolean live_tv );
1.83 +
1.84 +gboolean myth_file_transfer_setup( MythFileTransfer **transfer, gboolean live_tv );
1.85 +
1.86 +gboolean myth_file_transfer_livetv_setup( MythFileTransfer **transfer, GMythSocket *live_sock );
1.87 +
1.88 +void myth_file_transfer_spawntv ( MythFileTransfer *file_transfer, GString *tvchain_id );
1.89 +
1.90 +gboolean myth_file_transfer_is_recording( MythFileTransfer *file_transfer );
1.91 +
1.92 +guint64 myth_file_transfer_get_file_position( MythFileTransfer *file_transfer );
1.93 +
1.94 +#define G_END_DECLS
1.95 +
1.96 +#endif /* __MYTH_FILE_TRANSFER_H__ */