/* channels.conf parser an implementation for the High Level Common Interface Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __CHANNELS_H__ #define __CHANNELS_H__ 1 #include #define POLARIZATION_H 0 #define POLARIZATION_V 1 struct source_params { char* source_id; fe_type_t fe_type; struct source_params* next; /* NULL=> last entry */ }; struct diseqc_params { char* source_id; unsigned long slof; int polarization; unsigned long lof; char* command; struct diseqc_params* next; /* NULL=> last entry */ }; struct channel_params { char* channel_name; struct dvb_frontend_parameters fe_params; char* provider_name; char* source_id; uint32_t video_pid; uint32_t audio_pid; uint32_t service_id; struct channel_params* next; /* NULL=> last entry */ }; extern struct source_params* dvb_sources; extern struct diseqc_params* dvb_diseqcs; extern struct channel_params* dvb_channels; /** * Load a DVB configuration file into memory. This can be called multiple * times to load several DVB configuration files. * * @param config_file Configuration file to load (type will be autodetected). * @return 0 on success, other code on error. */ extern int load_dvb_config(char* config_file); /** * Free all loaded dvb configuration information. */ extern void free_dvb_config(); /** * Find channel parameters. * * @param first Starting channel_params structure, or NULL to search from the start. * @param name Name of channel. * @param fe_type Frontend type. * @return The channel parameters structure, or NULL if not found. */ extern struct channel_params* find_dvb_channel(struct channel_params* first, char* name, fe_type_t fe_type); /** * Find diseqc parameters for a channel. * * @param first Starting diseqc_params structure, or NULL to search from the start. * @param channel The channel to look for. * @return The diseqc parameters structure, or NULL if none found for that diseqc. */ extern struct diseqc_params* find_dvb_diseqc(struct diseqc_params* first, struct channel_params* channel); /** * Find source for a channel * * @param first Starting sources_params structure, or NULL to search from the start. * @param source_id The source to look for. * @param fe_type Frontend type of the source. * @return The source parameters structure, or NULL if none found for that source. */ extern struct sources_params* find_source(struct sources_params* first, char* source_id, fe_type_t fe_type); #endif