gmyth/src/gmyth_programinfo.h
author renatofilho
Wed Jan 23 20:04:22 2008 +0000 (2008-01-23)
branchtrunk
changeset 890 6b565181036e
parent 841 25fb81d23ef5
child 895 4bdd0f922b68
permissions -rw-r--r--
[svn r896] fixed channel_id, program_id types
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_programinfo.h
     5  * 
     6  * @brief <p> GMythProgramInfo representing the program info, with the
     7  * configuration data to the actual remote file in the TV chain.
     8  *
     9  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    10  * @author Rosfran Borges <rosfran.borges@indt.org.br>
    11  * @author Leonardo Sobral Cunha <leonardo.cunha@indt.org.br>
    12  *
    13  * 
    14  * This program is free software; you can redistribute it and/or modify
    15  * it under the terms of the GNU Lesser General Public License as published by
    16  * the Free Software Foundation; either version 2 of the License, or
    17  * (at your option) any later version.
    18  *
    19  * This program is distributed in the hope that it will be useful,
    20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    22  * GNU General Public License for more details.
    23  *
    24  * You should have received a copy of the GNU Lesser General Public License
    25  * along with this program; if not, write to the Free Software
    26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    27  *
    28  */
    29 
    30 #ifndef _GMYTH_PROGRAMINFO_H
    31 #define _GMYTH_PROGRAMINFO_H
    32 
    33 #include <glib.h>
    34 #include <glib-object.h>
    35 
    36 #include "gmyth_stringlist.h"
    37 
    38 G_BEGIN_DECLS
    39 #define GMYTH_PROGRAM_INFO_TYPE               (gmyth_program_info_get_type ())
    40 #define GMYTH_PROGRAM_INFO(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_PROGRAM_INFO_TYPE, GMythProgramInfo))
    41 #define GMYTH_PROGRAM_INFO_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_PROGRAM_INFO_TYPE, GMythProgramInfoClass))
    42 #define IS_GMYTH_PROGRAM_INFO(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_PROGRAM_INFO_TYPE))
    43 #define IS_GMYTH_PROGRAM_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_PROGRAM_INFO_TYPE))
    44 #define GMYTH_PROGRAM_INFO_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_PROGRAM_INFO_TYPE, GMythProgramInfoClass))
    45 typedef struct _GMythProgramInfo GMythProgramInfo;
    46 typedef struct _GMythProgramInfoClass GMythProgramInfoClass;
    47 
    48 struct _GMythProgramInfoClass {
    49     GObjectClass    parent_class;
    50 
    51     /*
    52      * callbacks 
    53      */
    54 };
    55 
    56 /**
    57  * The GMythProgramInfo structure represents a program information
    58  * stored in the database. It could be a program from the EPG data,
    59  * a program scheduled to be recorded, or a program already recorded.
    60  */
    61 struct _GMythProgramInfo {
    62     GObject         parent;
    63 
    64     /** The channel unique ID. */
    65     gint            xx_channel_id;
    66     /** The program start time. */
    67     GTimeVal       *startts;
    68     /** The program end time. */
    69     GTimeVal       *endts;
    70     /** The recording schedule start time. */
    71     GTimeVal       *recstartts;
    72     /** The recording schedule end time */
    73     GTimeVal       *recendts;
    74 
    75     /** The program title. */
    76     GString        *title;
    77     /** The program subtitle. */
    78     GString        *subtitle;
    79     /** The program description. */
    80     GString        *description;
    81     /** The program category. */
    82     GString        *category;
    83 
    84     GString        *chanstr;
    85     GString        *chansign;
    86     /** The associated channel name. */
    87     GString        *channame;
    88     gint            chancommfree;
    89     GString        *chanOutputFilters;
    90 
    91     GString        *seriesid;
    92     /** The program unique id. */
    93     GString        *xx_program_id;
    94     GString        *catType;
    95 
    96     GString        *sortTitle;
    97 
    98     /** A flag informing if the program has video or not. */
    99     gboolean        isVideo;
   100     gint            lenMins;
   101 
   102     GString        *year;
   103     gdouble         stars;
   104     gint            repeat;
   105 
   106     GTimeVal       *originalAirDate;
   107     GTimeVal       *lastmodified;
   108     GTimeVal       *lastInUseTime;
   109 
   110     gboolean        hasAirDate;
   111 
   112     gint            spread;
   113     gint            startCol;
   114 
   115     gint            recpriority2;
   116     gint            reactivate;
   117 
   118     gint            recordid;
   119     gint            parentid;
   120 
   121     /** The backend video source id associated to this program.*/
   122     gint            sourceid;
   123     /** the backend input id associated to this program.*/
   124     gint            inputid;
   125     /** The backend card id associated to this program.*/
   126     gint            cardid;
   127     gboolean        shareable;
   128     gboolean        duplicate;
   129 
   130     GString        *schedulerid;
   131     gint            findid;
   132 
   133     gint            programflags;
   134     gint            transcoder;
   135 
   136     GString        *recgroup;
   137     GString        *playgroup;
   138     gint            rectype;
   139     gint            recstatus;
   140     gint            recpriority;
   141     gint            dupin;
   142     gint            dupmethod;
   143 
   144     /** The file size of the recorded program.*/
   145     gint64          filesize;
   146 
   147     /** The file name of the recorded program.*/
   148     GString        *pathname;
   149     GString        *hostname;
   150 };
   151 
   152 GType           gmyth_program_info_type(void);
   153 
   154 GMythProgramInfo *gmyth_program_info_new(void);
   155 
   156 GMythStringList *gmyth_program_info_to_string_list(GMythProgramInfo * prog,
   157                                                    GMythStringList *
   158                                                    slist);
   159 
   160 GMythProgramInfo
   161     * gmyth_program_info_from_string_list_from_pos(GMythStringList * slist,
   162                                                    guint pos);
   163 
   164 GMythProgramInfo *gmyth_program_info_from_string_list(GMythStringList *
   165                                                       slist);
   166 
   167 GMythProgramInfo
   168     * gmyth_program_info_from_string_list_next_prog(GMythStringList *
   169                                                     slist);
   170 
   171 const gchar    *gmyth_program_info_to_string(const GMythProgramInfo *
   172                                              prog);
   173 
   174 gboolean        gmyth_program_info_is_equals(const GMythProgramInfo *
   175                                              prog1,
   176                                              const GMythProgramInfo *
   177                                              prog2);
   178 
   179 G_END_DECLS
   180 #endif /*_GMYTH_PROGRAMINFO_H*/