5 // Channel table entry for the TV tuner
12 Channel::Channel(Channel *channel)
15 printf("Channel::Channel(Channel *channel) not supported\n");
43 Channel& Channel::operator=(Channel &channel)
45 printf("Channel::operator= not supported.\n");
49 void Channel::copy_settings(Channel *channel)
51 strcpy(this->title, channel->title);
52 this->entry = channel->entry;
53 this->freqtable = channel->freqtable;
54 this->fine_tune = channel->fine_tune;
55 this->input = channel->input;
56 this->norm = channel->norm;
57 this->device_index = channel->device_index;
58 this->tuner = channel->tuner;
61 void Channel::copy_usage(Channel *channel)
63 this->use_frequency = channel->use_frequency;
64 this->use_fine = channel->use_fine;
65 this->use_norm = channel->use_norm;
66 this->use_input = channel->use_input;
69 int Channel::load(FileXML *file)
77 done = file->read_tag();
80 if(file->tag.title_is("CHANNEL"))
82 entry = file->tag.get_property("ENTRY", entry);
83 freqtable = file->tag.get_property("FREQTABLE", freqtable);
84 fine_tune = file->tag.get_property("FINE_TUNE", fine_tune);
85 input = file->tag.get_property("INPUT", input);
86 norm = file->tag.get_property("NORM", norm);
87 device_index = file->tag.get_property("DEVICE_INDEX", device_index);
88 tuner = file->tag.get_property("TUNER", tuner);
89 text = file->read_text();
93 if(file->tag.title_is("/CHANNEL"))
100 int Channel::save(FileXML *file)
102 file->tag.set_title("CHANNEL");
103 file->tag.set_property("ENTRY", entry);
104 file->tag.set_property("FREQTABLE", freqtable);
105 file->tag.set_property("FINE_TUNE", fine_tune);
106 file->tag.set_property("INPUT", input);
107 file->tag.set_property("NORM", norm);
108 file->tag.set_property("DEVICE_INDEX", device_index);
109 file->tag.set_property("TUNER", tuner);
111 file->append_text(title);
112 file->tag.set_title("/CHANNEL");
114 file->append_newline();