1.1 --- a/gmyth/src/gmyth_programinfo.c Mon Mar 05 21:58:21 2007 +0000
1.2 +++ b/gmyth/src/gmyth_programinfo.c Mon Mar 05 22:18:17 2007 +0000
1.3 @@ -28,7 +28,7 @@
1.4 */
1.5
1.6 #ifdef HAVE_CONFIG_H
1.7 -#include "config.h"
1.8 + #include "config.h"
1.9 #endif
1.10
1.11 #include <stdlib.h>
1.12 @@ -39,8 +39,8 @@
1.13 #include "gmyth_util.h"
1.14 #include "gmyth_debug.h"
1.15
1.16 -static void gmyth_program_info_class_init (GMythProgramInfoClass *klass);
1.17 -static void gmyth_program_info_init (GMythProgramInfo *object);
1.18 +static void gmyth_program_info_class_init (GMythProgramInfoClass *klass);
1.19 +static void gmyth_program_info_init (GMythProgramInfo *object);
1.20
1.21 static void gmyth_program_info_dispose (GObject *object);
1.22 static void gmyth_program_info_finalize (GObject *object);
1.23 @@ -52,225 +52,179 @@
1.24 static void
1.25 gmyth_program_info_class_init (GMythProgramInfoClass *klass)
1.26 {
1.27 - GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1.28 + GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1.29
1.30 - gobject_class->dispose = gmyth_program_info_dispose;
1.31 - gobject_class->finalize = gmyth_program_info_finalize;
1.32 + gobject_class->dispose = gmyth_program_info_dispose;
1.33 + gobject_class->finalize = gmyth_program_info_finalize;
1.34 }
1.35
1.36 static void
1.37 gmyth_program_info_init (GMythProgramInfo *gmyth_program_info)
1.38 {
1.39 - gmyth_program_info->chancommfree = 0;
1.40 + gmyth_program_info->chancommfree = 0;
1.41
1.42 /** A flag informing if the program has video or not. */
1.43 - gmyth_program_info->isVideo = FALSE;
1.44 - gmyth_program_info->lenMins = 0;
1.45 + gmyth_program_info->isVideo = FALSE;
1.46 + gmyth_program_info->lenMins = 0;
1.47
1.48 - gmyth_program_info->stars = 0.0f;
1.49 - gmyth_program_info->repeat = 0;
1.50 + gmyth_program_info->stars = 0.0f;
1.51 + gmyth_program_info->repeat = 0;
1.52
1.53 - gmyth_program_info->hasAirDate = FALSE;
1.54 + gmyth_program_info->hasAirDate = FALSE;
1.55
1.56 - gmyth_program_info->spread = 0;
1.57 - gmyth_program_info->startCol = 0;
1.58 + gmyth_program_info->spread = 0;
1.59 + gmyth_program_info->startCol = 0;
1.60
1.61 - gmyth_program_info->recpriority2 = 0;
1.62 - gmyth_program_info->reactivate = 0;
1.63 + gmyth_program_info->recpriority2 = 0;
1.64 + gmyth_program_info->reactivate = 0;
1.65
1.66 - gmyth_program_info->recordid = 0;
1.67 - gmyth_program_info->parentid = 0;
1.68 + gmyth_program_info->recordid = 0;
1.69 + gmyth_program_info->parentid = 0;
1.70
1.71 - /** The backend video source id associated to this program.*/
1.72 - gmyth_program_info->sourceid = 0;
1.73 - /** the backend input id associated to this program.*/
1.74 - gmyth_program_info->inputid = 0;
1.75 - /** The backend card id associated to this program.*/
1.76 - gmyth_program_info->cardid = 0;
1.77 - gmyth_program_info->shareable = FALSE;
1.78 - gmyth_program_info->duplicate = FALSE;
1.79 + /** The backend video source id associated to this program.*/
1.80 + gmyth_program_info->sourceid = 0;
1.81 + /** the backend input id associated to this program.*/
1.82 + gmyth_program_info->inputid = 0;
1.83 + /** The backend card id associated to this program.*/
1.84 + gmyth_program_info->cardid = 0;
1.85 + gmyth_program_info->shareable = FALSE;
1.86 + gmyth_program_info->duplicate = FALSE;
1.87
1.88 - gmyth_program_info->findid = 0;
1.89 + gmyth_program_info->findid = 0;
1.90
1.91 - gmyth_program_info->programflags = 0;
1.92 - gmyth_program_info->transcoder = 0;
1.93 + gmyth_program_info->programflags = 0;
1.94 + gmyth_program_info->transcoder = 0;
1.95
1.96 - gmyth_program_info->recpriority = 0;
1.97 + gmyth_program_info->recpriority = 0;
1.98
1.99 /** The file size of the recorded program.*/
1.100 - gmyth_program_info->filesize = -1;
1.101 -
1.102 -
1.103 + gmyth_program_info->filesize = -1;
1.104 }
1.105
1.106 static void
1.107 gmyth_program_info_dispose (GObject *object)
1.108 {
1.109 - GMythProgramInfo *gmyth_program_info = GMYTH_PROGRAM_INFO(object);
1.110 + GMythProgramInfo *gmyth_program_info = GMYTH_PROGRAM_INFO(object);
1.111
1.112 - if ( gmyth_program_info->chanid != NULL )
1.113 - {
1.114 + if ( gmyth_program_info->chanid != NULL ) {
1.115 g_string_free( gmyth_program_info->chanid, TRUE );
1.116 gmyth_program_info->chanid = NULL;
1.117 - }
1.118 + }
1.119
1.120 - /** The program start time. */
1.121 - if ( gmyth_program_info->startts != NULL )
1.122 - {
1.123 - g_free( gmyth_program_info->startts);
1.124 - gmyth_program_info->startts = NULL;
1.125 - }
1.126 + /** The program start time. */
1.127 + g_free( gmyth_program_info->startts);
1.128
1.129 - /** The program end time. */
1.130 - if ( gmyth_program_info->endts != NULL )
1.131 - {
1.132 + /** The program end time. */
1.133 g_free( gmyth_program_info->endts );
1.134 - gmyth_program_info->endts = NULL;
1.135 - }
1.136
1.137 - /** The recording schedule start time. */
1.138 - if ( gmyth_program_info->recstartts != NULL )
1.139 - {
1.140 + /** The recording schedule start time. */
1.141 g_free( gmyth_program_info->recstartts );
1.142 - gmyth_program_info->recstartts = NULL;
1.143 - }
1.144
1.145 - /** The recording schedule end time */
1.146 - if ( gmyth_program_info->recendts != NULL )
1.147 - {
1.148 + /** The recording schedule end time */
1.149 g_free(gmyth_program_info->recendts);
1.150 - gmyth_program_info->recendts = NULL;
1.151 - }
1.152
1.153 - /** The program title. */
1.154 - if (gmyth_program_info->title != NULL )
1.155 - {
1.156 - g_string_free(gmyth_program_info->title, TRUE);
1.157 - gmyth_program_info->title = NULL;
1.158 - }
1.159 + /** The program title. */
1.160 + if (gmyth_program_info->title != NULL ) {
1.161 + g_string_free(gmyth_program_info->title, TRUE);
1.162 + gmyth_program_info->title = NULL;
1.163 + }
1.164
1.165 - /** The program subtitle. */
1.166 - if (gmyth_program_info->subtitle != NULL )
1.167 - {
1.168 - g_string_free(gmyth_program_info->subtitle, TRUE );
1.169 - gmyth_program_info->subtitle = NULL;
1.170 - }
1.171 - /** The program description. */
1.172 - if ( gmyth_program_info->description != NULL )
1.173 - {
1.174 - g_string_free( gmyth_program_info->description, TRUE );
1.175 - gmyth_program_info->description = NULL;
1.176 - }
1.177 + /** The program subtitle. */
1.178 + if (gmyth_program_info->subtitle != NULL ) {
1.179 + g_string_free(gmyth_program_info->subtitle, TRUE );
1.180 + gmyth_program_info->subtitle = NULL;
1.181 + }
1.182 +
1.183 + /** The program description. */
1.184 + if ( gmyth_program_info->description != NULL ) {
1.185 + g_string_free( gmyth_program_info->description, TRUE );
1.186 + gmyth_program_info->description = NULL;
1.187 + }
1.188
1.189 - /** The program category. */
1.190 - if ( gmyth_program_info->category != NULL )
1.191 - {
1.192 - g_string_free( gmyth_program_info->category, TRUE );
1.193 - gmyth_program_info->category = NULL;
1.194 - }
1.195 + /** The program category. */
1.196 + if ( gmyth_program_info->category != NULL ) {
1.197 + g_string_free( gmyth_program_info->category, TRUE );
1.198 + gmyth_program_info->category = NULL;
1.199 + }
1.200
1.201 - if ( gmyth_program_info->chanstr != NULL )
1.202 - {
1.203 - g_string_free( gmyth_program_info->chanstr, TRUE );
1.204 - gmyth_program_info->chanstr = NULL;
1.205 - }
1.206 - if ( gmyth_program_info->chansign != NULL )
1.207 - {
1.208 - g_string_free( gmyth_program_info->chansign, TRUE );
1.209 - gmyth_program_info->chansign = NULL;
1.210 - }
1.211 - /** The associated channel name. */
1.212 - if ( gmyth_program_info->channame != NULL )
1.213 - {
1.214 - g_string_free( gmyth_program_info->channame, TRUE );
1.215 - gmyth_program_info->channame = NULL;
1.216 - }
1.217 - if ( gmyth_program_info->chanOutputFilters != NULL )
1.218 - {
1.219 - g_string_free( gmyth_program_info->chanOutputFilters, TRUE );
1.220 - gmyth_program_info->chanOutputFilters = NULL;
1.221 - }
1.222 + if ( gmyth_program_info->chanstr != NULL ) {
1.223 + g_string_free( gmyth_program_info->chanstr, TRUE );
1.224 + gmyth_program_info->chanstr = NULL;
1.225 + }
1.226 +
1.227 + if ( gmyth_program_info->chansign != NULL ) {
1.228 + g_string_free( gmyth_program_info->chansign, TRUE );
1.229 + gmyth_program_info->chansign = NULL;
1.230 + }
1.231
1.232 - if ( gmyth_program_info->seriesid != NULL )
1.233 - {
1.234 - g_string_free( gmyth_program_info->seriesid, TRUE );
1.235 - gmyth_program_info->chanOutputFilters = NULL;
1.236 + /** The associated channel name. */
1.237 + if ( gmyth_program_info->channame != NULL ) {
1.238 + g_string_free( gmyth_program_info->channame, TRUE );
1.239 + gmyth_program_info->channame = NULL;
1.240 + }
1.241
1.242 - }
1.243 - /** The program unique id. */
1.244 - if ( gmyth_program_info->programid != NULL )
1.245 - {
1.246 - g_string_free( gmyth_program_info->programid, TRUE );
1.247 - gmyth_program_info->programid = NULL;
1.248 + if ( gmyth_program_info->chanOutputFilters != NULL ) {
1.249 + g_string_free( gmyth_program_info->chanOutputFilters, TRUE );
1.250 + gmyth_program_info->chanOutputFilters = NULL;
1.251 + }
1.252 +
1.253 + if ( gmyth_program_info->seriesid != NULL ) {
1.254 + g_string_free( gmyth_program_info->seriesid, TRUE );
1.255 + gmyth_program_info->chanOutputFilters = NULL;
1.256 + }
1.257 +
1.258 + /** The program unique id. */
1.259 + if ( gmyth_program_info->programid != NULL ) {
1.260 + g_string_free( gmyth_program_info->programid, TRUE );
1.261 + gmyth_program_info->programid = NULL;
1.262 + }
1.263 +
1.264 + if ( gmyth_program_info->catType != NULL ) {
1.265 + g_string_free( gmyth_program_info->catType, TRUE );
1.266 + gmyth_program_info->catType = NULL;
1.267 + }
1.268
1.269 - }
1.270 - if ( gmyth_program_info->catType != NULL )
1.271 - {
1.272 - g_string_free( gmyth_program_info->catType, TRUE );
1.273 - gmyth_program_info->catType = NULL;
1.274 + if ( gmyth_program_info->sortTitle != NULL ) {
1.275 + g_string_free( gmyth_program_info->sortTitle, TRUE );
1.276 + gmyth_program_info->sortTitle = NULL;
1.277 + }
1.278 +
1.279 + if ( gmyth_program_info->year != NULL ) {
1.280 + g_string_free( gmyth_program_info->year, TRUE );
1.281 + gmyth_program_info->year = NULL;
1.282 + }
1.283 +
1.284 + g_free( gmyth_program_info->originalAirDate);
1.285 +
1.286 + g_free( gmyth_program_info->lastmodified );
1.287 +
1.288 + g_free( gmyth_program_info->lastInUseTime );
1.289 +
1.290 + if ( gmyth_program_info->schedulerid != NULL ) {
1.291 + g_string_free( gmyth_program_info->schedulerid, TRUE );
1.292 + gmyth_program_info->schedulerid = NULL;
1.293 + }
1.294
1.295 - }
1.296 + if ( gmyth_program_info->recgroup != NULL ) {
1.297 + g_string_free( gmyth_program_info->recgroup, TRUE );
1.298 + gmyth_program_info->recgroup = NULL;
1.299 + }
1.300 +
1.301 + if ( gmyth_program_info->playgroup != NULL ) {
1.302 + g_string_free( gmyth_program_info->playgroup, TRUE );
1.303 + gmyth_program_info->playgroup = NULL;
1.304 + }
1.305 +
1.306 + /** The file name of the recorded program.*/
1.307 + if ( gmyth_program_info->pathname != NULL) {
1.308 + g_string_free( gmyth_program_info->pathname, TRUE );
1.309 + gmyth_program_info->pathname = NULL;
1.310 + }
1.311
1.312 - if ( gmyth_program_info->sortTitle != NULL )
1.313 - {
1.314 - g_string_free( gmyth_program_info->sortTitle, TRUE );
1.315 - gmyth_program_info->sortTitle = NULL;
1.316 -
1.317 - }
1.318 -
1.319 - if ( gmyth_program_info->year != NULL )
1.320 - {
1.321 - g_string_free( gmyth_program_info->year, TRUE );
1.322 - gmyth_program_info->year = NULL;
1.323 -
1.324 - }
1.325 -
1.326 - if ( gmyth_program_info->originalAirDate != NULL )
1.327 - {
1.328 - g_free( gmyth_program_info->originalAirDate);
1.329 - gmyth_program_info->originalAirDate = NULL;
1.330 - }
1.331 - if ( gmyth_program_info->lastmodified != NULL )
1.332 - {
1.333 - g_free( gmyth_program_info->lastmodified );
1.334 - gmyth_program_info->lastmodified = NULL;
1.335 -
1.336 - }
1.337 - if (gmyth_program_info->lastInUseTime != NULL)
1.338 - {
1.339 - g_free( gmyth_program_info->lastInUseTime );
1.340 - gmyth_program_info->lastInUseTime = NULL;
1.341 - }
1.342 -
1.343 - if ( gmyth_program_info->schedulerid != NULL )
1.344 - {
1.345 - g_string_free( gmyth_program_info->schedulerid, TRUE );
1.346 - gmyth_program_info->schedulerid = NULL;
1.347 - }
1.348 -
1.349 - if ( gmyth_program_info->recgroup != NULL )
1.350 - {
1.351 - g_string_free( gmyth_program_info->recgroup, TRUE );
1.352 - gmyth_program_info->recgroup = NULL;
1.353 - }
1.354 - if ( gmyth_program_info->playgroup != NULL )
1.355 - {
1.356 - g_string_free( gmyth_program_info->playgroup, TRUE );
1.357 - gmyth_program_info->playgroup = NULL;
1.358 - }
1.359 -
1.360 - /** The file name of the recorded program.*/
1.361 - if ( gmyth_program_info->pathname != NULL)
1.362 - {
1.363 - g_string_free( gmyth_program_info->pathname, TRUE );
1.364 - gmyth_program_info->pathname = NULL;
1.365 - }
1.366 -
1.367 - if ( gmyth_program_info->hostname != NULL )
1.368 - {
1.369 - g_string_free( gmyth_program_info->hostname, TRUE );
1.370 - gmyth_program_info->hostname = NULL;
1.371 - }
1.372 + if ( gmyth_program_info->hostname != NULL ) {
1.373 + g_string_free( gmyth_program_info->hostname, TRUE );
1.374 + gmyth_program_info->hostname = NULL;
1.375 + }
1.376
1.377 G_OBJECT_CLASS (gmyth_program_info_parent_class)->dispose (object);
1.378 }
1.379 @@ -291,7 +245,8 @@
1.380 GMythProgramInfo*
1.381 gmyth_program_info_new (void)
1.382 {
1.383 - GMythProgramInfo *program_info = GMYTH_PROGRAM_INFO (g_object_new(GMYTH_PROGRAM_INFO_TYPE, NULL));
1.384 + GMythProgramInfo *program_info =
1.385 + GMYTH_PROGRAM_INFO (g_object_new(GMYTH_PROGRAM_INFO_TYPE, NULL));
1.386
1.387 return program_info;
1.388 }
1.389 @@ -320,12 +275,12 @@
1.390 if (prog->startts)
1.391 gmyth_string_list_append_int (slist, prog->startts->tv_sec); /* 11 */ //DATETIME_TO_LIST(startts)
1.392 else
1.393 - gmyth_string_list_append_int (slist, 0);
1.394 + gmyth_string_list_append_int (slist, 0);
1.395
1.396 if (prog->endts)
1.397 gmyth_string_list_append_int (slist, prog->endts->tv_sec); /* 12 */ //DATETIME_TO_LIST(endts)
1.398 else
1.399 - gmyth_string_list_append_int (slist, 0);
1.400 + gmyth_string_list_append_int (slist, 0);
1.401
1.402 gmyth_string_list_append_int (slist, prog->duplicate); /* 13 */
1.403 gmyth_string_list_append_int (slist, prog->shareable); /* 14 */
1.404 @@ -340,8 +295,10 @@
1.405 gmyth_string_list_append_int (slist, 0 /*prog->rectype*/); /* 23 */
1.406 gmyth_string_list_append_int (slist, 0 /*prog->dupin*/); /* 24 */
1.407 gmyth_string_list_append_int (slist, 0 /*prog->dupmethod*/); /* 25 */
1.408 - gmyth_string_list_append_int (slist, prog->recstartts != NULL ? prog->recstartts->tv_sec : 0); /* 26 */ //DATETIME_TO_LIST(recstartts)
1.409 - gmyth_string_list_append_int (slist, prog->recendts != NULL ? prog->recendts->tv_sec : 0); /* 27 */ //DATETIME_TO_LIST(recendts)
1.410 + gmyth_string_list_append_int (slist,
1.411 + prog->recstartts != NULL ? prog->recstartts->tv_sec : 0); /* 26 */ //DATETIME_TO_LIST(recstartts)
1.412 + gmyth_string_list_append_int (slist,
1.413 + prog->recendts != NULL ? prog->recendts->tv_sec : 0); /* 27 */ //DATETIME_TO_LIST(recendts)
1.414 gmyth_string_list_append_int (slist, prog->repeat); /* 28 */
1.415 gmyth_string_list_append_int (slist, prog->programflags); /* 29 */
1.416 gmyth_string_list_append_char_array (slist, "Default"); /* 30 */ //prog->(recgroup != "") ? recgroup : "Default")
1.417 @@ -350,9 +307,11 @@
1.418 gmyth_string_list_append_string (slist, prog->seriesid); /* 33 */
1.419 gmyth_string_list_append_string (slist, prog->programid); /* 34 */
1.420 gmyth_string_list_append_char_array (slist, ""); /* 35 */
1.421 - gmyth_string_list_append_int (slist, prog->lastmodified != NULL ? prog->lastmodified->tv_sec : 0); /* 36 */ //DATETIME_TO_LIST(lastmodified)
1.422 + gmyth_string_list_append_int (slist,
1.423 + prog->lastmodified != NULL ? prog->lastmodified->tv_sec : 0); /* 36 */ //DATETIME_TO_LIST(lastmodified)
1.424 gmyth_string_list_append_int (slist, 0); /* 37 */ //FLOAT_TO_LIST(stars)
1.425 - gmyth_string_list_append_int (slist, prog->originalAirDate != NULL ? prog->originalAirDate->tv_sec : 0); /* 38 */ //DATETIME_TO_LIST(QDateTime(originalAirDate))
1.426 + gmyth_string_list_append_int (slist,
1.427 + prog->originalAirDate != NULL ? prog->originalAirDate->tv_sec : 0); /* 38 */ //DATETIME_TO_LIST(QDateTime(originalAirDate))
1.428 gmyth_string_list_append_int (slist, prog->hasAirDate); /* 39 */
1.429 gmyth_string_list_append_char_array (slist, "Default"); /* 40 */ //prog->(playgroup != "") ? playgroup : "Default")
1.430 gmyth_string_list_append_int (slist, prog->recpriority2); /* 41 */
1.431 @@ -363,57 +322,14 @@
1.432 GMythProgramInfo*
1.433 gmyth_program_info_from_string_list ( GMythStringList *slist )
1.434 {
1.435 - GMythProgramInfo *prog = gmyth_program_info_new();
1.436 + GMythProgramInfo *prog = gmyth_program_info_new();
1.437
1.438 g_return_val_if_fail (slist != NULL, NULL);
1.439 - /*
1.440 - Unknown
1.441 -
1.442 -
1.443 -
1.444 - 1000
1.445 - 9
1.446 - 1000
1.447 - Band
1.448 - /mnt/store//1000_20070125110059.nuv
1.449 - 0
1.450 - 0
1.451 - 1169733659
1.452 - 1169735400
1.453 - 0
1.454 - 0
1.455 - 0
1.456 - hmelo-desktop
1.457 - 0
1.458 - 1
1.459 - 0
1.460 - 0
1.461 - -2
1.462 - 0
1.463 - 0
1.464 - 15
1.465 - 6
1.466 - 1169733659
1.467 - 1169735400
1.468 - 0
1.469 - 0
1.470 - LiveTV
1.471 - 0
1.472 -
1.473 -
1.474 -
1.475 - 1169733659
1.476 - 0.000000
1.477 - -1
1.478 - 0
1.479 - Default
1.480 - 0
1.481 - */
1.482 +
1.483 prog->title = gmyth_string_list_get_string (slist, 0);
1.484 prog->subtitle = gmyth_string_list_get_string (slist, 1);
1.485 prog->description = gmyth_string_list_get_string (slist, 2);
1.486 prog->category = gmyth_string_list_get_string (slist, 3);
1.487 - //gmyth_string_list_get_string (slist, 4);
1.488 prog->chanid = gmyth_string_list_get_string (slist, 4);
1.489 prog->channame = gmyth_string_list_get_string (slist, 5);
1.490 prog->chanstr = gmyth_string_list_get_string (slist, 6);
1.491 @@ -433,7 +349,6 @@
1.492 gmyth_program_info_non_null_value( prog->chansign ),
1.493 gmyth_program_info_non_null_value( prog->pathname ),
1.494 gmyth_string_list_get_int (slist, 11) );
1.495 - //gmyth_string_list_get_int (slist, 9);
1.496
1.497 prog->startts = gmyth_util_string_to_time_val( (gmyth_util_time_to_isoformat(
1.498 (time_t)gmyth_string_list_get_int (slist, 11) ))->str ); //DATETIME_TO_LIST(startts)
1.499 @@ -485,47 +400,47 @@
1.500 const gchar*
1.501 gmyth_program_info_to_string( const GMythProgramInfo* prog )
1.502 {
1.503 - return g_strdup_printf( "Title: %s, Subtitle: %s, Description: %s, Category: %s, Channel ID: %s, "\
1.504 - "Channel Name: %s, Chan str: %s, Channel Sign: %s, Path Name: %s, File Size: %lld, \n"\
1.505 - "Start TS: %s, End TS: %s, Duplicate: %d, Shareable: %d, Find ID: %d, Hostname: %s, "\
1.506 - "Source ID: %d, Vard ID: %d, Input ID: %d, Rec Priority: %d, Reactivate: %d, \n"\
1.507 - "Record ID: %d, Rec Start TS: %s, Rec End TS: %s, Repeat: %d, Program Flags: %d, "\
1.508 - "Rec Group: %s, Channel Comm Free: %d, Channel Output Filters: %s, Series ID: %s, \n"\
1.509 - "Program ID: %s, Last Modified Date: %s, Original Air Date: %s, Has Air Date: %d, "
1.510 - "Play Group: %s.\n",
1.511 - gmyth_program_info_non_null_value( prog->title ),
1.512 - gmyth_program_info_non_null_value( prog->subtitle ),
1.513 - gmyth_program_info_non_null_value( prog->description ),
1.514 - gmyth_program_info_non_null_value( prog->category ),
1.515 + return g_strdup_printf( "Title: %s, Subtitle: %s, Description: %s, Category: %s, Channel ID: %s, "\
1.516 + "Channel Name: %s, Chan str: %s, Channel Sign: %s, Path Name: %s, File Size: %lld, \n"\
1.517 + "Start TS: %s, End TS: %s, Duplicate: %d, Shareable: %d, Find ID: %d, Hostname: %s, "\
1.518 + "Source ID: %d, Vard ID: %d, Input ID: %d, Rec Priority: %d, Reactivate: %d, \n"\
1.519 + "Record ID: %d, Rec Start TS: %s, Rec End TS: %s, Repeat: %d, Program Flags: %d, "\
1.520 + "Rec Group: %s, Channel Comm Free: %d, Channel Output Filters: %s, Series ID: %s, \n"\
1.521 + "Program ID: %s, Last Modified Date: %s, Original Air Date: %s, Has Air Date: %d, "
1.522 + "Play Group: %s.\n",
1.523 + gmyth_program_info_non_null_value( prog->title ),
1.524 + gmyth_program_info_non_null_value( prog->subtitle ),
1.525 + gmyth_program_info_non_null_value( prog->description ),
1.526 + gmyth_program_info_non_null_value( prog->category ),
1.527 gmyth_program_info_non_null_value( prog->chanid ),
1.528 - gmyth_program_info_non_null_value( prog->channame ),
1.529 - gmyth_program_info_non_null_value( prog->chanstr ),
1.530 - gmyth_program_info_non_null_value( prog->chansign ),
1.531 - gmyth_program_info_non_null_value( prog->pathname ),
1.532 - prog->filesize,
1.533 - gmyth_util_time_to_string_from_time_val( prog->startts),
1.534 - gmyth_util_time_to_string_from_time_val( prog->endts),
1.535 - prog->duplicate,
1.536 - prog->shareable,
1.537 - prog->findid,
1.538 - gmyth_program_info_non_null_value( prog->hostname ),
1.539 - prog->sourceid,
1.540 - prog->cardid,
1.541 - prog->inputid,
1.542 - prog->recpriority,
1.543 - prog->reactivate,
1.544 - prog->recordid,
1.545 - gmyth_util_time_to_string_from_time_val(prog->recstartts),
1.546 - gmyth_util_time_to_string_from_time_val(prog->recendts),
1.547 - prog->repeat,
1.548 - prog->programflags,
1.549 - gmyth_program_info_non_null_value( prog->recgroup ),
1.550 - prog->chancommfree,
1.551 - gmyth_program_info_non_null_value( prog->chanOutputFilters ),
1.552 - gmyth_program_info_non_null_value( prog->seriesid ),
1.553 - gmyth_program_info_non_null_value( prog->programid ),
1.554 - gmyth_util_time_to_string_from_time_val(prog->lastmodified),
1.555 - gmyth_util_time_to_string_from_time_val(prog->originalAirDate),
1.556 - prog->hasAirDate,
1.557 - gmyth_program_info_non_null_value(prog->playgroup) );
1.558 + gmyth_program_info_non_null_value( prog->channame ),
1.559 + gmyth_program_info_non_null_value( prog->chanstr ),
1.560 + gmyth_program_info_non_null_value( prog->chansign ),
1.561 + gmyth_program_info_non_null_value( prog->pathname ),
1.562 + prog->filesize,
1.563 + gmyth_util_time_to_string_from_time_val( prog->startts),
1.564 + gmyth_util_time_to_string_from_time_val( prog->endts),
1.565 + prog->duplicate,
1.566 + prog->shareable,
1.567 + prog->findid,
1.568 + gmyth_program_info_non_null_value( prog->hostname ),
1.569 + prog->sourceid,
1.570 + prog->cardid,
1.571 + prog->inputid,
1.572 + prog->recpriority,
1.573 + prog->reactivate,
1.574 + prog->recordid,
1.575 + gmyth_util_time_to_string_from_time_val(prog->recstartts),
1.576 + gmyth_util_time_to_string_from_time_val(prog->recendts),
1.577 + prog->repeat,
1.578 + prog->programflags,
1.579 + gmyth_program_info_non_null_value( prog->recgroup ),
1.580 + prog->chancommfree,
1.581 + gmyth_program_info_non_null_value( prog->chanOutputFilters ),
1.582 + gmyth_program_info_non_null_value( prog->seriesid ),
1.583 + gmyth_program_info_non_null_value( prog->programid ),
1.584 + gmyth_util_time_to_string_from_time_val(prog->lastmodified),
1.585 + gmyth_util_time_to_string_from_time_val(prog->originalAirDate),
1.586 + prog->hasAirDate,
1.587 + gmyth_program_info_non_null_value(prog->playgroup) );
1.588 }
2.1 --- a/gmyth/src/gmyth_programinfo.h Mon Mar 05 21:58:21 2007 +0000
2.2 +++ b/gmyth/src/gmyth_programinfo.h Mon Mar 05 22:18:17 2007 +0000
2.3 @@ -59,104 +59,102 @@
2.4 */
2.5 struct _GMythProgramInfo
2.6 {
2.7 - GObject parent;
2.8 + GObject parent;
2.9 +
2.10 + /** The channel unique ID. */
2.11 + GString *chanid;
2.12 +
2.13 + /** The program start time. */
2.14 + GTimeVal* startts;
2.15 + /** The program end time. */
2.16 + GTimeVal* endts;
2.17 + /** The recording schedule start time. */
2.18 + GTimeVal* recstartts;
2.19 + /** The recording schedule end time */
2.20 + GTimeVal* recendts;
2.21 +
2.22 + /** The program title. */
2.23 + GString *title;
2.24 + /** The program subtitle. */
2.25 + GString *subtitle;
2.26 + /** The program description. */
2.27 + GString *description;
2.28 + /** The program category. */
2.29 + GString *category;
2.30 +
2.31 + GString *chanstr;
2.32 + GString *chansign;
2.33 + /** The associated channel name. */
2.34 + GString *channame;
2.35 + gint chancommfree;
2.36 + GString *chanOutputFilters;
2.37 +
2.38 + GString *seriesid;
2.39 + /** The program unique id. */
2.40 + GString *programid;
2.41 + GString *catType;
2.42
2.43 - /** The channel unique ID. */
2.44 - GString *chanid;
2.45 -
2.46 - /** The program start time. */
2.47 - GTimeVal* startts;
2.48 - /** The program end time. */
2.49 - GTimeVal* endts;
2.50 - /** The recording schedule start time. */
2.51 - GTimeVal* recstartts;
2.52 - /** The recording schedule end time */
2.53 - GTimeVal* recendts;
2.54 -
2.55 - /** The program title. */
2.56 - GString *title;
2.57 - /** The program subtitle. */
2.58 - GString *subtitle;
2.59 - /** The program description. */
2.60 - GString *description;
2.61 - /** The program category. */
2.62 - GString *category;
2.63 -
2.64 - GString *chanstr;
2.65 - GString *chansign;
2.66 - /** The associated channel name. */
2.67 - GString *channame;
2.68 - gint chancommfree;
2.69 - GString *chanOutputFilters;
2.70 -
2.71 - GString *seriesid;
2.72 - /** The program unique id. */
2.73 - GString *programid;
2.74 - GString *catType;
2.75 -
2.76 - GString *sortTitle;
2.77 + GString *sortTitle;
2.78
2.79 /** A flag informing if the program has video or not. */
2.80 - gboolean isVideo;
2.81 - gint lenMins;
2.82 + gboolean isVideo;
2.83 + gint lenMins;
2.84
2.85 - GString *year;
2.86 - gdouble stars;
2.87 - gint repeat;
2.88 + GString *year;
2.89 + gdouble stars;
2.90 + gint repeat;
2.91
2.92 - GTimeVal* originalAirDate;
2.93 - GTimeVal* lastmodified;
2.94 - GTimeVal* lastInUseTime;
2.95 + GTimeVal* originalAirDate;
2.96 + GTimeVal* lastmodified;
2.97 + GTimeVal* lastInUseTime;
2.98
2.99 - gboolean hasAirDate;
2.100 + gboolean hasAirDate;
2.101
2.102 - gint spread;
2.103 - gint startCol;
2.104 + gint spread;
2.105 + gint startCol;
2.106
2.107 - gint recpriority2;
2.108 - gint reactivate;
2.109 + gint recpriority2;
2.110 + gint reactivate;
2.111
2.112 - gint recordid;
2.113 - gint parentid;
2.114 + gint recordid;
2.115 + gint parentid;
2.116
2.117 - /** The backend video source id associated to this program.*/
2.118 - gint sourceid;
2.119 - /** the backend input id associated to this program.*/
2.120 - gint inputid;
2.121 - /** The backend card id associated to this program.*/
2.122 - gint cardid;
2.123 - gboolean shareable;
2.124 - gboolean duplicate;
2.125 + /** The backend video source id associated to this program.*/
2.126 + gint sourceid;
2.127 + /** the backend input id associated to this program.*/
2.128 + gint inputid;
2.129 + /** The backend card id associated to this program.*/
2.130 + gint cardid;
2.131 + gboolean shareable;
2.132 + gboolean duplicate;
2.133
2.134 - GString * schedulerid;
2.135 - gint findid;
2.136 + GString * schedulerid;
2.137 + gint findid;
2.138
2.139 - gint programflags;
2.140 - gint transcoder;
2.141 + gint programflags;
2.142 + gint transcoder;
2.143
2.144 - GString *recgroup;
2.145 - GString *playgroup;
2.146 - gint recpriority;
2.147 + GString *recgroup;
2.148 + GString *playgroup;
2.149 + gint recpriority;
2.150
2.151 /** The file size of the recorded program.*/
2.152 - gint64 filesize;
2.153 + gint64 filesize;
2.154
2.155 - /** The file name of the recorded program.*/
2.156 - GString *pathname;
2.157 - GString *hostname;
2.158 -
2.159 - /* AvailableStatusType availableStatus;*/
2.160 -
2.161 + /** The file name of the recorded program.*/
2.162 + GString *pathname;
2.163 + GString *hostname;
2.164 };
2.165
2.166 -GType gmyth_program_info_type (void);
2.167 +GType gmyth_program_info_type (void);
2.168
2.169 GMythProgramInfo* gmyth_program_info_new (void);
2.170
2.171 -GMythStringList* gmyth_program_info_to_string_list (GMythProgramInfo *prog, GMythStringList *slist);
2.172 +GMythStringList* gmyth_program_info_to_string_list (GMythProgramInfo *prog,
2.173 + GMythStringList *slist);
2.174 GMythProgramInfo* gmyth_program_info_from_string_list (GMythStringList *slist);
2.175
2.176 -const gchar* gmyth_program_info_to_string( const GMythProgramInfo* prog );
2.177 +const gchar* gmyth_program_info_to_string( const GMythProgramInfo* prog );
2.178
2.179 G_END_DECLS
2.180
3.1 --- a/gmyth/src/gmyth_query.c Mon Mar 05 21:58:21 2007 +0000
3.2 +++ b/gmyth/src/gmyth_query.c Mon Mar 05 22:18:17 2007 +0000
3.3 @@ -79,7 +79,7 @@
3.4
3.5 if (gmyth_query->backend_info) {
3.6 g_object_unref (gmyth_query->backend_info);
3.7 - //gmyth_query->backend_info = NULL;
3.8 + gmyth_query->backend_info = NULL;
3.9 }
3.10
3.11 G_OBJECT_CLASS (gmyth_query_parent_class)->dispose (object);
3.12 @@ -109,8 +109,9 @@
3.13 gmyth_query_connect_with_timeout (GMythQuery *gmyth_query,
3.14 GMythBackendInfo *backend_info, guint timeout)
3.15 {
3.16 - assert(gmyth_query);
3.17 + assert(gmyth_query);
3.18 g_return_val_if_fail (gmyth_query->conn != NULL, FALSE);
3.19 +
3.20 if (timeout != 0) {
3.21 /* sets connection timeout */
3.22 mysql_options (gmyth_query->conn, MYSQL_OPT_CONNECT_TIMEOUT, (gchar*) &timeout);
4.1 --- a/gmyth/src/gmyth_scheduler.c Mon Mar 05 21:58:21 2007 +0000
4.2 +++ b/gmyth/src/gmyth_scheduler.c Mon Mar 05 22:18:17 2007 +0000
4.3 @@ -68,7 +68,7 @@
4.4 sched->recordid =0;
4.5 sched->type = 0;
4.6 sched->search = 0;
4.7 - sched->profile = g_string_new("");
4.8 + sched->profile = g_string_new("");
4.9
4.10 sched->dupin = 0;
4.11 sched->dupmethod = 0;
4.12 @@ -88,14 +88,14 @@
4.13 sched->maxnewest = 0;
4.14
4.15 sched->recpriority = 0;
4.16 - sched->recgroup = 0;
4.17 - sched->playgroup = 0;
4.18 + sched->recgroup = g_string_new("");
4.19 + sched->playgroup = g_string_new("");
4.20
4.21 sched->prefinput = 0;
4.22 sched->inactive = 0;
4.23
4.24 - sched->searchType = g_string_new("");
4.25 - sched->searchForWhat = g_string_new("");
4.26 + sched->search_type = g_string_new("");
4.27 + sched->search_what = g_string_new("");
4.28
4.29 sched->msqlquery = gmyth_query_new ();
4.30 }
4.31 @@ -106,10 +106,30 @@
4.32 GMythScheduler *scheduler = GMYTH_SCHEDULER (object);
4.33
4.34 if (scheduler->backend_info) {
4.35 - g_object_unref (scheduler->backend_info);
4.36 - scheduler->backend_info = NULL;
4.37 + g_object_unref (scheduler->backend_info);
4.38 + scheduler->backend_info = NULL;
4.39 }
4.40
4.41 + if (scheduler->msqlquery) {
4.42 + g_object_unref (scheduler->msqlquery);
4.43 + scheduler->msqlquery = NULL;
4.44 + }
4.45 +
4.46 + if (scheduler->profile != NULL)
4.47 + g_string_free (scheduler->profile, TRUE);
4.48 +
4.49 + if (scheduler->recgroup != NULL)
4.50 + g_string_free (scheduler->recgroup, TRUE);
4.51 +
4.52 + if (scheduler->playgroup != NULL)
4.53 + g_string_free (scheduler->playgroup, TRUE);
4.54 +
4.55 + if (scheduler->search_type != NULL)
4.56 + g_string_free (scheduler->search_type, TRUE);
4.57 +
4.58 + if (scheduler->search_what != NULL)
4.59 + g_string_free (scheduler->search_what, TRUE);
4.60 +
4.61 G_OBJECT_CLASS (gmyth_scheduler_parent_class)->dispose (object);
4.62 }
4.63
4.64 @@ -224,9 +244,9 @@
4.65 while((row = mysql_fetch_row (msql_res)) != NULL) {
4.66 schedule = g_new0(ScheduleInfo, 1);
4.67
4.68 - schedule->record_id = g_ascii_strtoull (row[0], NULL, 10);
4.69 - schedule->program_id = g_ascii_strtoull (row[1], NULL, 10);
4.70 - schedule->channel_id = g_ascii_strtoull (row[2], NULL, 10);
4.71 + schedule->record_id = (guint) g_ascii_strtoull (row[0], NULL, 10);
4.72 + schedule->program_id = (guint) g_ascii_strtoull (row[1], NULL, 10);
4.73 + schedule->channel_id = (guint) g_ascii_strtoull (row[2], NULL, 10);
4.74
4.75 /* generate a time_t from a time and a date db field */
4.76 g_sprintf (date_time, "%sT%s", row[4], row[3]);
4.77 @@ -238,10 +258,10 @@
4.78
4.79 schedule->end_time = gmyth_util_string_to_time_val (date_time);
4.80
4.81 - schedule->title = g_string_new (row[7]);
4.82 - schedule->subtitle = g_string_new (row[8]);
4.83 + schedule->title = g_string_new (row[7]);
4.84 + schedule->subtitle = g_string_new (row[8]);
4.85 schedule->description = g_string_new (row[9]);
4.86 - schedule->category = g_string_new (row[10]);
4.87 + schedule->category = g_string_new (row[10]);
4.88
4.89 (*schedule_list) = g_list_append (*(schedule_list), schedule);
4.90 }
4.91 @@ -271,11 +291,12 @@
4.92
4.93 g_string_printf (query_str,
4.94 "SELECT recordid,programid,chanid,starttime,progstart,"
4.95 - "endtime,progend,title,subtitle,description,category,filesize,basename FROM recorded WHERE recgroup != 'LiveTV'");
4.96 + "endtime,progend,title,subtitle,description,category,"
4.97 + "filesize,basename FROM recorded WHERE recgroup != 'LiveTV'");
4.98
4.99 if (scheduler->msqlquery == NULL) {
4.100 - g_warning ("[%s] Scheduler db connection not initialized", __FUNCTION__);
4.101 - return -1;
4.102 + g_warning ("[%s] Scheduler db connection not initialized", __FUNCTION__);
4.103 + return -1;
4.104 }
4.105
4.106 msql_res = gmyth_query_process_statement (scheduler->msqlquery, query_str->str);
4.107 @@ -285,7 +306,7 @@
4.108 return -1;
4.109 } else {
4.110 MYSQL_ROW row;
4.111 - *recorded_list = NULL;
4.112 + (*recorded_list) = NULL;
4.113
4.114 while((row = mysql_fetch_row (msql_res))!=NULL){
4.115 record = g_new0(RecordedInfo, 1);
4.116 @@ -295,16 +316,16 @@
4.117 record->channel_id = (guint) g_ascii_strtoull (row[2], NULL, 10);
4.118
4.119 record->start_time = gmyth_util_string_to_time_val (row[3]);
4.120 - record->end_time = gmyth_util_string_to_time_val (row[5]);
4.121 + record->end_time = gmyth_util_string_to_time_val (row[5]);
4.122
4.123 - record->title = g_string_new (row[7]);
4.124 - record->subtitle = g_string_new (row[8]);
4.125 + record->title = g_string_new (row[7]);
4.126 + record->subtitle = g_string_new (row[8]);
4.127 record->description = g_string_new (row[9]);
4.128 - record->category = g_string_new (row[10]);
4.129 - record->filesize = g_ascii_strtoull (row[11], NULL, 10);
4.130 - record->basename = g_string_new (row[12]);
4.131 + record->category = g_string_new (row[10]);
4.132 + record->filesize = g_ascii_strtoull (row[11], NULL, 10);
4.133 + record->basename = g_string_new (row[12]);
4.134
4.135 - *recorded_list = g_list_append (*recorded_list, record);
4.136 + (*recorded_list) = g_list_append ((*recorded_list), record);
4.137 }
4.138 }
4.139
4.140 @@ -332,8 +353,6 @@
4.141 MYSQL_RES *msql_res;
4.142 GString *query_str = g_string_new ("");
4.143
4.144 - gchar *date_time = NULL;
4.145 -
4.146 assert(scheduler);
4.147
4.148 if (scheduler->msqlquery == NULL) {
4.149 @@ -352,8 +371,7 @@
4.150 "search, autotranscode, transcoder, tsdefault, "
4.151 "autouserjob1, autouserjob2, autouserjob3, autouserjob4) "
4.152 " values ( %d, 1, %d, \"%s\"," //recordid, type, chanid, starttime
4.153 - " \"%s\", \"%s\", \"%s\", \"%s\","
4.154 - //startdate, endtime, enddate, title
4.155 + " \"%s\", \"%s\", \"%s\", \"%s\"," //startdate, endtime, enddate, title
4.156 "DEFAULT, 0, 0, 0, " //profile, recpriority, maxnewest, inactive
4.157 "0, 1, 0, 0, " //maxepisodes, autoexpire, startoffset, endoffset
4.158 "DEFAULT, 6, 15, %d, " //recgroup, dupmethod, dupin, station
4.159 @@ -362,9 +380,9 @@
4.160 "0, 0, 0, 0 );", //autouserjob1, autouserjob2, autouserjob3, autouserjob4
4.161 schedule_info->record_id, schedule_info->channel_id,
4.162 gmyth_util_time_to_string_only_time( schedule_info->start_time ),
4.163 - gmyth_util_time_to_string_only_date( schedule_info->start_time ),
4.164 - gmyth_util_time_to_string_only_time( schedule_info->end_time ),
4.165 - gmyth_util_time_to_string_only_date( schedule_info->end_time ),
4.166 + gmyth_util_time_to_string_only_date( schedule_info->start_time ),
4.167 + gmyth_util_time_to_string_only_date( schedule_info->start_time ),
4.168 + gmyth_util_time_to_string_only_date( schedule_info->end_time ),
4.169 schedule_info->title->str, //title
4.170 schedule_info->channel_id,//station
4.171 (gmyth_util_time_val_to_date( schedule_info->start_time ))->tm_wday, //findday
4.172 @@ -412,8 +430,8 @@
4.173 assert(scheduler);
4.174
4.175 if (scheduler->msqlquery == NULL) {
4.176 - g_warning ("[%s] Scheduler db connection not initialized", __FUNCTION__);
4.177 - return FALSE;
4.178 + g_warning ("[%s] Scheduler db connection not initialized", __FUNCTION__);
4.179 + return FALSE;
4.180 }
4.181
4.182 //========================================
4.183 @@ -530,16 +548,16 @@
4.184 proginfo->chanstr = g_string_new (msql_row[6]);
4.185 proginfo->chansign = g_string_new (msql_row[7]);
4.186 proginfo->channame = g_string_new (msql_row[0]);
4.187 - proginfo->chancommfree = g_ascii_strtoull (msql_row[9], NULL, 10);
4.188 + proginfo->chancommfree = (gint) g_ascii_strtoll (msql_row[9], NULL, 10);
4.189 proginfo->chanOutputFilters = g_string_new (msql_row[10]);
4.190 proginfo->seriesid = g_string_new (msql_row[11]);
4.191 proginfo->programid = g_string_new (msql_row[12]);
4.192 - proginfo->filesize = g_ascii_strtoull (msql_row[13], NULL, 10);
4.193 + proginfo->filesize = g_ascii_strtoll (msql_row[13], NULL, 10);
4.194
4.195 proginfo->lastmodified = gmyth_util_string_to_time_val (msql_row[14]);
4.196
4.197 proginfo->stars = g_ascii_strtod (msql_row[15], NULL);
4.198 - proginfo->repeat = g_ascii_strtoull (msql_row[16], NULL, 10);
4.199 + proginfo->repeat = (gint) g_ascii_strtoll (msql_row[16], NULL, 10);
4.200
4.201 if (msql_row[17] == NULL) {
4.202 proginfo->originalAirDate = 0;
4.203 @@ -550,15 +568,15 @@
4.204 }
4.205
4.206 proginfo->hostname = g_string_new (msql_row[18]);
4.207 - proginfo->recordid = g_ascii_strtoull (msql_row[19], NULL, 10);
4.208 - proginfo->transcoder = g_ascii_strtoull (msql_row[20], NULL, 10);
4.209 + proginfo->recordid = (gint) g_ascii_strtoll (msql_row[19], NULL, 10);
4.210 + proginfo->transcoder = (gint) g_ascii_strtoll (msql_row[20], NULL, 10);
4.211
4.212 //proginfo->spread = -1;
4.213 //proginfo->programflags = proginfo->getProgramFlags();
4.214
4.215 proginfo->recgroup = g_string_new (msql_row[26]);
4.216 proginfo->playgroup = g_string_new (msql_row[21]);
4.217 - proginfo->recpriority = g_ascii_strtoull (msql_row[22], NULL, 10);
4.218 + proginfo->recpriority = (gint) g_ascii_strtoll (msql_row[22], NULL, 10);
4.219
4.220 proginfo->pathname = g_string_new (msql_row[25]);
4.221
4.222 @@ -614,7 +632,7 @@
4.223 scheduler->backend_info->port)) {
4.224 gmyth_socket_sendreceive_stringlist (socket, strlist);
4.225 } else {
4.226 - g_warning ("[%s] Connection to backend failed!", __FUNCTION__);
4.227 + g_warning ("[%s] Connection to backend failed!", __FUNCTION__);
4.228 }
4.229
4.230 g_string_free(datastr, TRUE);
4.231 @@ -644,6 +662,12 @@
4.232 if (info->basename != NULL)
4.233 g_string_free (info->basename, TRUE);
4.234
4.235 + if (info != NULL)
4.236 + g_free (info->start_time);
4.237 +
4.238 + if (info != NULL)
4.239 + g_free (info->end_time);
4.240 +
4.241 g_free (info);
4.242 }
4.243
4.244 @@ -662,6 +686,12 @@
4.245 if (info->category != NULL)
4.246 g_string_free (info->category, TRUE);
4.247
4.248 + if (info != NULL)
4.249 + g_free (info->start_time);
4.250 +
4.251 + if (info != NULL)
4.252 + g_free (info->end_time);
4.253 +
4.254 g_free (info);
4.255 }
4.256
5.1 --- a/gmyth/src/gmyth_scheduler.h Mon Mar 05 21:58:21 2007 +0000
5.2 +++ b/gmyth/src/gmyth_scheduler.h Mon Mar 05 22:18:17 2007 +0000
5.3 @@ -90,20 +90,20 @@
5.4 long prefinput;
5.5 short int inactive;
5.6
5.7 - GString *searchType;
5.8 - GString *searchForWhat;
5.9 + GString *search_type;
5.10 + GString *search_what;
5.11
5.12 GMythQuery *msqlquery;
5.13 GMythBackendInfo *backend_info;
5.14 };
5.15
5.16 typedef struct {
5.17 - gint record_id;
5.18 - gint program_id;
5.19 - gint channel_id;
5.20 + guint record_id;
5.21 + guint program_id;
5.22 + guint channel_id;
5.23
5.24 - GTimeVal* start_time;
5.25 - GTimeVal* end_time;
5.26 + GTimeVal *start_time;
5.27 + GTimeVal *end_time;
5.28
5.29 GString *title;
5.30 GString *subtitle;
6.1 --- a/gmyth/src/gmyth_socket.c Mon Mar 05 21:58:21 2007 +0000
6.2 +++ b/gmyth/src/gmyth_socket.c Mon Mar 05 22:18:17 2007 +0000
6.3 @@ -140,13 +140,12 @@
6.4 static gint
6.5 gmyth_socket_find_match_address_uri( GMythURI* uri, gchar *address ) {
6.6
6.7 - if ( g_ascii_strcasecmp( gmyth_uri_get_host( uri ), address ) == 0 ) {
6.8 - //g_debug( "Found URI: %s !!!\n", rui_uri_getvalue(uri) );
6.9 - return 0;
6.10 - } else {
6.11 - return -1;
6.12 - }
6.13 -
6.14 + if ( g_ascii_strcasecmp( gmyth_uri_get_host( uri ), address ) == 0 ) {
6.15 + //g_debug( "Found URI: %s !!!\n", rui_uri_getvalue(uri) );
6.16 + return 0;
6.17 + } else {
6.18 + return -1;
6.19 + }
6.20 }
6.21
6.22 static const gchar *PATH_PROC_NET_DEV = "/proc/net/dev";
6.23 @@ -177,7 +176,7 @@
6.24 fgets(buffer, sizeof(buffer)-1, fd);
6.25 while (!feof(fd)) {
6.26 ifname = buffer;
6.27 - sep;
6.28 +
6.29 if (fgets(buffer, sizeof(buffer)-1, fd) == NULL)
6.30 break;
6.31 sep = strrchr(buffer, ':');
6.32 @@ -204,7 +203,6 @@
6.33 fclose(fd);
6.34 close(s);
6.35 return local_addrs;
6.36 -
6.37 }
6.38
6.39