gmyth/src/gmyth_file_local.h
author renatofilho
Thu Jun 14 18:19:52 2007 +0100 (2007-06-14)
branchtrunk
changeset 750 312d6bc514f3
parent 701 2f28edb4d804
child 754 cb885ee44618
permissions -rwxr-xr-x
[svn r756] fixed indent using GNU Style
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_file_local_local.h
     5  * 
     6  * @brief <p> GMythFileLocal is the parent GMythFile that deals with the file streaming 
     7  * media local transfering from the MythTV backend.
     8  *
     9  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    10  * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
    11  *
    12  * 
    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.
    17  *
    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.
    22  *
    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
    26  */
    27 
    28 #ifndef __GMYTH_FILE_LOCAL_H__
    29 #define __GMYTH_FILE_LOCAL_H__
    30 
    31 #include <glib-object.h>
    32 #include <glib.h>
    33 
    34 #include "gmyth_file.h"
    35 #include "gmyth_uri.h"
    36 #include "gmyth_backendinfo.h"
    37 
    38 #include <stdio.h>
    39 #include <stdlib.h>
    40 #include <string.h>
    41 #include <netdb.h>
    42 #include <sys/socket.h>
    43 #include <unistd.h>
    44 
    45 G_BEGIN_DECLS
    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;
    55 
    56 struct _GMythFileLocal
    57 {
    58   GMythFile parent;
    59 };
    60 
    61 struct _GMythFileLocalClass
    62 {
    63   GMythFileClass parent_class;
    64 };
    65 
    66 
    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);
    76 
    77 GMythFileReadResult
    78 gmyth_file_local_read(GMythFileLocal * file_local,
    79 					  GByteArray * data, gint size, gboolean read_unlimited);
    80 
    81 gint64 gmyth_file_local_seek(GMythFileLocal * file_local,
    82 							 gint64 pos, GSeekType whence);
    83 
    84 guint64 gmyth_file_local_get_filesize(GMythFileLocal * file_local);
    85 void gmyth_file_local_set_filesize(GMythFileLocal * file, guint64 filesize);
    86 
    87 gint64 gmyth_file_local_get_offset(GMythFileLocal * file_local);
    88 void gmyth_file_local_set_offset(GMythFileLocal * file_local, gint64 offset);
    89 
    90 G_END_DECLS
    91 #endif /* __GMYTH_FILE_LOCAL_H__ */