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: leo_sobral@2: #ifndef __MYTH_FILE_TRANSFER_H__ leo_sobral@2: #define __MYTH_FILE_TRANSFER_H__ leo_sobral@2: leo_sobral@2: #include leo_sobral@2: leo_sobral@2: #include leo_sobral@2: #include "myth_uri.h" leo_sobral@2: #include "myth_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: leo_sobral@2: #define MYTH_FILE_TRANSFER_TYPE (myth_file_transfer_get_type ()) leo_sobral@2: #define MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransfer)) leo_sobral@2: #define MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass)) leo_sobral@2: #define IS_MYTH_FILE_TRANSFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYTH_FILE_TRANSFER_TYPE)) leo_sobral@2: #define IS_MYTH_FILE_TRANSFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MYTH_FILE_TRANSFER_TYPE)) leo_sobral@2: #define MYTH_FILE_TRANSFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MYTH_FILE_TRANSFER_TYPE, MythFileTransferClass)) leo_sobral@2: leo_sobral@2: leo_sobral@2: typedef struct _MythFileTransfer MythFileTransfer; leo_sobral@2: typedef struct _MythFileTransferClass MythFileTransferClass; leo_sobral@2: leo_sobral@2: struct _MythFileTransferClass 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: leo_sobral@2: struct _MythFileTransfer leo_sobral@2: { leo_sobral@2: GObject parent; leo_sobral@2: leo_sobral@2: /* Myth URI structure */ leo_sobral@2: const MythURI *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: leo_sobral@2: GType myth_file_transfer_get_type (void); leo_sobral@2: leo_sobral@2: MythFileTransfer* myth_file_transfer_new (gint num, GString *hostname, gshort port, gint mythtv_version ); leo_sobral@2: leo_sobral@2: gint myth_file_transfer_read(MythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited); leo_sobral@2: leo_sobral@2: guint64 myth_file_transfer_seek(MythFileTransfer *transfer, guint64 pos, gint whence); leo_sobral@2: leo_sobral@2: gboolean myth_file_transfer_playback_setup( MythFileTransfer **transfer, gboolean live_tv ); leo_sobral@2: leo_sobral@2: gboolean myth_file_transfer_setup( MythFileTransfer **transfer, gboolean live_tv ); leo_sobral@2: leo_sobral@2: gboolean myth_file_transfer_livetv_setup( MythFileTransfer **transfer, GMythSocket *live_sock ); leo_sobral@2: leo_sobral@2: void myth_file_transfer_spawntv ( MythFileTransfer *file_transfer, GString *tvchain_id ); leo_sobral@2: leo_sobral@2: gboolean myth_file_transfer_is_recording( MythFileTransfer *file_transfer ); leo_sobral@2: leo_sobral@2: guint64 myth_file_transfer_get_file_position( MythFileTransfer *file_transfer ); leo_sobral@2: leo_sobral@2: #define G_END_DECLS leo_sobral@2: leo_sobral@2: #endif /* __MYTH_FILE_TRANSFER_H__ */