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