/** * ScanChannelsBDA.h * Copyright (C) 2004 BionicDonkey * Copyright (C) 2004 Nate * * This file is part of DigitalWatch, a free DTV watching and recording * program for the VisionPlus DVB-T. * * DigitalWatch 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. * * DigitalWatch 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 DigitalWatch; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef BDASCANCHANNELS_H #define BDASCANCHANNELS_H #include "stdafx.h" #include "Mpeg2DataParser.h" #include "BDACardCollection.h" #include class BDAChannelScan : IGuideDataEvent { public: BDAChannelScan(); ~BDAChannelScan(); HRESULT CreateGraph(); HRESULT BuildGraph(); HRESULT LockChannel(long lFrequency, long lBandwidth, long &strength, long &quality); HRESULT newRequest(long lFrequency, long lBandwidth, ITuneRequest* &pExTuneRequest); HRESULT InitialiseTuningSpace(); HRESULT selectCard(); void AddNetwork(long freq, long band); HRESULT scanNetworks(); HRESULT scanAll(); //HRESULT scanOne(); BOOL IsVerbose() { return m_bVerbose; } void ToggleVerbose() { m_bVerbose = !m_bVerbose; } BOOL StartGraph(); BOOL StopGraph(); STDMETHODIMP_(ULONG) AddRef(void); STDMETHODIMP_(ULONG) Release(void); STDMETHODIMP QueryInterface(REFIID, void **); STDMETHODIMP ProgramChanged(VARIANT varProgramDescriptionID); STDMETHODIMP ServiceChanged(VARIANT varServiceDescriptionID); STDMETHODIMP ScheduleEntryChanged(VARIANT varScheduleEntryDescriptionID); STDMETHODIMP GuideDataAcquired(); STDMETHODIMP ProgramDeleted(VARIANT varProgramDescriptionID); STDMETHODIMP ServiceDeleted(VARIANT varServiceDescriptionID); STDMETHODIMP ScheduleDeleted(VARIANT varScheduleEntryDescriptionID); HRESULT createConnectionPoint(); private: HRESULT scanChannel(long channelNumber, long frequency, long bandwidth); HRESULT scanChannels(); CComPtr m_pBDANetworkProvider; CComPtr m_pBDATuner; CComPtr m_pBDADemod; CComPtr m_pBDACapture; CComPtr m_pBDAMpeg2Demux; CComPtr m_pBDATIF; CComPtr m_pBDASecTab; CComPtr m_pTuningSpace; CComPtr m_piTuner; CComPtr m_piGuideData; CComPtr m_piConnectionPoint; CComPtr m_piGraphBuilder; CComPtr m_piMediaControl; Mpeg2DataParser m_mpeg2parser; BDACardCollection cardList; BDACard *m_pBDACard; DWORD m_dwAdviseCookie; DWORD m_rotEntry; ULONG m_ulRef; BOOL m_bServiceChanged; BOOL m_bProgramChanged; BOOL m_bScheduleEntryChanged; HANDLE m_hGuideDataChangedEvent; HANDLE m_hServiceChangedMutex; BOOL m_bScanning; BOOL m_bVerbose; long m_freq[256]; long m_band[256]; long m_Count; }; #endif