gmyth/src/libgmyth/gmyth_common.h
author leo_sobral
Wed Sep 20 23:45:35 2006 +0100 (2006-09-20)
branchtrunk
changeset 1 ffdf467315ec
child 6 051875c9e136
permissions -rw-r--r--
[svn r2] imported to sf repository
leo_sobral@1
     1
/**
leo_sobral@1
     2
 * GMyth Library
leo_sobral@1
     3
 * 
leo_sobral@1
     4
 * @file gmyth/gmyth_common.h
leo_sobral@1
     5
 * 
leo_sobral@1
     6
 * @brief <p> This file contains basic common functions for the gmyth library.
leo_sobral@1
     7
 *
leo_sobral@1
     8
 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
leo_sobral@1
     9
 * @author Leonardo Sobral Cunha <leonardo.cunha@indt.org.br>
leo_sobral@1
    10
 *
leo_sobral@1
    11
 *//*
leo_sobral@1
    12
 * 
leo_sobral@1
    13
 * This program is free software; you can redistribute it and/or modify
leo_sobral@1
    14
 * it under the terms of the GNU Lesser General Public License as published by
leo_sobral@1
    15
 * the Free Software Foundation; either version 2 of the License, or
leo_sobral@1
    16
 * (at your option) any later version.
leo_sobral@1
    17
 *
leo_sobral@1
    18
 * This program is distributed in the hope that it will be useful,
leo_sobral@1
    19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
leo_sobral@1
    20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
leo_sobral@1
    21
 * GNU General Public License for more details.
leo_sobral@1
    22
 *
leo_sobral@1
    23
 * You should have received a copy of the GNU Lesser General Public License
leo_sobral@1
    24
 * along with this program; if not, write to the Free Software
leo_sobral@1
    25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
leo_sobral@1
    26
 */
leo_sobral@1
    27
leo_sobral@1
    28
#ifndef GMYTH_COMMON_H_
leo_sobral@1
    29
#define GMYTH_COMMON_H_
leo_sobral@1
    30
leo_sobral@1
    31
#include <glib.h>
leo_sobral@1
    32
#include <time.h>
leo_sobral@1
    33
leo_sobral@1
    34
/**
leo_sobral@1
    35
 * The GMythChannelInfo structure represents the channel information
leo_sobral@1
    36
 * stored in the backend database.
leo_sobral@1
    37
 */
leo_sobral@1
    38
typedef struct {
leo_sobral@1
    39
	/** The channel ID in backend database */
leo_sobral@1
    40
	int channel_ID;
leo_sobral@1
    41
	
leo_sobral@1
    42
	/** The channel name in backend database */
leo_sobral@1
    43
	GString *channel_name;
leo_sobral@1
    44
leo_sobral@1
    45
} GMythChannelInfo;
leo_sobral@1
    46
leo_sobral@1
    47
leo_sobral@1
    48
/**
leo_sobral@1
    49
 * The GMythProgramInfo structure represents a program information
leo_sobral@1
    50
 * stored in the database. It could be a program from the EPG data,
leo_sobral@1
    51
 * a program scheduled to be recorded, or a program already recorded.
leo_sobral@1
    52
 */
leo_sobral@1
    53
typedef struct {
leo_sobral@1
    54
	
leo_sobral@1
    55
	/** The channel unique ID. */
leo_sobral@1
    56
    GString *chanid;
leo_sobral@1
    57
    
leo_sobral@1
    58
    /** The program start time. */
leo_sobral@1
    59
    time_t startts;
leo_sobral@1
    60
    /** The program end time. */
leo_sobral@1
    61
    time_t endts;
leo_sobral@1
    62
    /** The recording schedule start time. */
leo_sobral@1
    63
    time_t recstartts;
leo_sobral@1
    64
    /** The recording schedule end time */
leo_sobral@1
    65
    time_t recendts;
leo_sobral@1
    66
    
leo_sobral@1
    67
    /** The program title. */
leo_sobral@1
    68
    GString *title;
leo_sobral@1
    69
    /** The program subtitle. */
leo_sobral@1
    70
    GString *subtitle;
leo_sobral@1
    71
    /** The program description. */
leo_sobral@1
    72
    GString *description;
leo_sobral@1
    73
    /** The program category. */
leo_sobral@1
    74
    GString *category;
leo_sobral@1
    75
    
leo_sobral@1
    76
    GString *chanstr;
leo_sobral@1
    77
    GString *chansign;
leo_sobral@1
    78
    /** The associated channel name. */
leo_sobral@1
    79
    GString *channame;
leo_sobral@1
    80
    int chancommfree;
leo_sobral@1
    81
    GString *chanOutputFilters;
leo_sobral@1
    82
    
leo_sobral@1
    83
    GString *seriesid;
leo_sobral@1
    84
    /** The program unique id. */
leo_sobral@1
    85
    GString *programid;
leo_sobral@1
    86
    GString * catType;
leo_sobral@1
    87
leo_sobral@1
    88
    GString * sortTitle;  
leo_sobral@1
    89
leo_sobral@1
    90
	/** A flag informing if the program has video or not. */    
leo_sobral@1
    91
    gboolean isVideo;
leo_sobral@1
    92
    int lenMins;
leo_sobral@1
    93
    
leo_sobral@1
    94
    GString *year;    
leo_sobral@1
    95
    double stars;
leo_sobral@1
    96
    int repeat;
leo_sobral@1
    97
    
leo_sobral@1
    98
    time_t originalAirDate;
leo_sobral@1
    99
    time_t lastmodified;
leo_sobral@1
   100
    time_t lastInUseTime;
leo_sobral@1
   101
    
leo_sobral@1
   102
    gboolean hasAirDate;
leo_sobral@1
   103
leo_sobral@1
   104
    int spread;
leo_sobral@1
   105
    int startCol;
leo_sobral@1
   106
leo_sobral@1
   107
//    enum RecStatusType recstatus;
leo_sobral@1
   108
//    enum RecStatusType oldrecstatus;
leo_sobral@1
   109
//    enum RecStatusType savedrecstatus;
leo_sobral@1
   110
    int recpriority2;
leo_sobral@1
   111
    int reactivate;    
leo_sobral@1
   112
leo_sobral@1
   113
    int recordid;
leo_sobral@1
   114
    int parentid;   
leo_sobral@1
   115
    //enum RecordingType rectype;
leo_sobral@1
   116
    //enum RecordingDupInType dupin;
leo_sobral@1
   117
    //enum RecordingDupMethodType dupmethod;
leo_sobral@1
   118
    
leo_sobral@1
   119
    /** The backend video source id associated to this program.*/
leo_sobral@1
   120
    int sourceid;
leo_sobral@1
   121
    /** the backend input id associated to this program.*/
leo_sobral@1
   122
    int inputid;
leo_sobral@1
   123
    /** The backend card id associated to this program.*/
leo_sobral@1
   124
    int cardid;
leo_sobral@1
   125
    gboolean shareable;
leo_sobral@1
   126
    gboolean duplicate;
leo_sobral@1
   127
  
leo_sobral@1
   128
    GString * schedulerid;
leo_sobral@1
   129
    int findid;
leo_sobral@1
   130
leo_sobral@1
   131
    int programflags;
leo_sobral@1
   132
    int transcoder;
leo_sobral@1
   133
leo_sobral@1
   134
    //proginfo->spread = -1;
leo_sobral@1
   135
    //proginfo->programflags = proginfo->getProgramFlags();
leo_sobral@1
   136
leo_sobral@1
   137
    GString *recgroup;
leo_sobral@1
   138
    GString *playgroup;
leo_sobral@1
   139
    int recpriority;
leo_sobral@1
   140
leo_sobral@1
   141
	/** The file size of the recorded program.*/
leo_sobral@1
   142
    long long filesize;
leo_sobral@1
   143
    /** The file name of the recorded program.*/
leo_sobral@1
   144
    GString *pathname;
leo_sobral@1
   145
    GString *hostname;
leo_sobral@1
   146
        
leo_sobral@1
   147
    /* AvailableStatusType availableStatus;*/
leo_sobral@1
   148
 
leo_sobral@1
   149
} GMythProgramInfo;
leo_sobral@1
   150
leo_sobral@1
   151
leo_sobral@1
   152
void gmyth_free_channel_list(GList *list);
leo_sobral@1
   153
void gmyth_free_program_list(GList *list);
leo_sobral@1
   154
leo_sobral@1
   155
#endif /* GMYTH_COMMON_H_ */