[svn r707] Fixed the wrong commentary indentation.
4 * @file gmyth/gmyth_programinfo.c
6 * @brief <p> GMythProgramInfo representing the program info, with the
7 * configuration data to the actual remote file in the TV chain.
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>
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.
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.
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
38 #include "gmyth_programinfo.h"
39 #include "gmyth_util.h"
40 #include "gmyth_debug.h"
42 static void gmyth_program_info_class_init ( GMythProgramInfoClass * klass );
43 static void gmyth_program_info_init ( GMythProgramInfo * object );
45 static void gmyth_program_info_dispose ( GObject * object );
46 static void gmyth_program_info_finalize ( GObject * object );
48 G_DEFINE_TYPE ( GMythProgramInfo, gmyth_program_info, G_TYPE_OBJECT )
49 static const gchar *gmyth_program_info_non_null_value ( const GString *
52 static void gmyth_program_info_class_init ( GMythProgramInfoClass * klass )
54 GObjectClass *gobject_class = G_OBJECT_CLASS ( klass );
56 gobject_class->dispose = gmyth_program_info_dispose;
57 gobject_class->finalize = gmyth_program_info_finalize;
61 gmyth_program_info_init ( GMythProgramInfo * gmyth_program_info )
63 gmyth_program_info->chancommfree = 0;
65 /** A flag informing if the program has video or not. */
66 gmyth_program_info->isVideo = FALSE;
67 gmyth_program_info->lenMins = 0;
69 gmyth_program_info->stars = 0.0f;
70 gmyth_program_info->repeat = 0;
72 gmyth_program_info->hasAirDate = FALSE;
74 gmyth_program_info->spread = 0;
75 gmyth_program_info->startCol = 0;
77 gmyth_program_info->recpriority2 = 0;
78 gmyth_program_info->reactivate = 0;
80 gmyth_program_info->recordid = 0;
81 gmyth_program_info->parentid = 0;
83 /** The backend video source id associated to this program.*/
84 gmyth_program_info->sourceid = 0;
85 /** the backend input id associated to this program.*/
86 gmyth_program_info->inputid = 0;
87 /** The backend card id associated to this program.*/
88 gmyth_program_info->cardid = 0;
89 gmyth_program_info->shareable = FALSE;
90 gmyth_program_info->duplicate = FALSE;
92 gmyth_program_info->findid = 0;
94 gmyth_program_info->programflags = 0;
95 gmyth_program_info->transcoder = 0;
97 gmyth_program_info->recpriority = 0;
99 /** The file size of the recorded program.*/
100 gmyth_program_info->filesize = -1;
104 gmyth_program_info_dispose ( GObject * object )
106 GMythProgramInfo *gmyth_program_info = GMYTH_PROGRAM_INFO ( object );
108 if ( gmyth_program_info->chanid != NULL )
110 g_string_free ( gmyth_program_info->chanid, TRUE );
111 gmyth_program_info->chanid = NULL;
114 /** The program start time. */
115 g_free ( gmyth_program_info->startts );
117 /** The program end time. */
118 g_free ( gmyth_program_info->endts );
120 /** The recording schedule start time. */
121 g_free ( gmyth_program_info->recstartts );
123 /** The recording schedule end time */
124 g_free ( gmyth_program_info->recendts );
126 /** The program title. */
127 if ( gmyth_program_info->title != NULL )
129 g_string_free ( gmyth_program_info->title, TRUE );
130 gmyth_program_info->title = NULL;
133 /** The program subtitle. */
134 if ( gmyth_program_info->subtitle != NULL )
136 g_string_free ( gmyth_program_info->subtitle, TRUE );
137 gmyth_program_info->subtitle = NULL;
140 /** The program description. */
141 if ( gmyth_program_info->description != NULL )
143 g_string_free ( gmyth_program_info->description, TRUE );
144 gmyth_program_info->description = NULL;
147 /** The program category. */
148 if ( gmyth_program_info->category != NULL )
150 g_string_free ( gmyth_program_info->category, TRUE );
151 gmyth_program_info->category = NULL;
154 if ( gmyth_program_info->chanstr != NULL )
156 g_string_free ( gmyth_program_info->chanstr, TRUE );
157 gmyth_program_info->chanstr = NULL;
160 if ( gmyth_program_info->chansign != NULL )
162 g_string_free ( gmyth_program_info->chansign, TRUE );
163 gmyth_program_info->chansign = NULL;
166 /** The associated channel name. */
167 if ( gmyth_program_info->channame != NULL )
169 g_string_free ( gmyth_program_info->channame, TRUE );
170 gmyth_program_info->channame = NULL;
173 if ( gmyth_program_info->chanOutputFilters != NULL )
175 g_string_free ( gmyth_program_info->chanOutputFilters, TRUE );
176 gmyth_program_info->chanOutputFilters = NULL;
179 if ( gmyth_program_info->seriesid != NULL )
181 g_string_free ( gmyth_program_info->seriesid, TRUE );
182 gmyth_program_info->chanOutputFilters = NULL;
185 /** The program unique id. */
186 if ( gmyth_program_info->programid != NULL )
188 g_string_free ( gmyth_program_info->programid, TRUE );
189 gmyth_program_info->programid = NULL;
192 if ( gmyth_program_info->catType != NULL )
194 g_string_free ( gmyth_program_info->catType, TRUE );
195 gmyth_program_info->catType = NULL;
198 if ( gmyth_program_info->sortTitle != NULL )
200 g_string_free ( gmyth_program_info->sortTitle, TRUE );
201 gmyth_program_info->sortTitle = NULL;
204 if ( gmyth_program_info->year != NULL )
206 g_string_free ( gmyth_program_info->year, TRUE );
207 gmyth_program_info->year = NULL;
210 g_free ( gmyth_program_info->originalAirDate );
212 g_free ( gmyth_program_info->lastmodified );
214 g_free ( gmyth_program_info->lastInUseTime );
216 if ( gmyth_program_info->schedulerid != NULL )
218 g_string_free ( gmyth_program_info->schedulerid, TRUE );
219 gmyth_program_info->schedulerid = NULL;
222 if ( gmyth_program_info->recgroup != NULL )
224 g_string_free ( gmyth_program_info->recgroup, TRUE );
225 gmyth_program_info->recgroup = NULL;
228 if ( gmyth_program_info->playgroup != NULL )
230 g_string_free ( gmyth_program_info->playgroup, TRUE );
231 gmyth_program_info->playgroup = NULL;
234 /** The file name of the recorded program.*/
235 if ( gmyth_program_info->pathname != NULL )
237 g_string_free ( gmyth_program_info->pathname, TRUE );
238 gmyth_program_info->pathname = NULL;
241 if ( gmyth_program_info->hostname != NULL )
243 g_string_free ( gmyth_program_info->hostname, TRUE );
244 gmyth_program_info->hostname = NULL;
247 G_OBJECT_CLASS ( gmyth_program_info_parent_class )->dispose ( object );
251 gmyth_program_info_finalize ( GObject * object )
253 g_signal_handlers_destroy ( object );
255 G_OBJECT_CLASS ( gmyth_program_info_parent_class )->finalize ( object );
259 * Creates a new instance of GMythProgramInfo.
261 * @return a new instance of GMythProgramInfo.
264 gmyth_program_info_new ( void )
266 GMythProgramInfo *program_info =
267 GMYTH_PROGRAM_INFO ( g_object_new ( GMYTH_PROGRAM_INFO_TYPE, NULL ) );
273 * Converts an instance of a GMythProgramInfo, to a GMythStringList.
275 * @param prog A GMythProgramInfo instance.
276 * @param slist The GMythStringList to be passed to this function, in order to
277 * give the responsibility of the string list creation to the
280 * @return a GMythStringList with the program info fields.
283 gmyth_program_info_to_string_list ( GMythProgramInfo * prog,
284 GMythStringList * slist )
286 g_return_val_if_fail ( prog != NULL, NULL );
287 g_return_val_if_fail ( slist != NULL, NULL );
289 gmyth_string_list_append_string ( slist, prog->title ); /* 0 */
290 gmyth_string_list_append_string ( slist, prog->subtitle ); /* 1 */
291 gmyth_string_list_append_string ( slist, prog->description ); /* 2 */
292 gmyth_string_list_append_string ( slist, prog->category ); /* 3 */
293 gmyth_string_list_append_string ( slist, prog->chanid ); /* 4 */
294 gmyth_string_list_append_string ( slist, prog->chanstr ); /* 5 */
295 gmyth_string_list_append_string ( slist, prog->chansign ); /* 6 */
296 gmyth_string_list_append_string ( slist, prog->channame ); /* 7 */
297 gmyth_string_list_append_string ( slist, prog->pathname ); /* 8 */
298 gmyth_string_list_append_int64 ( slist, 0 ); /* 9 */
301 //gmyth_string_list_append_int64 (slist, 100/*prog->filesize*/); /* 9 */
302 //gmyth_string_list_append_int (slist, 0); /* 10 */
305 gmyth_string_list_append_int ( slist, prog->startts->tv_sec ); /* 11 *///DATETIME_TO_LIST(startts)
307 gmyth_string_list_append_int ( slist, 0 );
310 gmyth_string_list_append_int ( slist, prog->endts->tv_sec ); /* 12 *///DATETIME_TO_LIST(endts)
312 gmyth_string_list_append_int ( slist, 0 );
314 gmyth_string_list_append_int ( slist, prog->duplicate ); /* 13 */
315 gmyth_string_list_append_int ( slist, prog->shareable ); /* 14 */
316 gmyth_string_list_append_int ( slist, prog->findid ); /* 15 */
317 gmyth_string_list_append_string ( slist, prog->hostname ); /* 16 */
318 gmyth_string_list_append_int ( slist, prog->sourceid ); /* 17 */
319 gmyth_string_list_append_int ( slist, prog->cardid ); /* 18 */
320 gmyth_string_list_append_int ( slist, prog->inputid ); /* 19 */
321 gmyth_string_list_append_int ( slist, prog->recpriority ); /* 20 */
322 gmyth_string_list_append_int ( slist, 0 /*prog->recstatus */ ); /* 21 */
323 gmyth_string_list_append_int ( slist, prog->recordid ); /* 22 */
324 gmyth_string_list_append_int ( slist, 0 /*prog->rectype */ ); /* 23 */
325 gmyth_string_list_append_int ( slist, 0 /*prog->dupin */ ); /* 24 */
326 gmyth_string_list_append_int ( slist, 0 /*prog->dupmethod */ ); /* 25 */
327 gmyth_string_list_append_int ( slist, prog->recstartts != NULL ? prog->recstartts->tv_sec : 0 ); /* 26 *///DATETIME_TO_LIST(recstartts)
328 gmyth_string_list_append_int ( slist, prog->recendts != NULL ? prog->recendts->tv_sec : 0 ); /* 27 *///DATETIME_TO_LIST(recendts)
329 gmyth_string_list_append_int ( slist, prog->repeat ); /* 28 */
330 gmyth_string_list_append_int ( slist, prog->programflags ); /* 29 */
331 gmyth_string_list_append_char_array ( slist, "Default" ); /* 30 *///prog->(recgroup != "") ? recgroup : "Default")
332 gmyth_string_list_append_int ( slist, prog->chancommfree ); /* 31 */
333 gmyth_string_list_append_string ( slist, prog->chanOutputFilters ); /* 32 */
334 gmyth_string_list_append_string ( slist, prog->seriesid ); /* 33 */
335 gmyth_string_list_append_string ( slist, prog->programid ); /* 34 */
336 gmyth_string_list_append_char_array ( slist, "" ); /* 35 */
337 gmyth_string_list_append_int ( slist, prog->lastmodified != NULL ? prog->lastmodified->tv_sec : 0 ); /* 36 *///DATETIME_TO_LIST(lastmodified)
338 gmyth_string_list_append_int ( slist, 0 ); /* 37 *///FLOAT_TO_LIST(stars)
339 gmyth_string_list_append_int ( slist, prog->originalAirDate != NULL ? prog->originalAirDate->tv_sec : 0 ); /* 38 *///DATETIME_TO_LIST(QDateTime(originalAirDate))
340 gmyth_string_list_append_int ( slist, prog->hasAirDate ); /* 39 */
341 gmyth_string_list_append_char_array ( slist, "Default" ); /* 40 *///prog->(playgroup != "") ? playgroup : "Default")
342 gmyth_string_list_append_int ( slist, prog->recpriority2 ); /* 41 */
348 * Converts an instance of a GMythStringList, to a GMythProgramInfo.
350 * @param slist The GMythStringList got from the MythTV backend server.
351 * @param pos The position in the GMythStringList to start getting the fields.
353 * @return a GMythProgramInfo representing the string list got from network.
356 gmyth_program_info_from_string_list_from_pos ( GMythStringList * slist,
359 GMythProgramInfo *prog = gmyth_program_info_new ( );
361 g_return_val_if_fail ( slist != NULL &&
362 gmyth_string_list_get_string ( slist, pos ) != NULL,
365 prog->title = gmyth_string_list_get_string ( slist, pos );
366 prog->subtitle = gmyth_string_list_get_string ( slist, pos + 1 );
367 prog->description = gmyth_string_list_get_string ( slist, pos + 2 );
368 prog->category = gmyth_string_list_get_string ( slist, pos + 3 );
369 prog->chanid = gmyth_string_list_get_string ( slist, pos + 4 );
370 prog->channame = gmyth_string_list_get_string ( slist, pos + 5 );
371 prog->chanstr = gmyth_string_list_get_string ( slist, pos + 6 );
372 prog->chansign = gmyth_string_list_get_string ( slist, pos + 7 );
373 prog->pathname = gmyth_string_list_get_string ( slist, pos + 8 );
375 prog->filesize = gmyth_string_list_get_int64 ( slist, pos + 9 );
377 gmyth_debug ( "Prog info: [ %s, %s, %s, %s, %s, %s, %s, %s, %s, %d ]\n",
378 gmyth_program_info_non_null_value ( prog->title ),
379 gmyth_program_info_non_null_value ( prog->subtitle ),
380 gmyth_program_info_non_null_value ( prog->description ),
381 gmyth_program_info_non_null_value ( prog->category ),
382 gmyth_program_info_non_null_value ( prog->chanid ),
383 gmyth_program_info_non_null_value ( prog->channame ),
384 gmyth_program_info_non_null_value ( prog->chanstr ),
385 gmyth_program_info_non_null_value ( prog->chansign ),
386 gmyth_program_info_non_null_value ( prog->pathname ),
387 gmyth_string_list_get_int ( slist, pos + 11 ) );
389 prog->startts = gmyth_util_string_to_time_val ( ( gmyth_util_time_to_isoformat ( ( time_t ) gmyth_string_list_get_int ( slist, pos + 11 ) ) )->str ); //DATETIME_TO_LIST(startts)
390 prog->endts = gmyth_util_string_to_time_val ( ( gmyth_util_time_to_isoformat ( ( time_t ) gmyth_string_list_get_int ( slist, pos + 12 ) ) )->str ); //DATETIME_TO_LIST(endts)
391 prog->duplicate = gmyth_string_list_get_int ( slist, pos + 13 );
392 prog->shareable = gmyth_string_list_get_int ( slist, pos + 14 );
393 prog->findid = gmyth_string_list_get_int ( slist, pos + 15 );
394 prog->hostname = gmyth_string_list_get_string ( slist, pos + 16 );
395 prog->sourceid = gmyth_string_list_get_int ( slist, pos + 17 );
396 prog->cardid = gmyth_string_list_get_int ( slist, pos + 18 );
397 prog->inputid = gmyth_string_list_get_int ( slist, pos + 19 );
398 prog->recpriority = gmyth_string_list_get_int ( slist, pos + 20 );
399 prog->reactivate = gmyth_string_list_get_int ( slist, pos + 21 );
400 prog->recordid = gmyth_string_list_get_int ( slist, pos + 22 );
401 gmyth_string_list_get_int ( slist, pos + 23 );
402 gmyth_string_list_get_int ( slist, pos + 24 );
403 gmyth_string_list_get_int ( slist, pos + 25 );
404 prog->recstartts = gmyth_util_string_to_time_val ( ( gmyth_util_time_to_isoformat ( ( time_t ) gmyth_string_list_get_int ( slist, pos + 26 ) ) )->str ); //DATETIME_TO_LIST(recstartts)
405 prog->recendts = gmyth_util_string_to_time_val ( ( gmyth_util_time_to_isoformat ( ( time_t ) gmyth_string_list_get_int ( slist, pos + 27 ) ) )->str ); //DATETIME_TO_LIST(recendts)
406 prog->repeat = gmyth_string_list_get_int ( slist, pos + 28 );
407 prog->programflags = gmyth_string_list_get_int ( slist, pos + 29 );
408 prog->recgroup = gmyth_string_list_get_string ( slist, pos + 30 ); //prog->(recgroup != "") ? recgroup : "Default")
409 prog->chancommfree = gmyth_string_list_get_int ( slist, pos + 31 );
410 prog->chanOutputFilters = gmyth_string_list_get_string ( slist, pos + 32 );
411 prog->seriesid = gmyth_string_list_get_string ( slist, pos + 33 );
412 prog->programid = gmyth_string_list_get_string ( slist, pos + 34 );
413 gmyth_string_list_get_string ( slist, pos + 35 );
414 prog->lastmodified = gmyth_util_string_to_time_val ( ( gmyth_util_time_to_isoformat ( ( time_t ) gmyth_string_list_get_int ( slist, pos + 36 ) ) )->str ); //DATETIME_TO_LIST(lastmodified)
415 gmyth_string_list_get_int ( slist, pos + 37 ); //FLOAT_TO_LIST(stars)
416 prog->originalAirDate = gmyth_util_string_to_time_val ( ( gmyth_util_time_to_isoformat ( ( time_t ) gmyth_string_list_get_int ( slist, pos + 38 ) ) )->str ); //DATETIME_TO_LIST(QDateTime(originalAirDate))
417 prog->hasAirDate = gmyth_string_list_get_int ( slist, pos + 39 );
418 prog->playgroup = gmyth_string_list_get_string ( slist, pos + 40 ); //prog->(playgroup != "") ? playgroup : "Default")
419 prog->recpriority2 = gmyth_string_list_get_int ( slist, pos + 41 );
425 * Converts an instance of a GMythStringList, to a GMythProgramInfo.
427 * @param slist The GMythStringList got from the MythTV backend server.
429 * @return a GMythProgramInfo representing the string list got from network.
432 gmyth_program_info_from_string_list ( GMythStringList * slist )
434 GMythProgramInfo *prog = NULL;
436 g_return_val_if_fail ( slist != NULL, NULL );
438 prog = gmyth_program_info_from_string_list_from_pos ( slist, 0 );
444 * Converts an instance of a GMythStringList, to a GMythProgramInfo ( NEXT_PROGRAM_INFO ).
446 * @param slist The GMythStringList got from the MythTV backend server.
448 * @return a GMythProgramInfo representing the string list got from network.
451 gmyth_program_info_from_string_list_next_prog ( GMythStringList * slist )
453 GMythProgramInfo *prog = gmyth_program_info_new ( );
455 g_return_val_if_fail ( slist != NULL, NULL );
458 {Home Improvement[]:[]No, No, Godot[]:[]
459 US sitcom about a DIY-obsessed father of three. When
460 Tim tries to sell off his extra ticket for an ice hockey game, he is arrested as a tout.[]:[]
461 Sitcom[]:[]2007-04-18T15:30:00[]:[]2007-04-18T16:00:00[]:[]ABC1[]:[]
462 /home/hmelo/.mythtv/channels/abc1.jpg[]:[]abc1[]:[]2000[]:[]25725844[]:[] }
465 prog->title = gmyth_string_list_get_string ( slist, 0 );
466 prog->subtitle = gmyth_string_list_get_string ( slist, 1 );
467 prog->description = gmyth_string_list_get_string ( slist, 2 );
468 prog->category = gmyth_string_list_get_string ( slist, 3 );
469 prog->startts = gmyth_util_string_to_time_val ( gmyth_string_list_get_char_array ( slist, 4 ) ); //DATETIME_TO_LIST(startts)
470 prog->endts = gmyth_util_string_to_time_val ( gmyth_string_list_get_char_array ( slist, 5 ) ); //DATETIME_TO_LIST(endts)
471 prog->channame = gmyth_string_list_get_string ( slist, 6 );
472 prog->chansign = gmyth_string_list_get_string ( slist, 7 );
473 prog->chanstr = gmyth_string_list_get_string ( slist, 8 );
474 prog->chanid = gmyth_string_list_get_string ( slist, 9 );
475 prog->filesize = gmyth_string_list_get_int64 ( slist, 10 );
477 gmyth_debug ( "NEXT program info: [ %s, %s, %s, %s, %s, %s, %s, %s, %s ]\n",
478 gmyth_program_info_non_null_value ( prog->title ),
479 gmyth_program_info_non_null_value ( prog->subtitle ),
480 gmyth_program_info_non_null_value ( prog->description ),
481 gmyth_program_info_non_null_value ( prog->category ),
482 gmyth_program_info_non_null_value ( prog->chanid ),
483 gmyth_program_info_non_null_value ( prog->channame ),
484 gmyth_program_info_non_null_value ( prog->chanstr ),
485 gmyth_program_info_non_null_value ( prog->chansign ),
486 gmyth_program_info_non_null_value ( prog->pathname ) );
492 gmyth_program_info_non_null_value ( const GString * str )
494 return ( str != NULL && str->str != NULL
495 && strlen ( str->str ) > 0 ? str->str : " " );
499 * Prints out an instance of a GMythProgramInfo.
501 * @param prog A GMythProgramInfo instance.
503 * @return a string representing the program info.
506 gmyth_program_info_to_string ( const GMythProgramInfo * prog )
510 ( "Title: %s, Subtitle: %s, Description: %s, Category: %s, Channel ID: %s, "
511 "Channel Name: %s, Chan str: %s, Channel Sign: %s, Path Name: %s, File Size: %lld, \n"
512 "Start TS: %s, End TS: %s, Duplicate: %d, Shareable: %d, Find ID: %d, Hostname: %s, "
513 "Source ID: %d, Vard ID: %d, Input ID: %d, Rec Priority: %d, Reactivate: %d, \n"
514 "Record ID: %d, Rec Start TS: %s, Rec End TS: %s, Repeat: %d, Program Flags: %d, "
515 "Rec Group: %s, Channel Comm Free: %d, Channel Output Filters: %s, Series ID: %s, \n"
516 "Program ID: %s, Last Modified Date: %s, Original Air Date: %s, Has Air Date: %d, "
518 gmyth_program_info_non_null_value ( prog->title ),
519 gmyth_program_info_non_null_value ( prog->subtitle ),
520 gmyth_program_info_non_null_value ( prog->description ),
521 gmyth_program_info_non_null_value ( prog->category ),
522 gmyth_program_info_non_null_value ( prog->chanid ),
523 gmyth_program_info_non_null_value ( prog->channame ),
524 gmyth_program_info_non_null_value ( prog->chanstr ),
525 gmyth_program_info_non_null_value ( prog->chansign ),
526 gmyth_program_info_non_null_value ( prog->pathname ), prog->filesize,
527 gmyth_util_time_to_string_from_time_val ( prog->startts ),
528 gmyth_util_time_to_string_from_time_val ( prog->endts ),
529 prog->duplicate, prog->shareable, prog->findid,
530 gmyth_program_info_non_null_value ( prog->hostname ), prog->sourceid,
531 prog->cardid, prog->inputid, prog->recpriority, prog->reactivate,
533 gmyth_util_time_to_string_from_time_val ( prog->recstartts ),
534 gmyth_util_time_to_string_from_time_val ( prog->recendts ),
535 prog->repeat, prog->programflags,
536 gmyth_program_info_non_null_value ( prog->recgroup ),
538 gmyth_program_info_non_null_value ( prog->chanOutputFilters ),
539 gmyth_program_info_non_null_value ( prog->seriesid ),
540 gmyth_program_info_non_null_value ( prog->programid ),
541 gmyth_util_time_to_string_from_time_val ( prog->lastmodified ),
542 gmyth_util_time_to_string_from_time_val ( prog->originalAirDate ),
544 gmyth_program_info_non_null_value ( prog->playgroup ) );
548 * Say if an instance of a GMythProgramInfo is equals to another one.
550 * @param prog The first GMythProgramInfo instance.
551 * @param prog The second GMythProgramInfo instance.
553 * @return <code>true</code>, if the program infos are equals.
556 gmyth_program_info_is_equals ( const GMythProgramInfo * prog1,
557 const GMythProgramInfo * prog2 )
559 if ( ( strcmp ( gmyth_program_info_non_null_value ( prog1->title ),
560 gmyth_program_info_non_null_value ( prog2->title ) ) == 0 )
563 ( gmyth_program_info_non_null_value ( prog1->pathname ),
564 gmyth_program_info_non_null_value ( prog2->pathname ) ) == 0 ) )