[svn r129] Added gmyth_programinfo.c/h trunk
authormelunko
Tue Nov 28 14:01:20 2006 +0000 (2006-11-28)
branchtrunk
changeset 128d183df7d8459
parent 127 a7237ce91c3b
child 129 acb4ff7d7d0c
[svn r129] Added gmyth_programinfo.c/h
gmyth/src/gmyth_programinfo.c
gmyth/src/gmyth_programinfo.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gmyth/src/gmyth_programinfo.c	Tue Nov 28 14:01:20 2006 +0000
     1.3 @@ -0,0 +1,59 @@
     1.4 +
     1.5 +#include "gmyth_programinfo.h"
     1.6 +
     1.7 +GMythStringList*
     1.8 +gmyth_program_info_to_string_list (GMythProgramInfo *prog, GMythStringList *slist)
     1.9 +{
    1.10 +    g_return_val_if_fail (prog != NULL, NULL);
    1.11 +    g_return_val_if_fail (slist != NULL, NULL);
    1.12 +
    1.13 +    gmyth_string_list_append_string (slist, prog->title);
    1.14 +    gmyth_string_list_append_string (slist, prog->subtitle);
    1.15 +    gmyth_string_list_append_string (slist, prog->description);
    1.16 +    gmyth_string_list_append_string (slist, prog->category);
    1.17 +    gmyth_string_list_append_string (slist, prog->chanid);
    1.18 +    gmyth_string_list_append_string (slist, prog->chanstr);
    1.19 +    gmyth_string_list_append_string (slist, prog->chansign);
    1.20 +    gmyth_string_list_append_string (slist, prog->channame);
    1.21 +    gmyth_string_list_append_string (slist, prog->pathname);
    1.22 +    gmyth_string_list_append_int64 (slist, prog->filesize);
    1.23 +
    1.24 +    gmyth_string_list_append_int (slist, 0); //DATETIME_TO_LIST(startts)
    1.25 +    gmyth_string_list_append_int (slist, 0); //DATETIME_TO_LIST(endts)
    1.26 +    gmyth_string_list_append_int (slist, prog->duplicate);
    1.27 +    gmyth_string_list_append_int (slist, prog->shareable);
    1.28 +    gmyth_string_list_append_int (slist, prog->findid);
    1.29 +    gmyth_string_list_append_string (slist, prog->hostname);
    1.30 +    gmyth_string_list_append_int (slist, prog->sourceid);
    1.31 +    gmyth_string_list_append_int (slist, prog->cardid);
    1.32 +    gmyth_string_list_append_int (slist, prog->inputid);
    1.33 +    gmyth_string_list_append_int (slist, prog->recpriority);
    1.34 +    gmyth_string_list_append_int (slist, 0 /*prog->recstatus*/);
    1.35 +    gmyth_string_list_append_int (slist, prog->recordid);
    1.36 +    gmyth_string_list_append_int (slist, 0 /*prog->rectype*/);
    1.37 +    gmyth_string_list_append_int (slist, 0 /*prog->dupin*/);
    1.38 +    gmyth_string_list_append_int (slist, 0 /*prog->dupmethod*/);
    1.39 +    gmyth_string_list_append_int (slist, 0); //DATETIME_TO_LIST(recstartts)
    1.40 +    gmyth_string_list_append_int (slist, 0); //DATETIME_TO_LIST(recendts)
    1.41 +    gmyth_string_list_append_int (slist, prog->repeat);
    1.42 +    gmyth_string_list_append_int (slist, prog->programflags);
    1.43 +    gmyth_string_list_append_char_array (slist, "Default"); //prog->(recgroup != "") ? recgroup : "Default")
    1.44 +    gmyth_string_list_append_int (slist, prog->chancommfree);
    1.45 +    gmyth_string_list_append_string (slist, prog->chanOutputFilters);
    1.46 +    gmyth_string_list_append_string (slist, prog->seriesid);
    1.47 +    gmyth_string_list_append_string (slist, prog->programid);
    1.48 +    gmyth_string_list_append_int (slist, 0); //DATETIME_TO_LIST(lastmodified)
    1.49 +    gmyth_string_list_append_int (slist, 0); //FLOAT_TO_LIST(stars)
    1.50 +    gmyth_string_list_append_int (slist, 0); //DATETIME_TO_LIST(QDateTime(originalAirDate))
    1.51 +    gmyth_string_list_append_int (slist, prog->hasAirDate);
    1.52 +    gmyth_string_list_append_char_array (slist, "Default"); //prog->(playgroup != "") ? playgroup : "Default")
    1.53 +    gmyth_string_list_append_int (slist, prog->recpriority2);
    1.54 +   
    1.55 +    return slist;
    1.56 +}
    1.57 +
    1.58 +GMythProgramInfo*
    1.59 +gmyth_program_info_from_string_list ()
    1.60 +{
    1.61 +    return NULL;
    1.62 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/gmyth/src/gmyth_programinfo.h	Tue Nov 28 14:01:20 2006 +0000
     2.3 @@ -0,0 +1,11 @@
     2.4 +
     2.5 +#ifndef _GMYTH_PROGRAMINFO_H
     2.6 +#define _GMYTH_PROGRAMINFO_H
     2.7 +
     2.8 +#include "gmyth_stringlist.h"
     2.9 +#include "gmyth_common.h"
    2.10 +
    2.11 +GMythStringList* gmyth_program_info_to_string_list (GMythProgramInfo *prog, GMythStringList *slist);
    2.12 +GMythProgramInfo* gmyth_program_info_from_string_list ();
    2.13 +
    2.14 +#endif