1b2859abeSMarcus Overhagen /* 2b2859abeSMarcus Overhagen * Copyright (c) 2004-2007 Marcus Overhagen <marcus@overhagen.de> 3b2859abeSMarcus Overhagen * 4b2859abeSMarcus Overhagen * Permission is hereby granted, free of charge, to any person 5b2859abeSMarcus Overhagen * obtaining a copy of this software and associated documentation 6b2859abeSMarcus Overhagen * files (the "Software"), to deal in the Software without restriction, 7b2859abeSMarcus Overhagen * including without limitation the rights to use, copy, modify, 8b2859abeSMarcus Overhagen * merge, publish, distribute, sublicense, and/or sell copies of 9b2859abeSMarcus Overhagen * the Software, and to permit persons to whom the Software is 10b2859abeSMarcus Overhagen * furnished to do so, subject to the following conditions: 11b2859abeSMarcus Overhagen * 12b2859abeSMarcus Overhagen * The above copyright notice and this permission notice shall be 13b2859abeSMarcus Overhagen * included in all copies or substantial portions of the Software. 14b2859abeSMarcus Overhagen * 15b2859abeSMarcus Overhagen * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16b2859abeSMarcus Overhagen * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17b2859abeSMarcus Overhagen * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18b2859abeSMarcus Overhagen * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19b2859abeSMarcus Overhagen * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20b2859abeSMarcus Overhagen * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21b2859abeSMarcus Overhagen * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22b2859abeSMarcus Overhagen * OTHER DEALINGS IN THE SOFTWARE. 23b2859abeSMarcus Overhagen */ 24b2859abeSMarcus Overhagen 25b2859abeSMarcus Overhagen #ifndef __DVB_CARD_H 26b2859abeSMarcus Overhagen #define __DVB_CARD_H 27b2859abeSMarcus Overhagen 28*fcb9bdc0SMarcus Overhagen #include "dvb.h" 29b2859abeSMarcus Overhagen 30b2859abeSMarcus Overhagen class DVBCard 31b2859abeSMarcus Overhagen { 32b2859abeSMarcus Overhagen public: 33b2859abeSMarcus Overhagen DVBCard(const char *path); 34b2859abeSMarcus Overhagen ~DVBCard(); 35b2859abeSMarcus Overhagen 36b2859abeSMarcus Overhagen status_t InitCheck(); 37b2859abeSMarcus Overhagen 38b2859abeSMarcus Overhagen status_t GetCardType(dvb_type_t *type); 39b2859abeSMarcus Overhagen status_t GetCardInfo(char *name, int max_name_len, char *info, int max_info_len); 40b2859abeSMarcus Overhagen status_t GetSignalInfo(uint32 *ss, uint32 *ber, uint32 *snr); 41b2859abeSMarcus Overhagen 42b2859abeSMarcus Overhagen status_t SetTuningParameter(const dvb_tuning_parameters_t& param); 43b2859abeSMarcus Overhagen status_t GetTuningParameter(dvb_tuning_parameters_t *param); 44b2859abeSMarcus Overhagen 45b2859abeSMarcus Overhagen status_t CaptureStart(); 46b2859abeSMarcus Overhagen status_t CaptureStop(); 47b2859abeSMarcus Overhagen status_t Capture(void **data, size_t *size, bigtime_t *end_time); 48b2859abeSMarcus Overhagen 49b2859abeSMarcus Overhagen private: 50b2859abeSMarcus Overhagen 51b2859abeSMarcus Overhagen int do_ioctl(int fDev, ulong op, void *arg); 52b2859abeSMarcus Overhagen 53b2859abeSMarcus Overhagen status_t fInitStatus; 54b2859abeSMarcus Overhagen int fDev; 55b2859abeSMarcus Overhagen 56b2859abeSMarcus Overhagen int64 fFreqMin; 57b2859abeSMarcus Overhagen int64 fFreqMax; 58b2859abeSMarcus Overhagen int64 fFreqStep; 59b2859abeSMarcus Overhagen 60b2859abeSMarcus Overhagen bool fCaptureActive; 61b2859abeSMarcus Overhagen 62b2859abeSMarcus Overhagen dvb_tuning_parameters_t params; // XXX temporary cache 63b2859abeSMarcus Overhagen }; 64b2859abeSMarcus Overhagen 65b2859abeSMarcus Overhagen 66b2859abeSMarcus Overhagen #endif 67