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