gst-plugins-mythtv/src/gmyth_file_transfer.h
branchtrunk
changeset 41 686549eb5657
parent 13 f3cdc7844178
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gst-plugins-mythtv/src/gmyth_file_transfer.h	Mon Oct 23 16:02:15 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 __GMYTH_FILE_TRANSFER_H__
     1.7 +#define __GMYTH_FILE_TRANSFER_H__
     1.8 +
     1.9 +#include <glib-object.h>
    1.10 +
    1.11 +#include <gmyth/gmyth_socket.h>
    1.12 +#include "gmyth_uri.h"
    1.13 +#include "gmyth_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 GMYTH_FILE_TRANSFER_TYPE               (gmyth_file_transfer_get_type ())
    1.25 +#define GMYTH_FILE_TRANSFER(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransfer))
    1.26 +#define GMYTH_FILE_TRANSFER_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass))
    1.27 +#define IS_GMYTH_FILE_TRANSFER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE))
    1.28 +#define IS_GMYTH_FILE_TRANSFER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE))
    1.29 +#define GMYTH_FILE_TRANSFER_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass))
    1.30 +
    1.31 +
    1.32 +typedef struct _GMythFileTransfer         GMythFileTransfer;
    1.33 +typedef struct _GMythFileTransferClass    GMythFileTransferClass;
    1.34 +
    1.35 +struct _GMythFileTransferClass
    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 _GMythFileTransfer
    1.44 +{
    1.45 +	GObject parent;
    1.46 +
    1.47 +	/* Myth URI structure */
    1.48 +	const GMythURI *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          gmyth_file_transfer_get_type        (void);
    1.75 +
    1.76 +GMythFileTransfer* gmyth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version );
    1.77 +
    1.78 +gint gmyth_file_transfer_read(GMythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited);
    1.79 +
    1.80 +gint64 gmyth_file_transfer_seek(GMythFileTransfer *transfer, guint64 pos, gint whence);
    1.81 +
    1.82 +gboolean gmyth_file_transfer_playback_setup( GMythFileTransfer **transfer, gboolean live_tv );
    1.83 +
    1.84 +gboolean gmyth_file_transfer_setup( GMythFileTransfer **transfer, gboolean live_tv );
    1.85 +
    1.86 +gboolean gmyth_file_transfer_livetv_setup( GMythFileTransfer **transfer, GMythSocket *live_sock );
    1.87 +
    1.88 +void gmyth_file_transfer_spawntv ( GMythFileTransfer *file_transfer, GString *tvchain_id );
    1.89 +
    1.90 +gboolean gmyth_file_transfer_is_recording( GMythFileTransfer *file_transfer );
    1.91 +
    1.92 +gint64  gmyth_file_transfer_get_file_position( GMythFileTransfer *file_transfer );
    1.93 +
    1.94 +#define G_END_DECLS
    1.95 +
    1.96 +#endif /* __GMYTH_FILE_TRANSFER_H__ */