void operator<<= (cxxtools::SerializationInfo& si, const SerComponent& c)
{
  si.addMember("stream") <<= c.Stream;
  si.addMember("type") <<= c.Type;
  si.addMember("language") <<= c.Language;
  si.addMember("description") <<= c.Description;
}
Beispiel #2
0
    void operator<<= (cxxtools::SerializationInfo& si, const tntdb::Statement& res)
    {
        si.setTypeName("dbResult");
        si.setCategory(cxxtools::SerializationInfo::Array);

        for (auto cur: res)
            si.addMember() <<= cur;
    }
Beispiel #3
0
    void operator<<= (cxxtools::SerializationInfo& si, const tntdb::Row& row)
    {
        si.setTypeName("dbRow");

        for (unsigned n = 0; n < row.size(); ++n)
        {
            cxxtools::SerializationInfo& vsi = si.addMember(row.getName(n));

            // leave the new member NULL if the value is null
            std::string value;
            if (row[n].get(value))
                vsi <<= value;
        }
    }
void operator<<= (cxxtools::SerializationInfo& si, const SerTextOsd& o)
{
  si.addMember("type") <<= "TextOsd";
  si.addMember("title") <<= o.Title;
  si.addMember("message") <<= o.Message;
  si.addMember("red") <<= o.Red;
  si.addMember("green") <<= o.Green;
  si.addMember("yellow") <<= o.Yellow;
  si.addMember("blue") <<= o.Blue;

  si.addMember("items") <<= o.ItemContainer->items;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerProgrammeOsd& o)
{
  si.addMember("present_time") <<= o.PresentTime;
  si.addMember("present_title") <<= o.PresentTitle;
  si.addMember("present_subtitle") <<= o.PresentSubtitle;
  si.addMember("following_time") <<= o.FollowingTime;
  si.addMember("following_title") <<= o.FollowingTitle;
  si.addMember("following_subtitle") <<= o.FollowingSubtitle;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerRecording& p)
{
  si.addMember("number") <<= p.Number;
  si.addMember("name") <<= p.Name;
  si.addMember("file_name") <<= p.FileName;
  si.addMember("relative_file_name") <<= p.RelativeFileName;
  si.addMember("is_new") <<= p.IsNew;
  si.addMember("is_edited") <<= p.IsEdited;
  si.addMember("is_pes_recording") <<= p.IsPesRecording;
  si.addMember("duration") <<= p.Duration;
  si.addMember("frames_per_second") <<= p.FramesPerSecond;
  si.addMember("marks") <<= p.Marks.marks;
  si.addMember("event_title") <<= p.EventTitle;
  si.addMember("event_short_text") <<= p.EventShortText;
  si.addMember("event_description") <<= p.EventDescription;
  si.addMember("event_start_time") <<= p.EventStartTime;
  si.addMember("event_duration") <<= p.EventDuration;
}
Beispiel #7
0
void operator<<= (cxxtools::SerializationInfo& si, const SerBulkDeleted& t)
{
  si.addMember("id") <<= t.id;
  si.addMember("deleted") <<= t.deleted;
}
T siValue(const cxxtools::SerializationInfo& si)
{
    T value;
    si.getValue(value);
    return value;
}
Beispiel #9
0
void operator<<= (cxxtools::SerializationInfo& si, const SerChannel& c)
{
  si.addMember("name") <<= c.Name;
  si.addMember("number") <<= c.Number;
  si.addMember("channel_id") <<= c.ChannelId;
  si.addMember("image") <<= c.Image;
  si.addMember("group") <<= c.Group;
  si.addMember("transponder") <<= c.Transponder;
  si.addMember("stream") <<= c.Stream;
  si.addMember("is_atsc") <<= c.IsAtsc;
  si.addMember("is_cable") <<= c.IsCable;
  si.addMember("is_terr") <<= c.IsTerr;
  si.addMember("is_sat") <<= c.IsSat;
  si.addMember("is_radio") <<= c.IsRadio;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerPluginList& pl)
{
  si.addMember("plugins") <<= pl.plugins;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerService& s)
{
  si.addMember("path") <<= s.Path;
  si.addMember("version") <<= s.Version;
}
void operator<<= (cxxtools::SerializationInfo& si, const struct tEpgDetail& e)
{
  si.addMember("key") <<= StringExtension::UTF8Decode(e.key);
  si.addMember("value") <<= StringExtension::UTF8Decode(e.value);
}
void operator<<= (cxxtools::SerializationInfo& si, const SerEvent& e)
{
  si.addMember("id") <<= e.Id;
  si.addMember("title") <<= e.Title;
  si.addMember("short_text") <<= e.ShortText;
  si.addMember("description") <<= e.Description;
  si.addMember("start_time") <<= e.StartTime;
  si.addMember("channel") <<= e.Channel;
  si.addMember("channel_name") <<= e.ChannelName;
  si.addMember("duration") <<= e.Duration;
  si.addMember("table_id") <<= e.TableID;
  si.addMember("version") <<= e.Version;
  si.addMember("images") <<= e.Images;
  si.addMember("timer_exists") <<= e.TimerExists;
  si.addMember("timer_active") <<= e.TimerActive;
  si.addMember("timer_id") <<= e.TimerId;
  si.addMember("parental_rating") <<= e.ParentalRating;
  si.addMember("vps") <<= e.Vps;

  vector< SerComponent > components;
  if ( e.Instance->Components() != NULL ) {
     for(int i=0;i<e.Instance->Components()->NumComponents();i++) {
        tComponent* comp = e.Instance->Components()->Component(i);
        SerComponent component;
        component.Stream = (int)comp->stream;
        component.Type = (int)comp->type;
        component.Language = StringExtension::UTF8Decode("");
        if(comp->language != NULL) component.Language = StringExtension::UTF8Decode(string(comp->language));
        component.Description = StringExtension::UTF8Decode("");
        if(comp->description != NULL) component.Description = StringExtension::UTF8Decode(string(comp->description));
        components.push_back(component); 
     }
  }

  si.addMember("components") <<= components;

  vector< cxxtools::String > contents;
  int counter = 0;
  uchar content = e.Instance->Contents(counter);
  while (content != 0) {
     contents.push_back(StringExtension::UTF8Decode(cEvent::ContentToString(content)));
     counter++;
     content = e.Instance->Contents(counter);
  }
  si.addMember("contents") <<= contents;

  vector< int > raw_contents;
  counter = 0;
  uchar raw_content = e.Instance->Contents(counter);
  while (raw_content != 0) {
     raw_contents.push_back(raw_content);
     counter++;
     raw_content = e.Instance->Contents(counter);
  }
  si.addMember("raw_contents") <<= raw_contents;

#ifdef EPG_DETAILS_PATCH
  si.addMember("details") <<= *e.Details;
#endif

  si.addMember("additional_media") <<= e.AdditionalMedia;

}
Beispiel #14
0
void operator<<= (cxxtools::SerializationInfo& si, const MyObject& obj)
{
  si.addMember("id") <<= obj.id;
  si.addMember("a") <<= obj.a;
  si.addMember("b") <<= obj.b;
}
Beispiel #15
0
void operator<<= (cxxtools::SerializationInfo& si, const SerTimer& t)
{
  si.addMember("id") <<= t.Id;
  si.addMember("flags") <<= t.Flags;
  si.addMember("start") <<= t.Start;
  si.addMember("start_timestamp") <<= t.StartTimeStamp;
  si.addMember("stop_timestamp") <<= t.StopTimeStamp;
  si.addMember("stop") <<= t.Stop;
  si.addMember("priority") <<= t.Priority;
  si.addMember("lifetime") <<= t.Lifetime;
  si.addMember("event_id") <<= t.EventID;
  si.addMember("weekdays") <<= t.WeekDays;
  si.addMember("day") <<= t.Day;
  si.addMember("channel") <<= t.Channel;
  si.addMember("filename") <<= t.FileName;
  si.addMember("channel_name") <<= t.ChannelName;
  si.addMember("is_pending") <<= t.IsPending;
  si.addMember("is_recording") <<= t.IsRecording;
  si.addMember("is_active") <<= t.IsActive;
}
void operator<<= (cxxtools::SerializationInfo& si, SerSearchTimerContainer s)
{
  si.addMember("id") <<= s.timer->Id();
  si.addMember("search") <<= StringExtension::UTF8Decode(s.timer->Search());
  si.addMember("mode") <<= s.timer->SearchMode();
  si.addMember("tolerance") <<= s.timer->Tolerance();
  si.addMember("match_case") <<= s.timer->MatchCase();
  si.addMember("use_time") <<= s.timer->UseTime();
  si.addMember("use_title") <<= s.timer->UseTitle();
  si.addMember("use_subtitle") <<= s.timer->UseSubtitle();
  si.addMember("use_description") <<= s.timer->UseDescription();
  si.addMember("start_time") <<= s.timer->StartTime();
  si.addMember("stop_time") <<= s.timer->StopTime();
  si.addMember("use_channel") <<= s.timer->UseChannel();
  si.addMember("channel_min") <<= (const char*)s.timer->ChannelMin().ToString();
  si.addMember("channel_max") <<= (const char*)s.timer->ChannelMax().ToString();
  si.addMember("channels") <<= s.timer->ChannelText();
  si.addMember("use_as_searchtimer") <<= s.timer->UseAsSearchTimer();
  si.addMember("use_duration") <<= s.timer->UseDuration();
  si.addMember("duration_min") <<= s.timer->MinDuration();
  si.addMember("duration_max") <<= s.timer->MaxDuration();
  si.addMember("use_dayofweek") <<= s.timer->UseDayOfWeek();
  si.addMember("dayofweek") <<= s.timer->DayOfWeek();
  si.addMember("use_in_favorites") <<= s.timer->UseInFavorites();
  si.addMember("search_timer_action") <<= s.timer->SearchTimerAction();
  si.addMember("use_series_recording") <<= s.timer->UseSeriesRecording();
  si.addMember("directory") <<= s.timer->Directory();
  si.addMember("del_recs_after_days") <<= s.timer->DelRecsAfterDays();
  si.addMember("keep_recs") <<= s.timer->KeepRecs();
  si.addMember("pause_on_recs") <<= s.timer->PauseOnRecs();
  si.addMember("blacklist_mode") <<= s.timer->BlacklistMode();
  si.addMember("switch_min_before") <<= s.timer->SwitchMinBefore();
  si.addMember("use_ext_epg_info") <<= s.timer->UseExtEPGInfo();
  si.addMember("ext_epg_info") <<= s.timer->ExtEPGInfo();
  si.addMember("avoid_repeats") <<= s.timer->AvoidRepeats();
  si.addMember("allowed_repeats") <<= s.timer->AllowedRepeats();
  si.addMember("repeats_within_days") <<= s.timer->RepeatsWithinDays();
  si.addMember("compare_title") <<= s.timer->CompareTitle();
  si.addMember("compare_subtitle") <<= s.timer->CompareSubtitle();
  si.addMember("compare_summary") <<= s.timer->CompareSummary();
  si.addMember("compare_categories") <<= s.timer->CompareCategories();
  si.addMember("priority") <<= s.timer->Priority();
  si.addMember("lifetime") <<= s.timer->Lifetime();
  si.addMember("margin_start") <<= s.timer->MarginStart();
  si.addMember("margin_stop") <<= s.timer->MarginStop();
  si.addMember("use_vps") <<= s.timer->UseVPS();
  si.addMember("del_mode") <<= s.timer->DelMode();
  si.addMember("del_after_count_recs") <<= s.timer->DelAfterCountRecs();
  si.addMember("del_after_days_of_first_rec") <<= s.timer->DelAfterDaysOfFirstRec();
}
void operator<<= (cxxtools::SerializationInfo& si, const SerContentDescriptor& t)
{
  si.addMember("id") <<= t.id;
  si.addMember("name") <<= t.name;
  si.addMember("is_group") <<= t.isGroup;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerPlugin& p)
{
  si.addMember("name") <<= p.Name;
  si.addMember("version") <<= p.Version;
}
Beispiel #19
0
void operator<<= (cxxtools::SerializationInfo& si, const SerTextOsdItem& o)
{
  si.addMember("content") <<= o.Content;
  si.addMember("is_selected") <<= o.Selected;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerPlayerInfo& pi)
{
  si.addMember("name") <<= pi.Name;
  si.addMember("filename") <<= pi.FileName;
}
void operator<<= (cxxtools::SerializationInfo& si, const SerRecording& p)
{
  si.addMember("number") <<= p.Number;
  si.addMember("name") <<= p.Name;
  si.addMember("file_name") <<= p.FileName;
  si.addMember("relative_file_name") <<= p.RelativeFileName;
  si.addMember("inode") <<= p.Inode;
  si.addMember("is_new") <<= p.IsNew;
  si.addMember("is_edited") <<= p.IsEdited;
  si.addMember("is_pes_recording") <<= p.IsPesRecording;
  si.addMember("duration") <<= p.Duration;
  si.addMember("filesize_mb") <<= p.FileSizeMB;
  si.addMember("channel_id") <<= p.ChannelID;
  si.addMember("frames_per_second") <<= p.FramesPerSecond;
  si.addMember("marks") <<= p.Marks.marks;
  si.addMember("event_title") <<= p.EventTitle;
  si.addMember("event_short_text") <<= p.EventShortText;
  si.addMember("event_description") <<= p.EventDescription;
  si.addMember("event_start_time") <<= p.EventStartTime;
  si.addMember("event_duration") <<= p.EventDuration;
  si.addMember("additional_media") <<= p.AdditionalMedia;
  si.addMember("aux") <<= p.Aux;
  si.addMember("sync_action") <<= p.SyncAction;
  si.addMember("hash") <<= p.hash;
}