leo_sobral@2: /* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2-*- */ leo_sobral@2: rosfran@40: #ifndef __GMYTH_FILE_TRANSFER_H__ rosfran@40: #define __GMYTH_FILE_TRANSFER_H__ leo_sobral@2: leo_sobral@2: #include leo_sobral@2: leo_sobral@2: #include rosfran@40: #include "gmyth_uri.h" rosfran@40: #include "gmyth_livetv.h" leo_sobral@2: leo_sobral@2: #include leo_sobral@2: #include leo_sobral@2: #include leo_sobral@2: #include leo_sobral@2: #include leo_sobral@2: #include leo_sobral@2: leo_sobral@2: #define G_BEGIN_DECLS leo_sobral@2: rosfran@40: #define GMYTH_FILE_TRANSFER_TYPE (gmyth_file_transfer_get_type ()) rosfran@40: #define GMYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransfer)) rosfran@40: #define GMYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass)) rosfran@40: #define IS_GMYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_TRANSFER_TYPE)) rosfran@40: #define IS_GMYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_TRANSFER_TYPE)) rosfran@40: #define GMYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_FILE_TRANSFER_TYPE, GMythFileTransferClass)) leo_sobral@2: leo_sobral@2: rosfran@40: typedef struct _GMythFileTransfer GMythFileTransfer; rosfran@40: typedef struct _GMythFileTransferClass GMythFileTransferClass; leo_sobral@2: rosfran@40: struct _GMythFileTransferClass leo_sobral@2: { leo_sobral@2: GObjectClass parent_class; leo_sobral@2: leo_sobral@2: /* callbacks */ leo_sobral@2: /* no one for now */ leo_sobral@2: }; leo_sobral@2: rosfran@40: struct _GMythFileTransfer leo_sobral@2: { leo_sobral@2: GObject parent; leo_sobral@2: leo_sobral@2: /* Myth URI structure */ rosfran@40: const GMythURI *uri; leo_sobral@2: leo_sobral@2: /* MythTV version number */ leo_sobral@2: gint mythtv_version; leo_sobral@2: leo_sobral@2: /* socket descriptors */ leo_sobral@2: GMythSocket *control_sock; leo_sobral@2: GMythSocket *event_sock; leo_sobral@2: GMythSocket *sock; leo_sobral@2: leo_sobral@2: guint64 readposition; leo_sobral@2: guint64 filesize; leo_sobral@2: gboolean timeoutisfast; leo_sobral@2: gboolean userreadahead; leo_sobral@2: gboolean live_tv; leo_sobral@2: gint retries; leo_sobral@2: leo_sobral@2: GString *query; leo_sobral@2: leo_sobral@2: gint rec_id; leo_sobral@2: gint recordernum; leo_sobral@2: gint card_id; leo_sobral@2: GString *hostname; leo_sobral@2: gint port; leo_sobral@2: }; leo_sobral@2: rosfran@40: GType gmyth_file_transfer_get_type (void); leo_sobral@2: rosfran@40: GMythFileTransfer* gmyth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version ); leo_sobral@2: rosfran@40: gint gmyth_file_transfer_read(GMythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited); leo_sobral@2: rosfran@40: gint64 gmyth_file_transfer_seek(GMythFileTransfer *transfer, guint64 pos, gint whence); leo_sobral@2: rosfran@40: gboolean gmyth_file_transfer_playback_setup( GMythFileTransfer **transfer, gboolean live_tv ); leo_sobral@2: rosfran@40: gboolean gmyth_file_transfer_setup( GMythFileTransfer **transfer, gboolean live_tv ); leo_sobral@2: rosfran@40: gboolean gmyth_file_transfer_livetv_setup( GMythFileTransfer **transfer, GMythSocket *live_sock ); leo_sobral@2: rosfran@40: void gmyth_file_transfer_spawntv ( GMythFileTransfer *file_transfer, GString *tvchain_id ); leo_sobral@2: rosfran@40: gboolean gmyth_file_transfer_is_recording( GMythFileTransfer *file_transfer ); leo_sobral@2: rosfran@40: gint64 gmyth_file_transfer_get_file_position( GMythFileTransfer *file_transfer ); leo_sobral@2: leo_sobral@2: #define G_END_DECLS leo_sobral@2: rosfran@40: #endif /* __GMYTH_FILE_TRANSFER_H__ */