4 * @file gmyth/gmyth_file_local_local.h
6 * @brief <p> GMythFileLocal is the parent GMythFile that deals with the file streaming
7 * media local transfering from the MythTV backend.
9 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
10 * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU Lesser General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU Lesser General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef __GMYTH_FILE_LOCAL_H__
29 #define __GMYTH_FILE_LOCAL_H__
31 #include <glib-object.h>
34 #include "gmyth_file.h"
35 #include "gmyth_uri.h"
36 #include "gmyth_backendinfo.h"
42 #include <sys/socket.h>
46 #define GMYTH_FILE_LOCAL_TYPE (gmyth_file_local_get_type ())
47 #define GMYTH_FILE_LOCAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_FILE_LOCAL_TYPE, GMythFileLocal))
48 #define GMYTH_FILE_LOCAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_LOCAL_TYPE, GMythFileLocalClass))
49 #define IS_GMYTH_FILE_LOCAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_FILE_LOCAL_TYPE))
50 #define IS_GMYTH_FILE_LOCAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_FILE_LOCAL_TYPE))
51 #define GMYTH_FILE_LOCAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_FILE_LOCAL_TYPE, GMythFileLocalClass))
52 typedef struct _GMythFileLocal GMythFileLocal;
53 typedef struct _GMythFileLocalClass GMythFileLocalClass;
54 typedef struct _GMythFileLocalPrivate GMythFileLocalPrivate;
56 struct _GMythFileLocal
61 struct _GMythFileLocalClass
63 GMythFileClass parent_class;
67 GType gmyth_file_local_get_type(void);
68 GMythFileLocal *gmyth_file_local_new(GMythBackendInfo * backend_info);
69 GMythFileLocal *gmyth_file_local_new_with_uri(const gchar * uri);
70 gchar *gmyth_file_local_get_file_name(GMythFileLocal * file_local);
71 void gmyth_file_local_set_file_name(GMythFileLocal * file_local,
72 const gchar * filename);
73 gboolean gmyth_file_local_open(GMythFileLocal * file_local);
74 void gmyth_file_local_close(GMythFileLocal * file_local);
75 gboolean gmyth_file_local_is_open(GMythFileLocal * file_local);
78 gmyth_file_local_read(GMythFileLocal * file_local,
79 GByteArray * data, gint size, gboolean read_unlimited);
81 gint64 gmyth_file_local_seek(GMythFileLocal * file_local,
82 gint64 pos, GSeekType whence);
84 guint64 gmyth_file_local_get_filesize(GMythFileLocal * file_local);
85 void gmyth_file_local_set_filesize(GMythFileLocal * file, guint64 filesize);
87 gint64 gmyth_file_local_get_offset(GMythFileLocal * file_local);
88 void gmyth_file_local_set_offset(GMythFileLocal * file_local, gint64 offset);
91 #endif /* __GMYTH_FILE_LOCAL_H__ */