00001 #ifndef CHANNEL_H 00002 #define CHANNEL_H 00003 00004 #include "bcwindowbase.inc" 00005 #include "bchash.inc" 00006 #include "filexml.inc" 00007 00008 // Used by both GUI to change channels and devices to map channels to 00009 // device parameters. 00010 00011 class Channel 00012 { 00013 public: 00014 Channel(); 00015 Channel(Channel *channel); 00016 ~Channel(); 00017 00018 void reset(); 00019 void dump(); 00020 Channel& operator=(Channel &channel); 00021 // Copy channel location only 00022 void copy_settings(Channel *channel); 00023 // Copy what parameters the tuner device supports only 00024 void copy_usage(Channel *channel); 00025 int load(FileXML *file); 00026 int save(FileXML *file); 00027 // Store the location of the channels to scan. 00028 // Only used for channel scanning 00029 void load_defaults(BC_Hash *defaults); 00030 void save_defaults(BC_Hash *defaults); 00031 00032 00033 // Flags for GUI settings the device uses 00034 int use_frequency; 00035 int use_fine; 00036 int use_norm; 00037 int use_input; 00038 // Device supports scanning 00039 int has_scanning; 00040 00041 00042 00043 // User supplied name 00044 char title[BCTEXTLEN]; 00045 // Name given by device for the channel 00046 char device_name[BCTEXTLEN]; 00047 00048 00049 00050 00051 // Number of the table entry in the appropriate freqtable 00052 // or channel number. 00053 int entry; 00054 // Table to use 00055 int freqtable; 00056 // Fine tuning offset 00057 int fine_tune; 00058 // Input source 00059 int input; 00060 int norm; 00061 // Index used by the device 00062 int device_index; 00063 // Tuner number used by the device 00064 int tuner; 00065 // PID's to capture for digital TV 00066 int audio_pid; 00067 int video_pid; 00068 // All available PID's detected by the receiver. 00069 int *audio_pids; 00070 int *video_pids; 00071 }; 00072 00073 00074 #endif
1.5.5