branches/gmyth-0.1b/src/gmyth_programinfo.h
branchtrunk
changeset 333 f9d778bb88a2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/branches/gmyth-0.1b/src/gmyth_programinfo.h	Wed Feb 07 20:38:39 2007 +0000
     1.3 @@ -0,0 +1,161 @@
     1.4 +/**
     1.5 + * GMyth Library
     1.6 + * 
     1.7 + * @file gmyth/gmyth_common.h
     1.8 + * 
     1.9 + * @brief <p> This file contains basic common functions for the gmyth library.
    1.10 + *
    1.11 + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    1.12 + * @author Leonardo Sobral Cunha <leonardo.cunha@indt.org.br>
    1.13 + *
    1.14 + *//*
    1.15 + * 
    1.16 + * This program is free software; you can redistribute it and/or modify
    1.17 + * it under the terms of the GNU Lesser General Public License as published by
    1.18 + * the Free Software Foundation; either version 2 of the License, or
    1.19 + * (at your option) any later version.
    1.20 + *
    1.21 + * This program is distributed in the hope that it will be useful,
    1.22 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.23 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.24 + * GNU General Public License for more details.
    1.25 + *
    1.26 + * You should have received a copy of the GNU Lesser General Public License
    1.27 + * along with this program; if not, write to the Free Software
    1.28 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.29 + */
    1.30 +
    1.31 +#ifndef _GMYTH_PROGRAMINFO_H
    1.32 +#define _GMYTH_PROGRAMINFO_H
    1.33 +
    1.34 +#include <glib.h>
    1.35 +#include <glib-object.h>
    1.36 +
    1.37 +#include "gmyth_stringlist.h"
    1.38 +
    1.39 +G_BEGIN_DECLS
    1.40 +
    1.41 +#define GMYTH_PROGRAM_INFO_TYPE               (gmyth_program_info_get_type ())
    1.42 +#define GMYTH_PROGRAM_INFO(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_PROGRAM_INFO_TYPE, GMythProgramInfo))
    1.43 +#define GMYTH_PROGRAM_INFO_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_PROGRAM_INFO_TYPE, GMythProgramInfoClass))
    1.44 +#define IS_GMYTH_PROGRAM_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_PROGRAM_INFO_TYPE))
    1.45 +#define IS_GMYTH_PROGRAM_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_PROGRAM_INFO_TYPE))
    1.46 +#define GMYTH_PROGRAM_INFO_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_PROGRAM_INFO_TYPE, GMythProgramInfoClass))
    1.47 +
    1.48 +typedef struct _GMythProgramInfo         GMythProgramInfo;
    1.49 +typedef struct _GMythProgramInfoClass    GMythProgramInfoClass;
    1.50 +
    1.51 +struct _GMythProgramInfoClass
    1.52 +{
    1.53 +  GObjectClass parent_class;
    1.54 +
    1.55 +  /* callbacks */
    1.56 +};
    1.57 +
    1.58 +/**
    1.59 + * The GMythProgramInfo structure represents a program information
    1.60 + * stored in the database. It could be a program from the EPG data,
    1.61 + * a program scheduled to be recorded, or a program already recorded.
    1.62 + */
    1.63 +struct _GMythProgramInfo
    1.64 +{
    1.65 +	GObject 						parent;
    1.66 +
    1.67 +	/** The channel unique ID. */
    1.68 +  GString *chanid;
    1.69 +  
    1.70 +  /** The program start time. */
    1.71 +  GTimeVal* startts;
    1.72 +  /** The program end time. */
    1.73 +  GTimeVal* endts;
    1.74 +  /** The recording schedule start time. */
    1.75 +  GTimeVal* recstartts;
    1.76 +  /** The recording schedule end time */
    1.77 +  GTimeVal* recendts;
    1.78 +  
    1.79 +  /** The program title. */
    1.80 +  GString *title;
    1.81 +  /** The program subtitle. */
    1.82 +  GString *subtitle;
    1.83 +  /** The program description. */
    1.84 +  GString *description;
    1.85 +  /** The program category. */
    1.86 +  GString *category;
    1.87 +  
    1.88 +  GString *chanstr;
    1.89 +  GString *chansign;
    1.90 +  /** The associated channel name. */
    1.91 +  GString *channame;
    1.92 +  gint chancommfree;
    1.93 +  GString *chanOutputFilters;
    1.94 +  
    1.95 +  GString *seriesid;
    1.96 +  /** The program unique id. */
    1.97 +  GString *programid;
    1.98 +  GString *catType;
    1.99 +
   1.100 +  GString *sortTitle;  
   1.101 +
   1.102 +	/** A flag informing if the program has video or not. */    
   1.103 +  gboolean isVideo;
   1.104 +  gint lenMins;
   1.105 +  
   1.106 +  GString *year;    
   1.107 +  gdouble stars;
   1.108 +  gint repeat;
   1.109 +  
   1.110 +  GTimeVal* originalAirDate;
   1.111 +  GTimeVal* lastmodified;
   1.112 +  GTimeVal* lastInUseTime;
   1.113 +  
   1.114 +  gboolean hasAirDate;
   1.115 +
   1.116 +  gint spread;
   1.117 +  gint startCol;
   1.118 +
   1.119 +  gint recpriority2;
   1.120 +  gint reactivate;    
   1.121 +
   1.122 +  gint recordid;
   1.123 +  gint parentid;   
   1.124 +  
   1.125 +  /** The backend video source id associated to this program.*/
   1.126 +  gint sourceid;
   1.127 +  /** the backend input id associated to this program.*/
   1.128 +  gint inputid;
   1.129 +  /** The backend card id associated to this program.*/
   1.130 +  gint cardid;
   1.131 +  gboolean shareable;
   1.132 +  gboolean duplicate;
   1.133 +
   1.134 +  GString * schedulerid;
   1.135 +  gint findid;
   1.136 +
   1.137 +  gint programflags;
   1.138 +  gint transcoder;
   1.139 +
   1.140 +  GString *recgroup;
   1.141 +  GString *playgroup;
   1.142 +  gint recpriority;
   1.143 +
   1.144 +	/** The file size of the recorded program.*/
   1.145 +  gint64 filesize;
   1.146 +  
   1.147 +  /** The file name of the recorded program.*/
   1.148 +  GString *pathname;
   1.149 +  GString *hostname;
   1.150 +      
   1.151 +  /* AvailableStatusType availableStatus;*/
   1.152 +
   1.153 +};
   1.154 +
   1.155 +GType          			gmyth_program_info_type (void);
   1.156 +
   1.157 +GMythProgramInfo* 	gmyth_program_info_new (void);
   1.158 +
   1.159 +GMythStringList* 		gmyth_program_info_to_string_list (GMythProgramInfo *prog, GMythStringList *slist);
   1.160 +GMythProgramInfo* 	gmyth_program_info_from_string_list (GMythStringList *slist);
   1.161 +
   1.162 +G_END_DECLS
   1.163 +
   1.164 +#endif /*_GMYTH_PROGRAMINFO_H*/