You can subscribe to this list here.
2003 |
Jan
|
Feb
(49) |
Mar
(6) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|
From: <ad...@us...> - 2003-02-24 17:01:50
|
Update of /cvsroot/bdadev/CleverTelly In directory sc8-pr-cvs1:/tmp/cvs-serv14688 Modified Files: CleverTelly.cpp CleverTelly.dsp CleverTelly.dsw CleverTelly.idl CleverTelly.rc MSVidCtlComp.cpp MSVidCtlComp.h StdAfx.cpp StdAfx.h resource.h Added Files: MainDlg.cpp MainDlg.h Log Message: Migrated to WTL and stopped using composite control for hosting --- NEW FILE: MainDlg.cpp --- // maindlg.cpp : implementation of the CMainDlg class // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "resource.h" #include "maindlg.h" _ATL_FUNC_INFO OnClickInfo = {CC_STDCALL, VT_EMPTY, 0}; _ATL_FUNC_INFO OnDblClickInfo = {CC_STDCALL, VT_EMPTY, 0}; _ATL_FUNC_INFO OnErrorInfo = {CC_STDCALL, VT_EMPTY, 7, {VT_I2, VT_PTR, VT_I4, VT_BSTR, VT_BSTR, VT_I4, VT_PTR} }; _ATL_FUNC_INFO OnKeyDownInfo = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR, VT_I2} }; _ATL_FUNC_INFO OnKeyPressInfo = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR} }; _ATL_FUNC_INFO OnKeyUpInfo = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR, VT_I2} }; _ATL_FUNC_INFO OnMouseDownInfo = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; _ATL_FUNC_INFO OnMouseMoveInfo = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; _ATL_FUNC_INFO OnMouseUpInfo = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; _ATL_FUNC_INFO OnStateChangeInfo = {CC_STDCALL, VT_EMPTY, 2, { VT_I4, VT_I4} }; ///////////////////////////////////////////////////////////////////////////// // CMainDlg LRESULT CMainDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { // center the dialog on the screen CenterWindow(); // set icons HICON hIcon = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR); SetIcon(hIcon, TRUE); HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR); SetIcon(hIconSmall, FALSE); HRESULT Result = GetDlgControl(IDC_MSVIDCTL, __uuidof(IMSVidCtl), reinterpret_cast<void **>(&m_pVidControl)); if(FAILED(Result)) { ATLTRACE("GetDlgControl Returned %8x\n", Result); return FALSE; } Result = CreateTuneReqStore(); if(FAILED(Result)) { ATLTRACE("CreateTuneReqStore Returned %8x\n", Result); return FALSE; } Result = LoadUpDefaultTuneRequest(); if(FAILED(Result)) { ATLTRACE("LoadUpDefaultTuneRequest Returned %8x\n", Result); return FALSE; } return TRUE; } LRESULT CMainDlg::OnAppAbout(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { CSimpleDialog<IDD_ABOUTBOX, FALSE> dlg; dlg.DoModal(); return 0; } LRESULT CMainDlg::OnClose(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { m_pVidControl.Release(); CComBSTR Name(L"C:\\Channels.xml"); m_TuneRequestStore->Save(Name); m_TuneRequestStore.Release(); EndDialog(wID); return 0; } void CMainDlg::ResizeVideoControl() { RECT WinRect; CWindow hwndVC(GetDlgItem(IDC_MSVIDCTL)); GetWindowRect(&WinRect); ScreenToClient(&WinRect); hwndVC.MoveWindow(&WinRect, TRUE); } LRESULT CMainDlg::OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { bHandled = FALSE; // always do default processing if (wParam == SC_CLOSE) { OnClose(NULL, NULL, NULL, bHandled); } return 0; } LRESULT CMainDlg::OnMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { // always do default processing bHandled = FALSE; return 0; } LRESULT CMainDlg::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { // always do default processing bHandled = TRUE; switch(wParam) { case SIZE_MAXIMIZED: ResizeVideoControl(); ShowWindow(SW_SHOW); break; case SIZE_MINIMIZED: CloseWindow(m_hWnd); break; case SIZE_RESTORED: ShowWindow(SW_SHOW); ResizeVideoControl(); break; default: ResizeVideoControl(); break; } return 0; } void __stdcall CMainDlg::OnClick() { ATLTRACE("OnClick\n"); } void __stdcall CMainDlg::OnStateChange(MSVidCtlStateList PrevState, MSVidCtlStateList CurrState) { } void __stdcall CMainDlg::OnDblClick() { } void __stdcall CMainDlg::OnError(short Number, BSTR* pDescription, long Scode, BSTR Source, BSTR HelpFile, long HelpContext, boolean* pCancelDisplay) { ATLTRACE("OnError %04x\n", Number); } void __stdcall CMainDlg::OnKeyDown(short* pKeyCode, short Shift) { } void __stdcall CMainDlg::OnKeyPress(short* pKeyCode) { ATLTRACE("OnKeyPress %04x\n", *pKeyCode); } void __stdcall CMainDlg::OnKeyUp(short* pKeyCode, short Shift) { } void __stdcall CMainDlg::OnMouseDown(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } void __stdcall CMainDlg::OnMouseMove(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } void __stdcall CMainDlg::OnMouseUp(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } STDMETHODIMP CMainDlg::OverlayUnavailable() { ATLTRACE("OverlayUnavailable\n"); return S_OK; } STDMETHODIMP CMainDlg::TuneChanged(IMSVidTuner* plpd) { ATLTRACE("TuneChanged\n"); return S_OK; } STDMETHODIMP CMainDlg::CertificateFailure() { ATLTRACE("CertificateFailure\n"); return S_OK; } STDMETHODIMP CMainDlg::CertificateSuccess() { ATLTRACE("CertificateSuccess\n"); return S_OK; } STDMETHODIMP CMainDlg::RatingsBlocked() { ATLTRACE("RatingsBlocked\n"); return S_OK; } STDMETHODIMP CMainDlg::RatingsUnblocked() { ATLTRACE("RatingsUnblocked\n"); return S_OK; } STDMETHODIMP CMainDlg::RatingsChanged() { ATLTRACE("RatingsChanged\n"); return S_OK; } STDMETHODIMP CMainDlg::TimeHole(long StreamOffsetMS, long SizeMS) { ATLTRACE("TimeHole\n"); return S_OK; } STDMETHODIMP CMainDlg::StaleDataRead() { ATLTRACE("StaleDataRead\n"); return S_OK; } STDMETHODIMP CMainDlg::ContentBecomingStale() { ATLTRACE("ContentBecomingStale\n"); return S_OK; } STDMETHODIMP CMainDlg::StaleFileDeleted() { ATLTRACE("StaleFileDeleted\n"); return S_OK; } STDMETHODIMP CMainDlg::EndOfMedia(IMSVidPlayback* lpd) { ATLTRACE("EndOfMedia\n"); return S_OK; } STDMETHODIMP CMainDlg::StateChange(IMSVidDevice* plpd, long oldState, long newState) { HRESULT Result = S_OK; if(newState == STATE_PLAY) { Result = m_TuneRequestStore->AttachToVideoControl(m_pVidControl); } else if(newState == STATE_UNBUILT) { Result = m_TuneRequestStore->DetachFromTIF(); } return Result; } STDMETHODIMP CMainDlg::WriteFailure() { ATLTRACE("WriteFailure\n"); return S_OK; } HRESULT CMainDlg::LoadUpDefaultTuneRequest() { return S_OK; } HRESULT CMainDlg::CreateTuneReqStore() { HRESULT Result = m_TuneRequestStore.CreateInstance(__uuidof(TUNEREQSTORELib::TuneRequestStore)); if (SUCCEEDED(Result)) { CComBSTR FileName(L"C:\\Channels.xml"); Result = m_TuneRequestStore->Load(FileName); SysFreeString(FileName); } } --- NEW FILE: MainDlg.h --- // maindlg.h : interface of the CMainDlg class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_MAINDLG_H__CCE886BB_480B_11D7_B841_0002A5623377__INCLUDED_) #define AFX_MAINDLG_H__CCE886BB_480B_11D7_B841_0002A5623377__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #include "CleverTelly.h" extern _ATL_FUNC_INFO OnClickInfo; extern _ATL_FUNC_INFO OnDblClickInfo; extern _ATL_FUNC_INFO OnErrorInfo; extern _ATL_FUNC_INFO OnKeyDownInfo; extern _ATL_FUNC_INFO OnKeyPressInfo; extern _ATL_FUNC_INFO OnKeyUpInfo; extern _ATL_FUNC_INFO OnMouseDownInfo; extern _ATL_FUNC_INFO OnMouseMoveInfo; extern _ATL_FUNC_INFO OnMouseUpInfo; extern _ATL_FUNC_INFO OnStateChangeInfo; class CMainDlg : public CAxDialogImpl<CMainDlg>, public CComObjectRootEx<CComSingleThreadModel>, public IDispatchImpl<IApplication, &IID_IApplication, &LIBID_CLEVERTELLYLib>, public IProvideClassInfo2Impl<&CLSID_Application, NULL, &LIBID_CLEVERTELLYLib>, public IDispEventSimpleImpl<IDC_MSVIDCTL, CMainDlg, &__uuidof(_IMSVidCtlEvents)>, public CComCoClass<CMainDlg, &CLSID_Application>, public IDispatchImpl<IMSVidStreamBufferSinkEvent, &__uuidof(IMSVidStreamBufferSinkEvent), &LIBID_MSVidCtlLib, 1 , 0>, public IDispatchImpl<IMSVidStreamBufferSourceEvent, &__uuidof(IMSVidStreamBufferSourceEvent), &LIBID_MSVidCtlLib, 1, 0>, public IDispatchImpl<IMSVidTunerEvent, &__uuidof(IMSVidTunerEvent), &LIBID_MSVidCtlLib, 1, 0>, public IDispatchImpl<IMSVidVideoRendererEvent, &__uuidof(IMSVidVideoRendererEvent), &LIBID_MSVidCtlLib, 1, 0> { public: enum { IDD = IDD_MAINDLG }; DECLARE_REGISTRY_RESOURCEID(IDR_CleverTellyReg) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CMainDlg) COM_INTERFACE_ENTRY(IApplication) COM_INTERFACE_ENTRY2(IDispatch, IApplication) COM_INTERFACE_ENTRY(IProvideClassInfo) COM_INTERFACE_ENTRY(IProvideClassInfo2) COM_INTERFACE_ENTRY(IMSVidStreamBufferSinkEvent) COM_INTERFACE_ENTRY(IMSVidStreamBufferSourceEvent) COM_INTERFACE_ENTRY(IMSVidTunerEvent) COM_INTERFACE_ENTRY(IMSVidVideoRendererEvent) END_COM_MAP() BEGIN_MSG_MAP(CMainDlg) MESSAGE_HANDLER(WM_SYSCOMMAND, OnSysCommand) MESSAGE_HANDLER(WM_MOVE, OnMove) MESSAGE_HANDLER(WM_SIZE, OnSize) COMMAND_ID_HANDLER(WM_CLOSE, OnClose) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) COMMAND_ID_HANDLER(IDM_ABOUT, OnAppAbout) COMMAND_ID_HANDLER(IDOK, OnClose) COMMAND_ID_HANDLER(IDCANCEL, OnClose) END_MSG_MAP() BEGIN_SINK_MAP(CMainDlg) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_CLICK, OnClick, &OnClickInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_DBLCLICK, OnDblClick, &OnDblClickInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_ERROREVENT, OnError, &OnErrorInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_KEYDOWN, OnKeyDown, &OnKeyDownInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_KEYPRESS, OnKeyPress, &OnKeyPressInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_KEYUP, OnKeyUp, &OnKeyUpInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEDOWN, OnMouseDown, &OnMouseDownInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEMOVE, OnMouseMove, &OnMouseMoveInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEUP, OnMouseUp, &OnMouseUpInfo) SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), dispidStateChange, OnStateChange, &OnStateChangeInfo) END_SINK_MAP() LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/); LRESULT OnAppAbout(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); LRESULT OnClose(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); // IMSVidCtlComp public: // IMSVidVideoRendererEvent STDMETHOD(OverlayUnavailable)(); // IMSVidTunerEven STDMETHOD(TuneChanged)(IMSVidTuner* plpd); // IMSVidStreamBufferSourceEvent STDMETHOD(CertificateFailure)(); STDMETHOD(CertificateSuccess)(); STDMETHOD(RatingsBlocked)(); STDMETHOD(RatingsUnblocked)(); STDMETHOD(RatingsChanged)(); STDMETHOD(TimeHole)(long StreamOffsetMS, long SizeMS); STDMETHOD(StaleDataRead)(); STDMETHOD(ContentBecomingStale)(); STDMETHOD(StaleFileDeleted)(); // IMSVidPlaybackEvent STDMETHOD(EndOfMedia)(IMSVidPlayback* lpd); // IMSVidDeviceEvent STDMETHOD(StateChange)(IMSVidDevice* plpd, long oldState, long newState); // IMSVidStreamBufferSinkEvent STDMETHOD(WriteFailure)(); private: void ResizeVideoControl(); void __stdcall OnClick(); void __stdcall OnDblClick(); void __stdcall OnError(short Number, BSTR* pDescription, long Scode, BSTR Source, BSTR HelpFile, long HelpContext, boolean* pCancelDisplay); void __stdcall OnKeyDown(short* pKeyCode, short Shift); void __stdcall OnKeyPress(short* pKeyCode); void __stdcall OnKeyUp(short* pKeyCode, short Shift); void __stdcall OnMouseDown(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y); void __stdcall OnMouseMove(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y); void __stdcall OnMouseUp(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y); void __stdcall OnStateChange(MSVidCtlStateList PrevState, MSVidCtlStateList CurrState); HRESULT LoadUpDefaultTuneRequest(); HRESULT CreateTuneReqStore(); private: CComQIPtr<IMSVidCtl> m_pVidControl; TUNEREQSTORELib::ITuneRequestStorePtr m_TuneRequestStore; }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MAINDLG_H__CCE886BB_480B_11D7_B841_0002A5623377__INCLUDED_) Index: CleverTelly.cpp =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CleverTelly.cpp 13 Feb 2003 17:26:44 -0000 1.3 --- CleverTelly.cpp 24 Feb 2003 17:01:31 -0000 1.4 *************** *** 1,35 **** ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // CleverTelly - BDA DVB TV Application ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 // - ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "resource.h" #include <initguid.h> #include "CleverTelly.h" #include "CleverTelly_i.c" - #include "MSVidCtlComp.h" BEGIN_OBJECT_MAP(ObjectMap) ! OBJECT_ENTRY(CLSID_MSVidCtlComp, CMSVidCtlComp) END_OBJECT_MAP() LPCTSTR FindOneOf(LPCTSTR p1, LPCTSTR p2) { --- 1,23 ---- ! // CleverTelly.cpp : main source file for CleverTelly.exe // #include "stdafx.h" + #include "resource.h" + + #include "maindlg.h" + #include <initguid.h> #include "CleverTelly.h" #include "CleverTelly_i.c" BEGIN_OBJECT_MAP(ObjectMap) ! OBJECT_ENTRY(CLSID_Application, CMainDlg) END_OBJECT_MAP() + CAppModule _Module; + LPCTSTR FindOneOf(LPCTSTR p1, LPCTSTR p2) { *************** *** 47,180 **** return NULL; } - void CreateNewClass() - { - WNDCLASSEX wc; - - EnterCriticalSection(&_Module.m_csWindowCreate); - wc.cbSize = sizeof(WNDCLASSEX); - wc.style = 0; - - wc.lpfnWndProc = AtlAxWindowProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = _Module.GetModuleInstance(); - wc.hIcon = LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY)); - wc.hCursor = ::LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wc.lpszMenuName = NULL; - wc.lpszClassName = CAxWindow::GetWndClassName(); - wc.hIconSm = LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY)); - ::RegisterClassEx(&wc); - - LeaveCriticalSection(&_Module.m_csWindowCreate); - } ! ///////////////////////////////////////////////////////////////////////////// ! // ! extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, ! HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int /*nShowCmd*/) { ! lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT ! ! #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) ! HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED); ! #else ! HRESULT hRes = CoInitialize(NULL); ! #endif ! ! _ASSERTE(SUCCEEDED(hRes)); ! _Module.Init(ObjectMap, hInstance, &LIBID_CLEVERTELLYLib); ! _Module.dwThreadID = GetCurrentThreadId(); ! TCHAR szTokens[] = _T("-/"); ! ! int nRet = 0; ! BOOL bRun = TRUE; ! LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens); ! while (lpszToken != NULL) ! { ! if (lstrcmpi(lpszToken, _T("UnregServer"))==0) ! { ! _Module.UpdateRegistryFromResource(IDR_CleverTelly, FALSE); ! nRet = _Module.UnregisterServer(TRUE); ! bRun = FALSE; ! break; ! } ! if (lstrcmpi(lpszToken, _T("RegServer"))==0) ! { ! _Module.UpdateRegistryFromResource(IDR_CleverTelly, TRUE); ! nRet = _Module.RegisterServer(TRUE); ! bRun = FALSE; ! break; ! } ! lpszToken = FindOneOf(lpszToken, szTokens); ! } ! ! if (bRun) ! { ! _Module.StartMonitor(); ! ! #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) ! hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); ! _ASSERTE(SUCCEEDED(hRes)); ! hRes = CoResumeClassObjects(); ! #else ! hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE); ! #endif ! ! _ASSERTE(SUCCEEDED(hRes)); ! ! CreateNewClass(); ! AtlAxWinInit(); ! HWND hWnd = ::CreateWindow( ! TEXT("AtlAxWin"), ! TEXT("CleverTelly.MSVidCtlComp"), ! WS_POPUP, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! NULL, ! NULL, ! ::GetModuleHandle(NULL), ! NULL ! ); ! ::SetWindowText(hWnd, TEXT("CleverTelly")); ! ::ShowWindow(hWnd, SW_SHOW); ! MSG msg; ! while (GetMessage(&msg, 0, 0, 0)) ! { ! TranslateMessage(&msg); ! DispatchMessage(&msg); ! } ! _Module.RevokeClassObjects(); ! Sleep(CExeModule::dwPause); //wait for any threads to finish ! } ! _Module.Term(); ! // close the log file ! LOG(0, NULL); ! CoUninitialize(); ! return nRet; } - - ///////////////////////////////////////////////////////////////////////////// - // CVS Log - // - // $Log$ - // Revision 1.3 2003/02/13 17:26:44 adcockj - // Interim Checkin starting to add some basic functionality - // - // Revision 1.2 2003/02/13 10:50:17 adcockj - // Split out Module stuff and tidy up auto generated ATL code - // - // Revision 1.1.1.1 2003/02/13 10:19:07 adcockj - // Initial Import - // - ///////////////////////////////////////////////////////////////////////////// --- 35,69 ---- return NULL; } ! int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow) { ! HRESULT hRes = ::CoInitialize(NULL); ! // If you are running on NT 4.0 or higher you can use the following call instead to ! // make the EXE free threaded. This means that calls come in on a random RPC thread. ! // HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); ! ATLASSERT(SUCCEEDED(hRes)); ! // this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used ! ::DefWindowProc(NULL, 0, 0, 0L); ! AtlInitCommonControls(ICC_COOL_CLASSES | ICC_BAR_CLASSES); // add flags to support other controls ! hRes = _Module.Init(NULL, hInstance); ! ATLASSERT(SUCCEEDED(hRes)); ! AtlAxWinInit(); ! int nRet = 0; ! // BLOCK: Run application ! { ! CComObject<CMainDlg>* pApplication = new CComObject<CMainDlg>; ! nRet = pApplication->DoModal(); ! delete pApplication; ! } ! _Module.Term(); ! ::CoUninitialize(); ! return nRet; } Index: CleverTelly.dsp =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CleverTelly.dsp 13 Feb 2003 17:26:44 -0000 1.2 --- CleverTelly.dsp 24 Feb 2003 17:01:32 -0000 1.3 *************** *** 34,40 **** # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "CleverTelly___Win32_Release" ! # PROP BASE Intermediate_Dir "CleverTelly___Win32_Release" ! # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 --- 34,39 ---- # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Release" ! # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 *************** *** 44,49 **** # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c ! # ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" --- 43,50 ---- # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c ! # ADD CPP /nologo /MT /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" *************** *** 52,75 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /subsystem:windows /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib winmm.lib /nologo /subsystem:windows /machine:I386 ! # Begin Custom Build - Performing registration ! OutDir=.\Release ! TargetPath=.\Release\CleverTelly.exe ! InputPath=.\Release\CleverTelly.exe ! SOURCE="$(InputPath)" ! ! "$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! if "%OS%"=="" goto NOTNT ! if not "%OS%"=="Windows_NT" goto NOTNT ! "$(TargetPath)" /RegServer ! echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" ! echo Server registration done! ! goto end ! :NOTNT ! echo Warning : Cannot register Unicode EXE on Windows 95 ! :end ! ! # End Custom Build !ELSEIF "$(CFG)" == "CleverTelly - Win32 Debug" --- 53,58 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 ! # ADD LINK32 striids.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "CleverTelly - Win32 Debug" *************** *** 77,83 **** # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "CleverTelly___Win32_Debug" ! # PROP BASE Intermediate_Dir "CleverTelly___Win32_Debug" ! # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 --- 60,65 ---- # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Debug" ! # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 *************** *** 87,92 **** # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c ! # ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" --- 69,76 ---- # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c ! # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Yu"stdafx.h" /FD /GZ /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" *************** *** 95,118 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib winmm.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept ! # Begin Custom Build - Performing registration ! OutDir=.\Debug ! TargetPath=.\Debug\CleverTelly.exe ! InputPath=.\Debug\CleverTelly.exe ! SOURCE="$(InputPath)" ! ! "$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! if "%OS%"=="" goto NOTNT ! if not "%OS%"=="Windows_NT" goto NOTNT ! "$(TargetPath)" /RegServer ! echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" ! echo Server registration done! ! goto end ! :NOTNT ! echo Warning : Cannot register Unicode EXE on Windows 95 ! :end ! ! # End Custom Build !ENDIF --- 79,84 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF *************** *** 132,137 **** SOURCE=.\CleverTelly.idl ! # ADD BASE MTL /tlb ".\CleverTelly.tlb" /h "CleverTelly.h" /iid "CleverTelly_i.c" /Oicf ! # ADD MTL /tlb ".\CleverTelly.tlb" /h "CleverTelly.h" /iid "CleverTelly_i.c" /Oicf # End Source File # Begin Source File --- 98,102 ---- SOURCE=.\CleverTelly.idl ! # SUBTRACT MTL /mktyplib203 # End Source File # Begin Source File *************** *** 141,158 **** # Begin Source File ! SOURCE=.\DebugLog.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\Module.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\MSVidCtlComp.cpp # End Source File # Begin Source File ! SOURCE=.\StdAfx.cpp ! # ADD BASE CPP /Yc"stdafx.h" # ADD CPP /Yc"stdafx.h" # End Source File --- 106,114 ---- # Begin Source File ! SOURCE=.\maindlg.cpp # End Source File # Begin Source File ! SOURCE=.\stdafx.cpp # ADD CPP /Yc"stdafx.h" # End Source File *************** *** 163,183 **** # Begin Source File ! SOURCE=.\DebugLog.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\Module.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\MSVidCtlComp.h # End Source File # Begin Source File ! SOURCE=.\Resource.h # End Source File # Begin Source File ! SOURCE=.\StdAfx.h # End Source File # End Group --- 119,131 ---- # Begin Source File ! SOURCE=.\maindlg.h # End Source File # Begin Source File ! SOURCE=.\resource.h # End Source File # Begin Source File ! SOURCE=.\stdafx.h # End Source File # End Group *************** *** 187,210 **** # Begin Source File ! SOURCE=.\cleverte.ico ! # End Source File ! # Begin Source File ! ! SOURCE=.\CleverTelly.rgs ! # End Source File ! # Begin Source File ! ! SOURCE=.\msvidctl.bmp # End Source File # Begin Source File ! SOURCE=.\MSVidCtlComp.rgs # End Source File # End Group # End Target # End Project - # Section CleverTelly : {00000000-0000-0000-0000-800000800000} - # 1:16:IDR_MSVIDCTLCOMP:102 - # 1:16:IDB_MSVIDCTLCOMP:101 - # 1:16:IDD_MSVIDCTLCOMP:103 - # End Section --- 135,145 ---- # Begin Source File ! SOURCE=.\res\CleverTelly.exe.manifest # End Source File # Begin Source File ! SOURCE=.\res\CleverTelly.ico # End Source File # End Group # End Target # End Project Index: CleverTelly.dsw =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.dsw,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CleverTelly.dsw 13 Feb 2003 10:19:07 -0000 1.1.1.1 --- CleverTelly.dsw 24 Feb 2003 17:01:33 -0000 1.2 *************** *** 12,15 **** --- 12,30 ---- Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name TuneReqStore + End Project Dependency + }}} + + ############################################################################### + + Project: "TuneReqStore"=..\TuneReqStore\TuneReqStore.dsp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ }}} Index: CleverTelly.idl =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.idl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CleverTelly.idl 13 Feb 2003 10:19:07 -0000 1.1.1.1 --- CleverTelly.idl 24 Feb 2003 17:01:33 -0000 1.2 *************** *** 28,35 **** uuid(F987AE23-B86A-4FC0-BAE9-D553BE70C7B9), dual, ! helpstring("IMSVidCtlComp Interface"), pointer_default(unique) ] ! interface IMSVidCtlComp : IDispatch { }; --- 28,35 ---- uuid(F987AE23-B86A-4FC0-BAE9-D553BE70C7B9), dual, ! helpstring("IApplication Interface"), pointer_default(unique) ] ! interface IApplication : IDispatch { }; *************** *** 47,55 **** [ uuid(705B1406-73E0-46DF-BF76-7D1496AD33A3), ! helpstring("MSVidCtlComp Class") ] ! coclass MSVidCtlComp { ! [default] interface IMSVidCtlComp; }; }; --- 47,55 ---- [ uuid(705B1406-73E0-46DF-BF76-7D1496AD33A3), ! helpstring("Application Class") ] ! coclass Application { ! [default] interface IApplication; }; }; *************** *** 59,62 **** --- 59,65 ---- // // $Log$ + // Revision 1.2 2003/02/24 17:01:33 adcockj + // Migrated to WTL and stopped using composite control for hosting + // // Revision 1.1.1.1 2003/02/13 10:19:07 adcockj // Initial Import Index: CleverTelly.rc =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CleverTelly.rc 13 Feb 2003 17:26:45 -0000 1.2 --- CleverTelly.rc 24 Feb 2003 17:01:35 -0000 1.3 *************** *** 8,12 **** // Generated from the TEXTINCLUDE 2 resource. // ! #include "winres.h" ///////////////////////////////////////////////////////////////////////////// --- 8,12 ---- // Generated from the TEXTINCLUDE 2 resource. // ! #include "atlres.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 35,39 **** 2 TEXTINCLUDE DISCARDABLE BEGIN ! "#include ""winres.h""\r\n" "\0" END --- 35,39 ---- 2 TEXTINCLUDE DISCARDABLE BEGIN ! "#include ""atlres.h""\r\n" "\0" END *************** *** 41,45 **** 3 TEXTINCLUDE DISCARDABLE BEGIN ! "1 TYPELIB ""CleverTelly.tlb""\r\n" "\0" END --- 41,45 ---- 3 TEXTINCLUDE DISCARDABLE BEGIN ! "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""res\\\\CleverTelly.exe.manifest""\r\n" "\0" END *************** *** 47,50 **** --- 47,150 ---- #endif // APSTUDIO_INVOKED + ///////////////////////////////////////////////////////////////////////////// + // + // REGISTRY + // + + IDR_CleverTellyReg REGISTRY DISCARDABLE "CleverTelly.rgs" + + ///////////////////////////////////////////////////////////////////////////// + // + // Icon + // + + // Icon with lowest ID value placed first to ensure application icon + // remains consistent on all systems. + IDR_MAINFRAME ICON DISCARDABLE "res\\CleverTelly.ico" + + ///////////////////////////////////////////////////////////////////////////// + // + // Dialog + // + + IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 187, 102 + STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "About" + FONT 8, "MS Sans Serif" + BEGIN + DEFPUSHBUTTON "OK",IDOK,130,81,50,14 + CTEXT "CleverTelly Application v1.0\n\n(c) Copyright 2003", + IDC_STATIC,25,57,78,32 + ICON IDR_MAINFRAME,IDC_STATIC,55,26,18,20 + GROUPBOX "",IDC_STATIC,7,7,115,88 + END + + IDD_MAINDLG DIALOGEX 0, 0, 239, 206 + STYLE DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU | WS_THICKFRAME + EXSTYLE WS_EX_CONTROLPARENT + CAPTION "CleverTelly" + FONT 8, "MS Sans Serif" + BEGIN + CONTROL "",IDC_MSVIDCTL,"{B0EDF163-910A-11D2-B632-00C04F79498E}", + WS_TABSTOP,0,0,238,206 + END + + + ///////////////////////////////////////////////////////////////////////////// + // + // Dialog Info + // + + IDD_MAINDLG DLGINIT + BEGIN + IDC_MSVIDCTL, 0x376, 34, 0 + 0x0000, 0x0000, 0x0300, 0x0000, 0x3de9, 0x0000, 0x3270, 0x0000, 0x000b, + 0xffff, 0x000b, 0xffff, 0x000b, 0x0000, 0x0013, 0x0000, 0x0000, + END + + + ///////////////////////////////////////////////////////////////////////////// + // + // DESIGNINFO + // + + #ifdef APSTUDIO_INVOKED + GUIDELINES DESIGNINFO DISCARDABLE + BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 180 + TOPMARGIN, 7 + BOTTOMMARGIN, 95 + END + END + #endif // APSTUDIO_INVOKED + + + ///////////////////////////////////////////////////////////////////////////// + // + // Accelerator + // + + IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE + BEGIN + "N", ID_FILE_NEW, VIRTKEY, CONTROL + "O", ID_FILE_OPEN, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, VIRTKEY, CONTROL + "P", ID_FILE_PRINT, VIRTKEY, CONTROL + "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL + "X", ID_EDIT_CUT, VIRTKEY, CONTROL + "C", ID_EDIT_COPY, VIRTKEY, CONTROL + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL + VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT + VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT + VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL + VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT + VK_F6, ID_NEXT_PANE, VIRTKEY + VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT + END + #ifndef _MAC *************** *** 64,68 **** #endif FILEOS 0x4L ! FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN --- 164,168 ---- #endif FILEOS 0x4L ! FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN *************** *** 72,83 **** BEGIN VALUE "CompanyName", "\0" ! VALUE "FileDescription", "CleverTelly Module\0" VALUE "FileVersion", "1, 0, 0, 1\0" ! VALUE "InternalName", "CleverTelly\0" VALUE "LegalCopyright", "Copyright 2003\0" ! VALUE "OriginalFilename", "CleverTelly.EXE\0" VALUE "ProductName", "CleverTelly Module\0" VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "OLESelfRegister", "\0" END END --- 172,182 ---- BEGIN VALUE "CompanyName", "\0" ! VALUE "FileDescription", "test1 Module\0" VALUE "FileVersion", "1, 0, 0, 1\0" ! VALUE "InternalName", "TEST1\0" VALUE "LegalCopyright", "Copyright 2003\0" ! VALUE "OriginalFilename", "CleverTelly.exe\0" VALUE "ProductName", "CleverTelly Module\0" VALUE "ProductVersion", "1, 0, 0, 1\0" END END *************** *** 93,109 **** ///////////////////////////////////////////////////////////////////////////// // ! // REGISTRY // ! IDR_CleverTelly REGISTRY MOVEABLE PURE "CleverTelly.rgs" ! ///////////////////////////////////////////////////////////////////////////// ! // ! // String Table ! // STRINGTABLE DISCARDABLE BEGIN ! IDS_PROJNAME "CleverTelly" END --- 192,285 ---- ///////////////////////////////////////////////////////////////////////////// // ! // String Table // ! STRINGTABLE PRELOAD DISCARDABLE ! BEGIN ! IDR_MAINFRAME "CleverTelly" ! END ! STRINGTABLE DISCARDABLE ! BEGIN ! ID_FILE_NEW "Create a new document\nNew" ! ID_FILE_OPEN "Open an existing document\nOpen" ! ID_FILE_CLOSE "Close the active document\nClose" ! ID_FILE_SAVE "Save the active document\nSave" ! ID_FILE_SAVE_AS "Save the active document with a new name\nSave As" ! ID_FILE_PAGE_SETUP "Change the printing options\nPage Setup" ! ID_FILE_PRINT_SETUP "Change the printer and printing options\nPrint Setup" ! ID_FILE_PRINT "Print the active document\nPrint" ! ID_FILE_PRINT_PREVIEW "Display full pages\nPrint Preview" ! END STRINGTABLE DISCARDABLE BEGIN ! ID_APP_ABOUT "Display program information, version number and copyright\nAbout" ! ID_APP_EXIT "Quit the application; prompts to save documents\nExit" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ID_NEXT_PANE "Switch to the next window pane\nNext Pane" ! ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ID_WINDOW_NEW "Open another window for the active document\nNew Window" ! ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" ! ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade Windows" ! ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile Windows" ! ID_WINDOW_TILE_VERT "Arrange windows as non-overlapping tiles\nTile Windows" ! ID_WINDOW_SPLIT "Split the active window into panes\nSplit" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ID_EDIT_CLEAR "Erase the selection\nErase" ! ID_EDIT_CLEAR_ALL "Erase everything\nErase All" ! ID_EDIT_COPY "Copy the selection and put it on the Clipboard\nCopy" ! ID_EDIT_CUT "Cut the selection and put it on the Clipboard\nCut" ! ID_EDIT_FIND "Find the specified text\nFind" ! ID_EDIT_PASTE "Insert Clipboard contents\nPaste" ! ID_EDIT_REPEAT "Repeat the last action\nRepeat" ! ID_EDIT_REPLACE "Replace specific text with different text\nReplace" ! ID_EDIT_SELECT_ALL "Select the entire document\nSelect All" ! ID_EDIT_UNDO "Undo the last action\nUndo" ! ID_EDIT_REDO "Redo the previously undone action\nRedo" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" ! ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ATL_IDS_SCSIZE "Change the window size" ! ATL_IDS_SCMOVE "Change the window position" ! ATL_IDS_SCMINIMIZE "Reduce the window to an icon" ! ATL_IDS_SCMAXIMIZE "Enlarge the window to full size" ! ATL_IDS_SCNEXTWINDOW "Switch to the next document window" ! ATL_IDS_SCPREVWINDOW "Switch to the previous document window" ! ATL_IDS_SCCLOSE "Close the active window and prompts to save the documents" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ATL_IDS_SCRESTORE "Restore the window to normal size" ! ATL_IDS_SCTASKLIST "Activate Task List" ! ATL_IDS_MDICHILD "Activate this window" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ATL_IDS_IDLEMESSAGE "Ready" ! END ! ! STRINGTABLE DISCARDABLE ! BEGIN ! ATL_IDS_MRU_FILE "Open this document" END *************** *** 123,182 **** ///////////////////////////////////////////////////////////////////////////// // ! // REGISTRY ! // ! ! IDR_MSVIDCTLCOMP REGISTRY DISCARDABLE "MSVidCtlComp.rgs" ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Bitmap ! // ! ! IDB_MSVIDCTLCOMP BITMAP DISCARDABLE "msvidctl.bmp" ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Dialog ! // ! ! IDD_MSVIDCTLCOMP DIALOGEX 0, 0, 239, 206 ! STYLE DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE | WS_CAPTION | ! WS_SYSMENU | WS_THICKFRAME ! EXSTYLE WS_EX_CONTROLPARENT ! CAPTION "CleverTelly" ! FONT 8, "MS Sans Serif" ! BEGIN ! CONTROL "",IDC_MSVIDCTL1,"{B0EDF163-910A-11D2-B632-00C04F79498E}", ! WS_TABSTOP,0,0,238,206 ! CONTROL "",IDC_MSVIDCTL2,"{B0EDF163-910A-11D2-B632-00C04F79498E}", ! NOT WS_VISIBLE | WS_TABSTOP,13,12,128,118 ! END ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Dialog Info // ! IDD_MSVIDCTLCOMP DLGINIT BEGIN ! IDC_MSVIDCTL1, 0x376, 34, 0 ! 0x0000, 0x0000, 0x0300, 0x0000, 0x3de9, 0x0000, 0x3270, 0x0000, 0x000b, ! 0xffff, 0x000b, 0xffff, 0x000b, 0x0000, 0x0013, 0x0000, 0x0000, ! IDC_MSVIDCTL2, 0x376, 34, 0 ! 0x0000, 0x0000, 0x0300, 0x0000, 0x13d8, 0x0000, 0x13d8, 0x0000, 0x000b, ! 0x0000, 0x000b, 0x0000, 0x000b, 0x0000, 0x0013, 0x0000, 0x0000, ! 0 END - - ///////////////////////////////////////////////////////////////////////////// - // - // Icon - // - - // Icon with lowest ID value placed first to ensure application icon - // remains consistent on all systems. - IDI_CLEVERTELLY ICON DISCARDABLE "cleverte.ico" #endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// --- 299,313 ---- ///////////////////////////////////////////////////////////////////////////// // ! // Menu // ! IDR_CLEVERTELLY MENU DISCARDABLE BEGIN ! POPUP "Help" ! BEGIN ! MENUITEM "About ...", IDM_ABOUT ! END END #endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// *************** *** 189,193 **** // Generated from the TEXTINCLUDE 3 resource. // ! 1 TYPELIB "CleverTelly.tlb" ///////////////////////////////////////////////////////////////////////////// --- 320,324 ---- // Generated from the TEXTINCLUDE 3 resource. // ! CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "res\\CleverTelly.exe.manifest" ///////////////////////////////////////////////////////////////////////////// Index: MSVidCtlComp.cpp =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/MSVidCtlComp.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MSVidCtlComp.cpp 13 Feb 2003 17:26:46 -0000 1.3 --- MSVidCtlComp.cpp 24 Feb 2003 17:01:35 -0000 1.4 *************** *** 26,36 **** _ATL_FUNC_INFO OnClickInfo = {CC_STDCALL, VT_EMPTY, 0}; _ATL_FUNC_INFO OnDblClickInfo = {CC_STDCALL, VT_EMPTY, 0}; ! _ATL_FUNC_INFO OnError = {CC_STDCALL, VT_EMPTY, 7, {VT_I2, VT_PTR, VT_I4, VT_BSTR, VT_BSTR, VT_I4, VT_PTR} }; ! _ATL_FUNC_INFO OnKeyDown = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR, VT_I2} }; ! _ATL_FUNC_INFO OnKeyPress = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR} }; ! _ATL_FUNC_INFO OnKeyUp = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR, VT_I2} }; ! _ATL_FUNC_INFO OnMouseDown = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; ! _ATL_FUNC_INFO OnMouseMove = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; ! _ATL_FUNC_INFO OnMouseUp = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; _ATL_FUNC_INFO OnStateChangeInfo = {CC_STDCALL, VT_EMPTY, 2, { VT_I4, VT_I4} }; --- 26,36 ---- _ATL_FUNC_INFO OnClickInfo = {CC_STDCALL, VT_EMPTY, 0}; _ATL_FUNC_INFO OnDblClickInfo = {CC_STDCALL, VT_EMPTY, 0}; ! _ATL_FUNC_INFO OnErrorInfo = {CC_STDCALL, VT_EMPTY, 7, {VT_I2, VT_PTR, VT_I4, VT_BSTR, VT_BSTR, VT_I4, VT_PTR} }; ! _ATL_FUNC_INFO OnKeyDownInfo = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR, VT_I2} }; ! _ATL_FUNC_INFO OnKeyPressInfo = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR} }; ! _ATL_FUNC_INFO OnKeyUpInfo = {CC_STDCALL, VT_EMPTY, 2, {VT_PTR, VT_I2} }; ! _ATL_FUNC_INFO OnMouseDownInfo = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; ! _ATL_FUNC_INFO OnMouseMoveInfo = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; ! _ATL_FUNC_INFO OnMouseUpInfo = {CC_STDCALL, VT_EMPTY, 4, {VT_I2, VT_I2, VT_I4, VT_I4} }; _ATL_FUNC_INFO OnStateChangeInfo = {CC_STDCALL, VT_EMPTY, 2, { VT_I4, VT_I4} }; *************** *** 41,88 **** CMSVidCtlComp::CMSVidCtlComp() { - m_bWindowOnly = TRUE; - CalcExtent(m_sizeExtent); } ! STDMETHODIMP CMSVidCtlComp::OnAmbientPropertyChange(DISPID dispid) { ! if (dispid == DISPID_AMBIENT_BACKCOLOR) ! { ! SetBackgroundColorFromAmbient(); ! FireViewChange(); ! } ! return IOleControlImpl<CMSVidCtlComp>::OnAmbientPropertyChange(dispid); } ! ! LRESULT CMSVidCtlComp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { ! HRESULT hr = S_OK; ! ! SetIcon(LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY))); ! SetIcon(LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY)), FALSE); ! ! hr = GetDlgControl(IDC_MSVIDCTL1, __uuidof(IMSVidCtl), reinterpret_cast<void **>(&m_pVidControl)); ! ! hr = GetDlgControl(IDC_MSVIDCTL2, __uuidof(IMSVidCtl), reinterpret_cast<void **>(&m_pVidControl2)); ! ! ResizeVideoControl(); ! return hr; ! } - void CMSVidCtlComp::ResizeVideoControl() - { - CComQIPtr<IOleInPlaceObject> pInPlaceObject(m_pVidControl); - if(pInPlaceObject != NULL) - { - RECT WinRect; - GetWindowRect(&WinRect); - ScreenToClient(&WinRect); - pInPlaceObject->SetObjectRects(&WinRect, &WinRect); } } LRESULT CMSVidCtlComp::OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { --- 41,81 ---- CMSVidCtlComp::CMSVidCtlComp() { } ! void CMSVidCtlComp::ResizeVideoControl() { ! RECT WinRect; ! CWindow hwndVC(GetDlgItem(IDC_MSVIDCTL1)); ! GetWindowRect(&WinRect); ! ScreenToClient(&WinRect); ! hwndVC.MoveWindow(&WinRect, TRUE); } ! HWND CMSVidCtlComp::Create(HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName, ! DWORD dwStyle, DWORD dwExStyle,UINT nID, LPVOID lpCreateParam) { ! HWND hWnd = CWindowImpl<CMSVidCtlComp>::Create(hWndParent, rcPos, szWindowName, dwStyle, dwExStyle, nID, lpCreateParam); ! if(hWnd != NULL) ! { ! CComPtr<IUnknown> Container; ! CComPtr<IUnknown> Control; ! AtlAxCreateControlEx( ! L"{B0EDF163-910A-11D2-B632-00C04F79498E}", ! hWnd, ! NULL, ! &Container, ! &Control, ! DIID__IMSVidCtlEvents, ! (IDispatch*)(IMSVidCtlComp*)this ! ); ! m_pVidControl = Control; } + return hWnd; } + LRESULT CMSVidCtlComp::OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { *************** *** 138,186 **** } ! void __stdcall CMSVidCtlComp::OnClick1() ! { ! } ! ! void __stdcall CMSVidCtlComp::OnStateChange1(MSVidCtlStateList PrevState, MSVidCtlStateList CurrState) ! { ! } ! ! void __stdcall CMSVidCtlComp::OnStateChange2(MSVidCtlStateList PrevState, MSVidCtlStateList CurrState) { } ! void __stdcall CMSVidCtlComp::OnDblClick1() { } ! void __stdcall CMSVidCtlComp::OnError1(short Number, BSTR* pDescription, long Scode, BSTR Source, BSTR HelpFile, long HelpContext, boolean* pCancelDisplay) { } ! void __stdcall CMSVidCtlComp::OnKeyDown1(short* pKeyCode, short Shift) { } ! void __stdcall CMSVidCtlComp::OnKeyPress1(short* pKeyCode) { } ! void __stdcall CMSVidCtlComp::OnKeyUp1(short* pKeyCode, short Shift) { } ! void __stdcall CMSVidCtlComp::OnMouseDown1(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } ! void __stdcall CMSVidCtlComp::OnMouseMove1(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } ! void __stdcall CMSVidCtlComp::OnMouseUp1(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } ! void __stdcall CMSVidCtlComp::OnError2(short Number, BSTR* pDescription, long Scode, BSTR Source, BSTR HelpFile, long HelpContext, boolean* pCancelDisplay) { } --- 131,171 ---- } ! void __stdcall CMSVidCtlComp::OnClick() { } ! void __stdcall CMSVidCtlComp::OnStateChange(MSVidCtlStateList PrevState, MSVidCtlStateList CurrState) { } ! void __stdcall CMSVidCtlComp::OnDblClick() { } ! void __stdcall CMSVidCtlComp::OnError(short Number, BSTR* pDescription, long Scode, BSTR Source, BSTR HelpFile, long HelpContext, boolean* pCancelDisplay) { } ! void __stdcall CMSVidCtlComp::OnKeyDown(short* pKeyCode, short Shift) { } ! void __stdcall CMSVidCtlComp::OnKeyPress(short* pKeyCode) { } ! void __stdcall CMSVidCtlComp::OnKeyUp(short* pKeyCode, short Shift) { } ! void __stdcall CMSVidCtlComp::OnMouseDown(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } ! void __stdcall CMSVidCtlComp::OnMouseMove(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } ! void __stdcall CMSVidCtlComp::OnMouseUp(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y) { } *************** *** 260,263 **** --- 245,251 ---- // // $Log$ + // Revision 1.4 2003/02/24 17:01:35 adcockj + // Migrated to WTL and stopped using composite control for hosting + // // Revision 1.3 2003/02/13 17:26:46 adcockj // Interim Checkin starting to add some basic functionality Index: MSVidCtlComp.h =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/MSVidCtlComp.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MSVidCtlComp.h 13 Feb 2003 13:42:13 -0000 1.2 --- MSVidCtlComp.h 24 Feb 2003 17:01:35 -0000 1.3 *************** *** 26,36 **** extern _ATL_FUNC_INFO OnClickInfo; extern _ATL_FUNC_INFO OnDblClickInfo; ! extern _ATL_FUNC_INFO OnError; ! extern _ATL_FUNC_INFO OnKeyDown; ! extern _ATL_FUNC_INFO OnKeyPress; ! extern _ATL_FUNC_INFO OnKeyUp; ! extern _ATL_FUNC_INFO OnMouseDown; ! extern _ATL_FUNC_INFO OnMouseMove; ! extern _ATL_FUNC_INFO OnMouseUp; extern _ATL_FUNC_INFO OnStateChangeInfo; --- 26,36 ---- extern _ATL_FUNC_INFO OnClickInfo; extern _ATL_FUNC_INFO OnDblClickInfo; ! extern _ATL_FUNC_INFO OnErrorInfo; ! extern _ATL_FUNC_INFO OnKeyDownInfo; ! extern _ATL_FUNC_INFO OnKeyPressInfo; ! extern _ATL_FUNC_INFO OnKeyUpInfo; ! extern _ATL_FUNC_INFO OnMouseDownInfo; ! extern _ATL_FUNC_INFO OnMouseMoveInfo; ! extern _ATL_FUNC_INFO OnMouseUpInfo; extern _ATL_FUNC_INFO OnStateChangeInfo; *************** *** 40,60 **** public CComObjectRootEx<CComSingleThreadModel>, public IDispatchImpl<IMSVidCtlComp, &IID_IMSVidCtlComp, &LIBID_CLEVERTELLYLib>, ! public CComCompositeControl<CMSVidCtlComp>, ! public IPersistStreamInitImpl<CMSVidCtlComp>, ! public IOleControlImpl<CMSVidCtlComp>, ! public IOleObjectImpl<CMSVidCtlComp>, ! public IOleInPlaceActiveObjectImpl<CMSVidCtlComp>, ! public IViewObjectExImpl<CMSVidCtlComp>, ! public IOleInPlaceObjectWindowlessImpl<CMSVidCtlComp>, ! public IPersistStorageImpl<CMSVidCtlComp>, ! public ISpecifyPropertyPagesImpl<CMSVidCtlComp>, ! public IQuickActivateImpl<CMSVidCtlComp>, ! public IDataObjectImpl<CMSVidCtlComp>, public IProvideClassInfo2Impl<&CLSID_MSVidCtlComp, NULL, &LIBID_CLEVERTELLYLib>, ! public IDispEventSimpleImpl<IDC_MSVIDCTL1, CMSVidCtlComp, &__uuidof(_IMSVidCtlEvents)>, ! public IDispEventSimpleImpl<IDC_MSVIDCTL2, CMSVidCtlComp, &__uuidof(_IMSVidCtlEvents)>, public CComCoClass<CMSVidCtlComp, &CLSID_MSVidCtlComp>, ! public IDispatchImpl<IMSVidStreamBufferSinkEvent, &__uuidof(IMSVidStreamBufferSinkEvent), &LIBID_MSVidCtlLib, 1, 0>, ! public IDispatchImpl<IMSVidStreamBufferSourceEvent, &__uuidof(IMSVidStreamBufferSourceEvent), &LIBID_MSVidCtlLib, 1, 0>, public IDispatchImpl<IMSVidTunerEvent, &__uuidof(IMSVidTunerEvent), &LIBID_MSVidCtlLib, 1, 0>, public IDispatchImpl<IMSVidVideoRendererEvent, &__uuidof(IMSVidVideoRendererEvent), &LIBID_MSVidCtlLib, 1, 0> --- 40,49 ---- public CComObjectRootEx<CComSingleThreadModel>, public IDispatchImpl<IMSVidCtlComp, &IID_IMSVidCtlComp, &LIBID_CLEVERTELLYLib>, ! public CWindowImpl<CMSVidCtlComp>, public IProvideClassInfo2Impl<&CLSID_MSVidCtlComp, NULL, &LIBID_CLEVERTELLYLib>, ! public IDispEventSimpleImpl<IDC_MSVIDCTL, CMSVidCtlComp, &__uuidof(_IMSVidCtlEvents)>, public CComCoClass<CMSVidCtlComp, &CLSID_MSVidCtlComp>, ! public IDispatchImpl<IMSVidStreamBufferSinkEvent, &__uuidof(IMSVidStreamBufferSinkEvent), &LIBID_MSVidCtlLib, 1 , 0>, ! public IDispatchImpl<IMSVidStreamBufferSourceEvent, &__uuidof(IMSVidStreamBufferSourceEvent), &LIBID_MSVidCtlLib, 1, 0>, public IDispatchImpl<IMSVidTunerEvent, &__uuidof(IMSVidTunerEvent), &LIBID_MSVidCtlLib, 1, 0>, public IDispatchImpl<IMSVidVideoRendererEvent, &__uuidof(IMSVidVideoRendererEvent), &LIBID_MSVidCtlLib, 1, 0> *************** *** 70,88 **** COM_INTERFACE_ENTRY(IMSVidCtlComp) COM_INTERFACE_ENTRY2(IDispatch, IMSVidCtlComp) - COM_INTERFACE_ENTRY(IViewObjectEx) - COM_INTERFACE_ENTRY(IViewObject2) - COM_INTERFACE_ENTRY(IViewObject) - COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceObject) - COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceActiveObject) - COM_INTERFACE_ENTRY(IOleControl) - COM_INTERFACE_ENTRY(IOleObject) - COM_INTERFACE_ENTRY(IPersistStreamInit) - COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit) - COM_INTERFACE_ENTRY(ISpecifyPropertyPages) - COM_INTERFACE_ENTRY(IQuickActivate) - COM_INTERFACE_ENTRY(IPersistStorage) - COM_INTERFACE_ENTRY(IDataObject) COM_INTERFACE_ENTRY(IProvideClassInfo) COM_INTERFACE_ENTRY(IProvideClassInfo2) --- 59,62 ---- *************** *** 93,107 **** END_COM_MAP() - BEGIN_PROP_MAP(CMSVidCtlComp) - PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4) - PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4) - // Example entries - // PROP_ENTRY("Property Description", dispid, clsid) - // PROP_PAGE(CLSID_StockColorPage) - END_PROP_MAP() - BEGIN_MSG_MAP(CMSVidCtlComp) - CHAIN_MSG_MAP(CComCompositeControl<CMSVidCtlComp>) - MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_SYSCOMMAND, OnSysCommand) MESSAGE_HANDLER(WM_MOVE, OnMove) --- 67,71 ---- *************** *** 110,114 **** END_MSG_MAP() - LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); --- 74,77 ---- *************** *** 117,145 **** BEGIN_SINK_MAP(CMSVidCtlComp) ! ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_CLICK, OnClick1, &OnClickInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_DBLCLICK, OnDblClick1, &OnDblClickInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_ERROREVENT, OnError1, &OnError) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_KEYDOWN, OnKeyDown1, &OnKeyDown) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_KEYPRESS, OnKeyPress1, &OnKeyPress) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_KEYUP, OnKeyUp1, &OnKeyUp) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEDOWN, OnMouseDown1, &OnMouseDown) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEMOVE, OnMouseMove1, &OnMouseMove) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEUP, OnMouseUp1, &OnMouseUp) ! SINK_ENTRY_INFO(IDC_MSVIDCTL1, __uuidof(_IMSVidCtlEvents), dispidStateChange, OnStateChange1, &OnStateChangeInfo) ! ! SINK_ENTRY_INFO(IDC_MSVIDCTL2, __uuidof(_IMSVidCtlEvents), DISPID_ERROREVENT, OnError2, &OnError) ! SINK_ENTRY_INFO(IDC_MSVIDCTL2, __uuidof(_IMSVidCtlEvents), dispidStateChange, OnStateChange2, &OnStateChangeInfo) END_SINK_MAP() - STDMETHOD(OnAmbientPropertyChange)(DISPID dispid); - - // IViewObjectEx - DECLARE_VIEW_STATUS(0) // IMSVidCtlComp public: - enum { IDD = IDD_MSVIDCTLCOMP }; - // IMSVidVideoRendererEvent STDMETHOD(OverlayUnavailable)(); --- 80,98 ---- BEGIN_SINK_MAP(CMSVidCtlComp) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_CLICK, OnClick, &OnClickInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_DBLCLICK, OnDblClick, &OnDblClickInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_ERROREVENT, OnError, &OnErrorInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_KEYDOWN, OnKeyDown, &OnKeyDownInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_KEYPRESS, OnKeyPress, &OnKeyPressInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_KEYUP, OnKeyUp, &OnKeyUpInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEDOWN, OnMouseDown, &OnMouseDownInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEMOVE, OnMouseMove, &OnMouseMoveInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), DISPID_MOUSEUP, OnMouseUp, &OnMouseUpInfo) ! SINK_ENTRY_INFO(IDC_MSVIDCTL, __uuidof(_IMSVidCtlEvents), dispidStateChange, OnStateChange, &OnStateChangeInfo) END_SINK_MAP() // IMSVidCtlComp public: // IMSVidVideoRendererEvent STDMETHOD(OverlayUnavailable)(); *************** *** 163,184 **** STDMETHOD(WriteFailure)(); private: void ResizeVideoControl(); ! void __stdcall OnClick1(); ! void __stdcall OnDblClick1(); ! void __stdcall OnError1(short Number, BSTR* pDescription, long Scode, BSTR Source, BSTR HelpFile, long HelpContext, boolean* pCancelDisplay); ! void __stdcall OnKeyDown1(short* pKeyCode, short Shift); ! void __stdcall OnKeyPress1(short* pKeyCode); ! void __stdcall OnKeyUp1(short* pKeyCode, short Shift); ! void __stdcall OnMouseDown1(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y); ! void __stdcall OnMouseMove1(short Button, short Shift, OLE_XPOS_PIXELS x, O... [truncated message content] |
From: <ad...@us...> - 2003-02-24 17:01:44
|
Update of /cvsroot/bdadev/CleverTelly/res In directory sc8-pr-cvs1:/tmp/cvs-serv14688/res Added Files: CleverTelly.exe.manifest CleverTelly.ico Log Message: Migrated to WTL and stopped using composite control for hosting --- NEW FILE: CleverTelly.exe.manifest --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="x86" name="CleverTelly" type="win32" /> <description> CleverTelly Application </description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly> --- NEW FILE: CleverTelly.ico --- (This appears to be a binary file; contents omitted.) |
From: <ad...@us...> - 2003-02-24 16:58:28
|
Update of /cvsroot/bdadev/CleverTelly/res In directory sc8-pr-cvs1:/tmp/cvs-serv13407/res Log Message: Directory /cvsroot/bdadev/CleverTelly/res added to the repository |
From: <ad...@us...> - 2003-02-21 20:58:14
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv10909 Modified Files: TuneRequestStore.cpp Log Message: Bug Fixes to schedule code Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TuneRequestStore.cpp 21 Feb 2003 16:36:43 -0000 1.10 --- TuneRequestStore.cpp 21 Feb 2003 20:58:10 -0000 1.11 *************** *** 259,263 **** CComPtr<IBaseFilter> BaseFilter; ULONG Fetched(0); ! while(SUCCEEDED(EnumFilters->Next(1, &BaseFilter, &Fetched))) { m_GuideData = BaseFilter; --- 259,263 ---- CComPtr<IBaseFilter> BaseFilter; ULONG Fetched(0); ! while(EnumFilters->Next(1, &BaseFilter, &Fetched) == S_OK) { m_GuideData = BaseFilter; *************** *** 770,774 **** HRESULT Result = S_OK; CComPtr<IGuideDataProperty> GuideDataProperty; ! ULONG Items(0); while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) --- 770,776 ---- HRESULT Result = S_OK; CComPtr<IGuideDataProperty> GuideDataProperty; ! ! EnumGuideDataProperties->Reset(); ! ULONG Items(0); while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) *************** *** 846,850 **** memset(&SystemTimeUTC, 0, sizeof(SystemTimeUTC)); ! SystemTimeUTC.wYear = CStyleTimeStruct->tm_year; SystemTimeUTC.wMonth = CStyleTimeStruct->tm_mon; SystemTimeUTC.wDay = CStyleTimeStruct->tm_mday; --- 848,852 ---- memset(&SystemTimeUTC, 0, sizeof(SystemTimeUTC)); ! SystemTimeUTC.wYear = CStyleTimeStruct->tm_year + 1900; SystemTimeUTC.wMonth = CStyleTimeStruct->tm_mon; SystemTimeUTC.wDay = CStyleTimeStruct->tm_mday; *************** *** 1054,1058 **** CComVariant ScheduleID; ! while(SUCCEEDED(EnumScheduleEntries->Next(1, &ScheduleID, &Items))) { CComPtr<IEnumGuideDataProperties> EnumScheduleProperties; --- 1056,1060 ---- CComVariant ScheduleID; ! while(EnumScheduleEntries->Next(1, &ScheduleID, &Items) == S_OK) { CComPtr<IEnumGuideDataProperties> EnumScheduleProperties; *************** *** 1107,1110 **** --- 1109,1115 ---- // // $Log$ + // Revision 1.11 2003/02/21 20:58:10 adcockj + // Bug Fixes to schedule code + // // Revision 1.10 2003/02/21 16:36:43 adcockj // Added schedule functionality (untested) and some code clean up |
From: <ad...@us...> - 2003-02-21 20:57:55
|
Update of /cvsroot/bdadev/SimpleTV In directory sc8-pr-cvs1:/tmp/cvs-serv10668 Modified Files: SIMPLETV.CPP Log Message: Bug fixes to Tuneing space persist code Index: SIMPLETV.CPP =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SIMPLETV.CPP,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SIMPLETV.CPP 21 Feb 2003 17:27:18 -0000 1.7 --- SIMPLETV.CPP 21 Feb 2003 20:57:51 -0000 1.8 *************** *** 850,855 **** if(Result == S_OK) { - ++Variant.lVal; - Result = Application->SystemTuningSpaces->Add(Application->TuningSpace, &Variant); } --- 850,853 ---- *************** *** 971,975 **** if (Result != S_OK) { ! printf("Trying DVB-C...\n"); // try the DVB-Cable Network Provider Application->DVBSystemType = DVB_Cable; --- 969,973 ---- if (Result != S_OK) { ! printf("Trying DVB-C...\n"); // try the DVB-Cable Network Provider Application->DVBSystemType = DVB_Cable; *************** *** 984,988 **** if (Result != S_OK) { ! printf("Trying DVB-T...\n"); // try the DVB-Terrestrial Network Provider Application->DVBSystemType = DVB_Terrestrial; --- 982,986 ---- if (Result != S_OK) { ! printf("Trying DVB-T...\n"); // try the DVB-Terrestrial Network Provider Application->DVBSystemType = DVB_Terrestrial; *************** *** 1148,1152 **** IN PAPPLICATION Application) { ! // check if a TuneRequestStore was created object was created if (Application->TuneRequestStore) { --- 1146,1158 ---- IN PAPPLICATION Application) { ! // check if a SystemTuningSpaces object ws created ! if (Application->SystemTuningSpaces) ! { ! // release SystemTuningSpaces object and invalidate pointer ! Application->SystemTuningSpaces->Release(); ! Application->SystemTuningSpaces = NULL; ! }; ! ! // check if a TuneRequestStore was created object was created if (Application->TuneRequestStore) { *************** *** 1498,1506 **** if (SUCCEEDED(Result)) { ! // Find the size of the returned collection. ! long cCount = 0; ! Result = TuningSpaces->get_Count(&cCount); ! if (SUCCEEDED(Result) && (cCount > 0)) { VARIANT Item; Item.vt = VT_UI4; --- 1504,1512 ---- if (SUCCEEDED(Result)) { ! IEnumTuningSpaces* pTuneSpaceEnum; ! Result = TuningSpaces->get_EnumTuningSpaces(&pTuneSpaceEnum); ! if (SUCCEEDED(Result)) { + ULONG Items(0); VARIANT Item; Item.vt = VT_UI4; *************** *** 1508,1513 **** ITuningSpace* TuningSpace; ! Result = TuningSpaces->get_Item(Item, &TuningSpace); ! if (SUCCEEDED(Result)) { Result = TuningSpace->QueryInterface(&Application->TuningSpace); --- 1514,1519 ---- ITuningSpace* TuningSpace; ! Result = pTuneSpaceEnum->Next(1, &TuningSpace, &Items); ! if (Result == S_OK) { Result = TuningSpace->QueryInterface(&Application->TuningSpace); *************** *** 1517,1527 **** } } - - } - else - { - Result = E_FAIL; } } } return Result; --- 1523,1530 ---- } } } + pTuneSpaceEnum->Release(); } + TuningSpaces->Release(); } return Result; *************** *** 1647,1658 **** { // set the friendly name for this tuning space ! Result = Application->TuningSpace-> ! put_FriendlyName(L"SimpleTV DVB Tuning Space"); // check if the operation was successful if (Result == S_OK) { // set the unique name for this tuning space ! Result = Application->TuningSpace->put_UniqueName(L"SimpleTV"); }; --- 1650,1664 ---- { // set the friendly name for this tuning space ! BSTR Name = SysAllocString(L"SimpleTV DVB Tuning Space"); ! Result = Application->TuningSpace->put_FriendlyName(Name); ! SysFreeString(Name); // check if the operation was successful if (Result == S_OK) { + BSTR Name = SysAllocString(L"SimpleTV"); // set the unique name for this tuning space ! Result = Application->TuningSpace->put_UniqueName(Name); ! SysFreeString(Name); }; *************** *** 1997,2008 **** }; - // check if a SystemTuningSpaces object ws created - if (Application->SystemTuningSpaces) - { - // release SystemTuningSpaces object and invalidate pointer - Application->SystemTuningSpaces->Release(); - Application->SystemTuningSpaces = NULL; - }; - // return success return (S_OK); --- 2003,2006 ---- *************** *** 2856,2859 **** --- 2854,2860 ---- // // $Log$ + // Revision 1.8 2003/02/21 20:57:51 adcockj + // Bug fixes to Tuneing space persist code + // // Revision 1.7 2003/02/21 17:27:18 adcockj // Changed to persist Tuning Space |
From: <ad...@us...> - 2003-02-21 17:27:22
|
Update of /cvsroot/bdadev/SimpleTV In directory sc8-pr-cvs1:/tmp/cvs-serv18784a Modified Files: SIMPLETV.CPP Log Message: Changed to persist Tuning Space Index: SIMPLETV.CPP =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SIMPLETV.CPP,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SIMPLETV.CPP 21 Feb 2003 11:47:57 -0000 1.6 --- SIMPLETV.CPP 21 Feb 2003 17:27:18 -0000 1.7 *************** *** 80,83 **** --- 80,84 ---- DWORD SaveSettings; // flag if to save settings // Unified Tuning Model related data + ITuningSpaceContainer* SystemTuningSpaces; // Contains all the systems Tuning spaces DWORD DVBSystemType; // DVB System Type to be tuned IDVBTuningSpace2 * TuningSpace; // TuningSpace object pointer *************** *** 195,201 **** --- 196,208 ---- IN PAPPLICATION Application); + HRESULT LoadSavedProvider( + IN PAPPLICATION Application); + HRESULT DeleteNetworkProvider( IN PAPPLICATION Application); + HRESULT CreateTuneRequest( + IN PAPPLICATION Application); + HRESULT UpdatePIDFilter( IN PAPPLICATION Application); *************** *** 833,836 **** --- 840,862 ---- } + HRESULT AddTuningSpaceToSystemCollection(IN PAPPLICATION Application) + { + HRESULT Result; + VARIANT Variant; + Variant.vt = VT_I4; + + Result = Application->SystemTuningSpaces->get_Count(&Variant.lVal); + + if(Result == S_OK) + { + ++Variant.lVal; + + Result = Application->SystemTuningSpaces->Add(Application->TuningSpace, &Variant); + } + + return Result; + } + + /****************************************************************************** ***** DirectShow filter graph building and erasing functions ***** *************** *** 934,938 **** { // try to add the cached BDA Network Provider to the graph ! Result = CreateNetworkProvider(Application); } else --- 960,964 ---- { // try to add the cached BDA Network Provider to the graph ! Result = LoadSavedProvider(Application); } else *************** *** 949,952 **** --- 975,982 ---- Application->DVBSystemType = DVB_Cable; Result = CreateNetworkProvider(Application); + if(Result == S_OK) + { + AddTuningSpaceToSystemCollection(Application); + } }; *************** *** 958,961 **** --- 988,995 ---- Application->DVBSystemType = DVB_Terrestrial; Result = CreateNetworkProvider(Application); + if(Result == S_OK) + { + AddTuningSpaceToSystemCollection(Application); + } }; *************** *** 967,970 **** --- 1001,1008 ---- Application->DVBSystemType = DVB_Satellite; Result = CreateNetworkProvider(Application); + if(Result == S_OK) + { + AddTuningSpaceToSystemCollection(Application); + } }; *************** *** 1434,1441 **** /*============================================================================* *==== CreateNetworkProvider() - Create Network Provider & Tuning Objects ====* *============================================================================*/ ! HRESULT CreateNetworkProvider( IN PAPPLICATION Application) { --- 1472,1536 ---- /*============================================================================* + *==== LoadSavedProvider() - Create Network Provider & Tuning Objects ====* + *============================================================================*/ + + HRESULT LoadSavedProvider( + IN PAPPLICATION Application) + { + HRESULT Result; + + // create a DVB tuning space object + Result = CoCreateInstance + ( + CLSID_SystemTuningSpaces, + NULL, + CLSCTX_INPROC_SERVER, + IID_ITuningSpaceContainer, + (LPVOID *) &Application->SystemTuningSpaces + ); + + if(SUCCEEDED(Result)) + { + ITuningSpaces* TuningSpaces; + BSTR bstrName = SysAllocString(L"SimpleTV"); + Result = Application->SystemTuningSpaces->TuningSpacesForName(bstrName, &TuningSpaces); + SysFreeString(bstrName); + if (SUCCEEDED(Result)) + { + // Find the size of the returned collection. + long cCount = 0; + Result = TuningSpaces->get_Count(&cCount); + if (SUCCEEDED(Result) && (cCount > 0)) + { + VARIANT Item; + Item.vt = VT_UI4; + Item.ulVal = 0; + ITuningSpace* TuningSpace; + + Result = TuningSpaces->get_Item(Item, &TuningSpace); + if (SUCCEEDED(Result)) + { + Result = TuningSpace->QueryInterface(&Application->TuningSpace); + if(SUCCEEDED(Result)) + { + Result = CreateTuneRequest(Application); + } + } + + } + else + { + Result = E_FAIL; + } + } + } + return Result; + } + + /*============================================================================* *==== CreateNetworkProvider() - Create Network Provider & Tuning Objects ====* *============================================================================*/ ! HRESULT CreateTuneRequest( IN PAPPLICATION Application) { *************** *** 1445,1448 **** --- 1540,1636 ---- HRESULT Result; + + // create a tune request object + Result = Application->TuningSpace-> + CreateTuneRequest(&Application->TuneRequest); + + // check if the object was successfully created + if (Result == S_OK) + { + // query the IDVBTuneRequest interface + Result = Application->TuneRequest-> + QueryInterface(IID_IDVBTuneRequest, + (void **) &Application->DVBTuneRequest); + }; + + // check if the tune request was successfully created + if (Result == S_OK) + { + // retrieve the network type GUID + Result = Application->TuningSpace->get__NetworkType(&NetworkType); + + // check if the GUID was successfully retrieved + if (Result == S_OK) + { + // create the corresponding Network Provider object + Result = CoCreateInstance + ( + NetworkType, + NULL, + CLSCTX_INPROC_SERVER, + IID_IBaseFilter, + (LPVOID *) &Application->NetworkProvider + ); + + // check if the Network Provider was successfully created + if (Result == S_OK) + { + // query the Network Provider for the ITuner interface + Result = Application->NetworkProvider-> + QueryInterface(IID_ITuner, + (void **) &Application->Tuner); + + // check if the interface was successfully retrieved + if (Result == S_OK) + { + // put the default tune request to the provider + Result = Application->Tuner-> + put_TuneRequest(Application->DVBTuneRequest); + }; + }; + }; + + // check if the Network Provider was successfully initialized + if (Result == S_OK) + { + // add the Network Provider to the filter graph + Result = Application->FilterGraph-> + AddFilter(Application->NetworkProvider, + L"Microsoft DVB Network Provider"); + + // check if the Network Provider was successfully added + if (Result == S_OK) + { + // find the Antenna Out pin of the Network Provider + Result = Application->NetworkProvider-> + FindPin(AntennaOutPinName, &Pin); + + // check if the Antenna Out pin was found + if (Result == S_OK) + { + // try to render the Antenna Out pin + Result = Application->FilterGraph->Render(Pin); + + // release the Antenna Out pin + Pin->Release(); + }; + }; + }; + }; + return Result; + } + + + + /*============================================================================* + *==== CreateNetworkProvider() - Create Network Provider & Tuning Objects ====* + *============================================================================*/ + + HRESULT CreateNetworkProvider( + IN PAPPLICATION Application) + { + // declare local variables + HRESULT Result; + // create a DVB tuning space object Result = CoCreateInstance *************** *** 1719,1804 **** break; }; ! }; ! ! // check if the tuning space was successfully initialized ! if (Result == S_OK) ! { ! // create a tune request object ! Result = Application->TuningSpace-> ! CreateTuneRequest(&Application->TuneRequest); ! ! // check if the object was successfully created ! if (Result == S_OK) ! { ! // query the IDVBTuneRequest interface ! Result = Application->TuneRequest-> ! QueryInterface(IID_IDVBTuneRequest, ! (void **) &Application->DVBTuneRequest); ! }; ! }; ! ! // check if the tune request was successfully created ! if (Result == S_OK) ! { ! // retrieve the network type GUID ! Result = Application->TuningSpace->get__NetworkType(&NetworkType); ! ! // check if the GUID was successfully retrieved ! if (Result == S_OK) ! { ! // create the corresponding Network Provider object ! Result = CoCreateInstance ! ( ! NetworkType, ! NULL, ! CLSCTX_INPROC_SERVER, ! IID_IBaseFilter, ! (LPVOID *) &Application->NetworkProvider ! ); ! ! // check if the Network Provider was successfully created ! if (Result == S_OK) ! { ! // query the Network Provider for the ITuner interface ! Result = Application->NetworkProvider-> ! QueryInterface(IID_ITuner, ! (void **) &Application->Tuner); ! ! // check if the interface was successfully retrieved ! if (Result == S_OK) ! { ! // put the default tune request to the provider ! Result = Application->Tuner-> ! put_TuneRequest(Application->DVBTuneRequest); ! }; ! }; ! }; ! }; ! ! // check if the Network Provider was successfully initialized ! if (Result == S_OK) ! { ! // add the Network Provider to the filter graph ! Result = Application->FilterGraph-> ! AddFilter(Application->NetworkProvider, ! L"Microsoft DVB Network Provider"); ! ! // check if the Network Provider was successfully added ! if (Result == S_OK) ! { ! // find the Antenna Out pin of the Network Provider ! Result = Application->NetworkProvider-> ! FindPin(AntennaOutPinName, &Pin); ! ! // check if the Antenna Out pin was found ! if (Result == S_OK) ! { ! // try to render the Antenna Out pin ! Result = Application->FilterGraph->Render(Pin); - // release the Antenna Out pin - Pin->Release(); - }; - }; }; }; --- 1907,1915 ---- break; }; ! if(Result == S_OK) ! { ! Result = CreateTuneRequest(Application); ! } }; }; *************** *** 1886,1889 **** --- 1997,2008 ---- }; + // check if a SystemTuningSpaces object ws created + if (Application->SystemTuningSpaces) + { + // release SystemTuningSpaces object and invalidate pointer + Application->SystemTuningSpaces->Release(); + Application->SystemTuningSpaces = NULL; + }; + // return success return (S_OK); *************** *** 2737,2740 **** --- 2856,2862 ---- // // $Log$ + // Revision 1.7 2003/02/21 17:27:18 adcockj + // Changed to persist Tuning Space + // // Revision 1.6 2003/02/21 11:47:57 adcockj // Changed Attach and Detach function names |
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv30984 Modified Files: ProgramInfo.cpp ProgramInfo.h StdAfx.cpp StdAfx.h TuneInfo.cpp TuneInfo.h TuneReqStore.cpp TuneReqStore.idl TuneRequestStore.cpp TuneRequestStore.h Log Message: Added schedule functionality (untested) and some code clean up Index: ProgramInfo.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/ProgramInfo.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProgramInfo.cpp 20 Feb 2003 17:40:32 -0000 1.1 --- ProgramInfo.cpp 21 Feb 2003 16:36:43 -0000 1.2 *************** *** 1,3 **** ! // ProgramInfo.cpp : Implementation of CProgramInfo #include "stdafx.h" #include "TuneReqStore.h" --- 1,22 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// ! #include "stdafx.h" #include "TuneReqStore.h" *************** *** 51,52 **** --- 70,104 ---- return S_OK; } + + STDMETHODIMP CProgramInfo::get_StartTime(DATE *pVal) + { + *pVal = m_StartDate; + return S_OK; + } + + STDMETHODIMP CProgramInfo::put_StartTime(DATE newVal) + { + m_StartDate = newVal; + return S_OK; + } + + STDMETHODIMP CProgramInfo::get_EndTime(DATE *pVal) + { + *pVal = m_EndDate; + return S_OK; + } + + STDMETHODIMP CProgramInfo::put_EndTime(DATE newVal) + { + m_EndDate = newVal; + return S_OK; + } + + ///////////////////////////////////////////////////////////////////////////// + // CVS Log + // + // $Log$ + // Revision 1.2 2003/02/21 16:36:43 adcockj + // Added schedule functionality (untested) and some code clean up + // + ///////////////////////////////////////////////////////////////////////////// Index: ProgramInfo.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/ProgramInfo.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProgramInfo.h 20 Feb 2003 17:40:34 -0000 1.1 --- ProgramInfo.h 21 Feb 2003 16:36:43 -0000 1.2 *************** *** 1,3 **** ! // ProgramInfo.h : Declaration of the CProgramInfo #ifndef __PROGRAMINFO_H_ --- 1,21 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// #ifndef __PROGRAMINFO_H_ *************** *** 36,39 **** --- 54,61 ---- // IProgramInfo public: + STDMETHOD(get_EndTime)(/*[out, retval]*/ DATE *pVal); + STDMETHOD(put_EndTime)(/*[in]*/ DATE newVal); + STDMETHOD(get_StartTime)(/*[out, retval]*/ DATE *pVal); + STDMETHOD(put_StartTime)(/*[in]*/ DATE newVal); STDMETHOD(get_Id)(/*[out, retval]*/ BSTR *pVal); STDMETHOD(put_Id)(/*[in]*/ BSTR newVal); *************** *** 49,52 **** --- 71,76 ---- CComBSTR m_Description; CComBSTR m_Name; + DATE m_EndDate; + DATE m_StartDate; }; Index: StdAfx.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/StdAfx.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StdAfx.cpp 19 Feb 2003 17:21:42 -0000 1.2 --- StdAfx.cpp 21 Feb 2003 16:36:43 -0000 1.3 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 32,35 **** --- 32,38 ---- // // $Log$ + // Revision 1.3 2003/02/21 16:36:43 adcockj + // Added schedule functionality (untested) and some code clean up + // // Revision 1.2 2003/02/19 17:21:42 adcockj // removed midl generated file Index: StdAfx.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/StdAfx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdAfx.h 20 Feb 2003 07:53:39 -0000 1.3 --- StdAfx.h 21 Feb 2003 16:36:43 -0000 1.4 *************** *** 35,38 **** --- 35,39 ---- #include <stack> #include <vector> + #include <ctime> #define CHECK(x) { HRESULT __hr(x); if(FAILED(__hr)) {ATLTRACE(#x " Returned %8x\n", __hr); _asm{int 3}; return __hr;}} Index: TuneInfo.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneInfo.cpp 20 Feb 2003 17:39:37 -0000 1.4 --- TuneInfo.cpp 21 Feb 2003 16:36:43 -0000 1.5 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 142,145 **** --- 142,148 ---- // // $Log$ + // Revision 1.5 2003/02/21 16:36:43 adcockj + // Added schedule functionality (untested) and some code clean up + // // Revision 1.4 2003/02/20 17:39:37 adcockj // Interim Check in of Schedule storage *************** *** 152,154 **** // ///////////////////////////////////////////////////////////////////////////// - --- 155,156 ---- Index: TuneInfo.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TuneInfo.h 20 Feb 2003 17:39:38 -0000 1.5 --- TuneInfo.h 21 Feb 2003 16:36:43 -0000 1.6 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 67,70 **** --- 67,72 ---- unsigned m_bRequiresSave:1; + std::vector<IProgramInfo*> m_ProgramInfos; + private: void EmptyArray(); *************** *** 73,77 **** typedef CComEnumOnSTL<IEnumProgramInfo, &IID_IEnumProgramInfo, IProgramInfo*, _Copy<IProgramInfo*>, std::vector<IProgramInfo*> > ComSTLEnum; - std::vector<IProgramInfo*> m_ProgramInfos; ITuneRequest* m_TuneRequest; --- 75,78 ---- Index: TuneReqStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneReqStore.cpp 20 Feb 2003 17:39:38 -0000 1.4 --- TuneReqStore.cpp 21 Feb 2003 16:36:43 -0000 1.5 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 95,98 **** --- 95,101 ---- // // $Log$ + // Revision 1.5 2003/02/21 16:36:43 adcockj + // Added schedule functionality (untested) and some code clean up + // // Revision 1.4 2003/02/20 17:39:38 adcockj // Interim Check in of Schedule storage Index: TuneReqStore.idl =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.idl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TuneReqStore.idl 21 Feb 2003 11:46:34 -0000 1.5 --- TuneReqStore.idl 21 Feb 2003 16:36:43 -0000 1.6 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 40,43 **** --- 40,47 ---- [propget, id(3), helpstring("property Id")] HRESULT Id([out, retval] BSTR *pVal); [propput, id(3), helpstring("property Id")] HRESULT Id([in] BSTR newVal); + [propget, id(4), helpstring("property StartTime")] HRESULT StartTime([out, retval] DATE *pVal); + [propput, id(4), helpstring("property StartTime")] HRESULT StartTime([in] DATE newVal); + [propget, id(5), helpstring("property EndTime")] HRESULT EndTime([out, retval] DATE *pVal); + [propput, id(5), helpstring("property EndTime")] HRESULT EndTime([in] DATE newVal); }; *************** *** 132,136 **** [ uuid(603A3F82-4325-11D7-B840-0002A5623377), ! helpstring("TuneInfo Class") ] coclass TuneInfo --- 136,141 ---- [ uuid(603A3F82-4325-11D7-B840-0002A5623377), ! helpstring("TuneInfo Class"), ! noncreatable ] coclass TuneInfo *************** *** 140,144 **** [ uuid(5DACDF4E-4422-11D7-B840-0002A5623377), ! helpstring("ProgramInfo Class") ] coclass ProgramInfo --- 145,150 ---- [ uuid(5DACDF4E-4422-11D7-B840-0002A5623377), ! helpstring("ProgramInfo Class"), ! noncreatable ] coclass ProgramInfo *************** *** 152,155 **** --- 158,164 ---- // // $Log$ + // Revision 1.6 2003/02/21 16:36:43 adcockj + // Added schedule functionality (untested) and some code clean up + // // Revision 1.5 2003/02/21 11:46:34 adcockj // Changed Attach and Detach function names Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TuneRequestStore.cpp 21 Feb 2003 12:09:10 -0000 1.9 --- TuneRequestStore.cpp 21 Feb 2003 16:36:43 -0000 1.10 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 40,43 **** --- 40,44 ---- #include "TuneRequestStore.h" #include "TuneInfo.h" + #include "ProgramInfo.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 78,82 **** { // make sure we've got the latest info ! UpdateProgramInfo(); if (ppUnk == NULL) --- 79,83 ---- { // make sure we've got the latest info ! UpdateInfo(); if (ppUnk == NULL) *************** *** 108,112 **** { // make sure we've got the latest info ! UpdateProgramInfo(); if (pVal == NULL) --- 109,113 ---- { // make sure we've got the latest info ! UpdateInfo(); if (pVal == NULL) *************** *** 130,134 **** { // make sure we've got the latest info ! UpdateProgramInfo(); *pVal = m_TuneInfos.size(); --- 131,135 ---- { // make sure we've got the latest info ! UpdateInfo(); *pVal = m_TuneInfos.size(); *************** *** 196,200 **** { // make sure we've got the latest info ! UpdateProgramInfo(); // *** Warning *** This function is NOT reentrant --- 197,201 ---- { // make sure we've got the latest info ! UpdateInfo(); // *** Warning *** This function is NOT reentrant *************** *** 282,286 **** } ATLTRACE("Failed to find TIF\n"); ! return Result; } --- 283,287 ---- } ATLTRACE("Failed to find TIF\n"); ! return E_FAIL; } *************** *** 289,293 **** // make sure we've got the latest info // since this is the last chance we have to talk to the TIF ! UpdateProgramInfo(); // unadvise GuideDataEvent object --- 290,294 ---- // make sure we've got the latest info // since this is the last chance we have to talk to the TIF ! UpdateInfo(); // unadvise GuideDataEvent object *************** *** 305,309 **** /////////////////////////////////////////////////////////////////////////////// ! // XML storage functions /////////////////////////////////////////////////////////////////////////////// STDMETHODIMP CTuneRequestStore::Read(LPCOLESTR pwszPropNameIn, VARIANT *pVar, IErrorLog *pErrorLog) --- 306,310 ---- /////////////////////////////////////////////////////////////////////////////// ! // IPropertyBag interface /////////////////////////////////////////////////////////////////////////////// STDMETHODIMP CTuneRequestStore::Read(LPCOLESTR pwszPropNameIn, VARIANT *pVar, IErrorLog *pErrorLog) *************** *** 549,552 **** --- 550,556 ---- } + /////////////////////////////////////////////////////////////////////////////// + // XML storage functions + /////////////////////////////////////////////////////////////////////////////// bool CTuneRequestStore::IsValidXMLTagChar(WCHAR c) *************** *** 762,785 **** // Tuning Information maintenance routines /////////////////////////////////////////////////////////////////////////////// ! ! HRESULT CTuneRequestStore::UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name) { HRESULT Result = S_OK; for(int i(0); i < m_TuneInfos.size(); ++i) { if(m_TuneInfos[i] != NULL) { ! CComBSTR Id2; ! Result = m_TuneInfos[i]->get_UniqueID(&Id2); ! CHECK(Result); ! if(Id2 == Id) { ! Result = m_TuneInfos[i]->put_TuneRequest(TuneRequest); ! return Result; } } } // if we get down here then the Tune Request is new so lets add it --- 766,940 ---- // Tuning Information maintenance routines /////////////////////////////////////////////////////////////////////////////// ! HRESULT CTuneRequestStore::GetGuideDataProperty(IEnumGuideDataProperties* EnumGuideDataProperties, wchar_t* PropertyName, CComVariant& PropertyValue) { HRESULT Result = S_OK; + CComPtr<IGuideDataProperty> GuideDataProperty; + ULONG Items(0); + while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) + { + CComBSTR Name; + + Result = GuideDataProperty->get_Name(&Name); + if(Name != NULL && Name == PropertyName) + { + Result = GuideDataProperty->get_Value(&PropertyValue); + return Result; + } + Name.Empty(); + GuideDataProperty.Release(); + } + PropertyValue.Clear(); + return E_FAIL; + } + + HRESULT CTuneRequestStore::GetGuideDataProperty(IEnumGuideDataProperties* EnumGuideDataProperties, wchar_t* PropertyName, CComBSTR& PropertyValue) + { + CComVariant Variant; + HRESULT Result = GetGuideDataProperty(EnumGuideDataProperties, PropertyName, Variant); + if(SUCCEEDED(Result)) + { + Result = Variant.ChangeType(VT_BSTR); + CHECK(Result); + + PropertyValue = Variant.bstrVal; + return S_OK; + } + else + { + PropertyValue.Empty(); + return Result; + } + } + + HRESULT CTuneRequestStore::GetGuideDataProperty(IEnumGuideDataProperties* EnumGuideDataProperties, wchar_t* PropertyName, ULONG& PropertyValue) + { + CComVariant Variant; + HRESULT Result = GetGuideDataProperty(EnumGuideDataProperties, PropertyName, Variant); + if(SUCCEEDED(Result)) + { + Result = Variant.ChangeType(VT_UI4); + CHECK(Result); + + PropertyValue = Variant.ulVal; + return S_OK; + } + else + { + PropertyValue = 0; + return Result; + } + } + + #define DIFF_GPS_DAYS 3657 + + HRESULT CTuneRequestStore::ConvertGPSTimeToDouble(ULONG GPSTime, double& VariantTime) + { + // **** warning **** + // all this needs to be tested + // there is no error checking yet + // and I have no idea if this will work as expected + + // convert GPS time to C time + // by adding the number of seconds between the midnights of 1/Jan/1970 to 6/Jan/1980 + // which are the starts of c time and GPS time respectively + time_t CStyleTime = DIFF_GPS_DAYS * 86400 + GPSTime; + struct tm* CStyleTimeStruct = gmtime(&CStyleTime); + + // make an NT style time + SYSTEMTIME SystemTimeUTC; + memset(&SystemTimeUTC, 0, sizeof(SystemTimeUTC)); + + SystemTimeUTC.wYear = CStyleTimeStruct->tm_year; + SystemTimeUTC.wMonth = CStyleTimeStruct->tm_mon; + SystemTimeUTC.wDay = CStyleTimeStruct->tm_mday; + SystemTimeUTC.wHour = CStyleTimeStruct->tm_hour; + SystemTimeUTC.wMinute = CStyleTimeStruct->tm_min; + SystemTimeUTC.wSecond = CStyleTimeStruct->tm_sec; + + SYSTEMTIME SystemTimeLocal; + + // convert the GPS time to local timezone + SystemTimeToTzSpecificLocalTime(NULL, &SystemTimeUTC, &SystemTimeLocal); + + // convert local time to a Variant type ready for use + SystemTimeToVariantTime(&SystemTimeLocal, &VariantTime); + + return S_OK; + } + + HRESULT CTuneRequestStore::UpdateScheduleInfo(BSTR ServiceId, BSTR ScheduleID, BSTR Title, BSTR Description, ULONG StartTime, ULONG EndTime) + { + HRESULT Result = S_OK; + + double DoubleStartTime; + double DoubleEndTime; + + Result = ConvertGPSTimeToDouble(StartTime, DoubleStartTime); + CHECK(Result); + Result = ConvertGPSTimeToDouble(EndTime, DoubleEndTime); + CHECK(Result); + + CTuneInfo* pTuneInfo = (CTuneInfo*)GetTuneInfo(ServiceId); + if(pTuneInfo != NULL) + { + for(int i(0); i < pTuneInfo->m_ProgramInfos.size(); ++i) + { + if(pTuneInfo->m_ProgramInfos[i] != NULL) + { + pTuneInfo->m_ProgramInfos[i]->put_Description(Description); + pTuneInfo->m_ProgramInfos[i]->put_Name(Title); + pTuneInfo->m_ProgramInfos[i]->put_StartTime(DoubleStartTime); + pTuneInfo->m_ProgramInfos[i]->put_EndTime(DoubleEndTime); + } + } + + CComObject<CProgramInfo>* pProgramInfo = new CComObject<CProgramInfo>; + pProgramInfo->AddRef(); + + pProgramInfo->put_Id(ScheduleID); + pProgramInfo->put_Description(Description); + pProgramInfo->put_Name(Title); + pProgramInfo->put_StartTime(DoubleStartTime); + pProgramInfo->put_EndTime(DoubleEndTime); + + pTuneInfo->m_ProgramInfos.push_back(pProgramInfo); + } + return Result; + } + + ITuneInfo* CTuneRequestStore::GetTuneInfo(BSTR ServiceId) + { for(int i(0); i < m_TuneInfos.size(); ++i) { if(m_TuneInfos[i] != NULL) { ! CComBSTR Id; ! if(FAILED(m_TuneInfos[i]->get_UniqueID(&Id))) ! { ! return NULL; ! } ! if(Id == ServiceId) { ! return m_TuneInfos[i]; } } } + return NULL; + } + + + HRESULT CTuneRequestStore::UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name) + { + HRESULT Result = S_OK; + + + ITuneInfo* pPrevTuneInfo = GetTuneInfo(Id); + if(pPrevTuneInfo != NULL) + { + Result = pPrevTuneInfo->put_TuneRequest(TuneRequest); + return Result; + } // if we get down here then the Tune Request is new so lets add it *************** *** 802,814 **** } ! HRESULT CTuneRequestStore::UpdateProgramInfo() { ! HRESULT Result = S_OK; ! if(m_GuideData == NULL || m_UpdatePending == false) { ! return S_OK; } CComQIPtr<ITuneRequestInfo> TuneRequestInfo = m_GuideData; --- 957,996 ---- } ! void CTuneRequestStore::UpdateInfo() { ! // don't update if we haven't got anything to do ! // or we can't access the TIF if(m_GuideData == NULL || m_UpdatePending == false) { ! return; } + HRESULT Result = S_OK; + + // first update all the IProgramInfo objects + // based on the current info + Result = UpdateServiceInfo(); + if(FAILED(Result)) + { + ATLTRACE("UpdateServiceInfo Failed %08x\n", Result); + return; + } + + // Then try and update the schedule info + Result = UpdateScheduleInfo(); + if(FAILED(Result)) + { + ATLTRACE("UpdateScheduleInfo Failed %08x\n", Result); + return; + } + + // clear update pending flag + m_UpdatePending = false; + } + + HRESULT CTuneRequestStore::UpdateServiceInfo() + { + HRESULT Result = S_OK; + CComQIPtr<ITuneRequestInfo> TuneRequestInfo = m_GuideData; *************** *** 836,894 **** //CHECK(TuneRequest); ! CComPtr<IEnumGuideDataProperties> EnumGuideDataProperties; ! Result = m_GuideData->GetServiceProperties(TuneRequest, &EnumGuideDataProperties); ! if(SUCCEEDED(Result)) ! { ! CComBSTR Id; ! CComBSTR Name; - CComPtr<IGuideDataProperty> GuideDataProperty; - while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) - { - BSTR PropertyName = NULL; - Result = GuideDataProperty->get_Name(&PropertyName); - if(PropertyName != NULL && wcsicmp(PropertyName, L"Description.ID") == 0) - { - CComVariant Variant; - GuideDataProperty->get_Value(&Variant); - Id = (BSTR)Variant.bstrVal; - } - else if(PropertyName != NULL && wcsicmp(PropertyName, L"Description.Name") == 0) - { - CComVariant Variant; - GuideDataProperty->get_Value(&Variant); - Name = (BSTR)Variant.bstrVal; - } - if(PropertyName != NULL) - { - SysFreeString(PropertyName); - } - GuideDataProperty.Release(); - } - if(Id.Length() > 0 && Name.Length() > 0) - { - Result = UpdateTuneRequest(Id, TuneRequest, Name); - CHECK(Result); - } - } - else - { - CHECK(Result); - } TuneRequest.Release(); } } } ! ! // clear update pending flag ! m_UpdatePending = false; ! return S_OK; } ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log$ // Revision 1.9 2003/02/21 12:09:10 adcockj // Changed IGuideDataEvent functions to return immediately --- 1018,1113 ---- //CHECK(TuneRequest); ! CComPtr<IEnumGuideDataProperties> EnumServiceProperties; ! Result = m_GuideData->GetServiceProperties(TuneRequest, &EnumServiceProperties); ! CHECK(Result); ! ! CComBSTR Id; ! CComBSTR Name; ! ! Result = GetGuideDataProperty(EnumServiceProperties, L"Description.ID", Id); ! CHECK(Result); ! ! Result = GetGuideDataProperty(EnumServiceProperties, L"Description.Name", Name); ! CHECK(Result); ! ! Result = UpdateTuneRequest(Id, TuneRequest, Name); ! CHECK(Result); TuneRequest.Release(); } } } ! ! return Result; ! } ! ! HRESULT CTuneRequestStore::UpdateScheduleInfo() ! { ! HRESULT Result = S_OK; ! CComPtr<IEnumVARIANT> EnumScheduleEntries; ! ! Result = m_GuideData->GetScheduleEntryIDs(&EnumScheduleEntries); ! if(SUCCEEDED(Result)) ! { ! ULONG Items(0); ! CComVariant ScheduleID; ! ! while(SUCCEEDED(EnumScheduleEntries->Next(1, &ScheduleID, &Items))) ! { ! CComPtr<IEnumGuideDataProperties> EnumScheduleProperties; ! ! CComBSTR ServiceId; ! CComVariant ProgramId; ! ULONG StartTime; ! ULONG EndTime; ! ! Result = m_GuideData->GetScheduleEntryProperties(ScheduleID, &EnumScheduleProperties); ! CHECK(Result); ! ! Result = GetGuideDataProperty(EnumScheduleProperties, L"ScheduleEntry.ServiceID", ServiceId); ! CHECK(Result); ! ! Result = GetGuideDataProperty(EnumScheduleProperties, L"ScheduleEntry.ProgramID", ProgramId); ! CHECK(Result); ! ! Result = GetGuideDataProperty(EnumScheduleProperties, L"Time.Start", StartTime); ! CHECK(Result); ! ! Result = GetGuideDataProperty(EnumScheduleProperties, L"Time.End", EndTime); ! CHECK(Result); ! ! CComPtr<IEnumGuideDataProperties> EnumProgramProperties; ! ! Result = m_GuideData->GetProgramProperties(ProgramId, &EnumProgramProperties); ! CHECK(Result); ! ! CComBSTR Title; ! CComBSTR Description; ! ! Result = GetGuideDataProperty(EnumProgramProperties, L"Description.Title", Title); ! CHECK(Result); ! ! Result = GetGuideDataProperty(EnumProgramProperties, L"Description.One Sentence", Description); ! CHECK(Result); ! ! Result = UpdateScheduleInfo(ServiceId, ScheduleID.bstrVal, Title, Description, StartTime, EndTime); ! CHECK(Result); ! ! ScheduleID.Clear(); ! } ! } ! ! return Result; } + ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log$ + // Revision 1.10 2003/02/21 16:36:43 adcockj + // Added schedule functionality (untested) and some code clean up + // // Revision 1.9 2003/02/21 12:09:10 adcockj // Changed IGuideDataEvent functions to return immediately Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TuneRequestStore.h 21 Feb 2003 12:09:10 -0000 1.8 --- TuneRequestStore.h 21 Feb 2003 16:36:44 -0000 1.9 *************** *** 2,6 **** // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// --- 2,6 ---- // $Id$ ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that uses XML to persist tune requests // Copyright (c) 2003 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// *************** *** 51,56 **** public: - STDMETHOD(DetachFromTIF)(); - STDMETHOD(AttachToTIF)(/*[in]*/ IFilterGraph* pFilterGraph); // ITuneRequestStore STDMETHOD(get__NewEnum)(/*[out, retval]*/ IEnumTuneInfo** ppUnk); --- 51,54 ---- *************** *** 59,62 **** --- 57,62 ---- STDMETHOD(Save)(/*[in]*/ BSTR FileName); STDMETHOD(Load)(/*[in]*/ BSTR FileName); + STDMETHOD(DetachFromTIF)(); + STDMETHOD(AttachToTIF)(/*[in]*/ IFilterGraph* pFilterGraph); // IPropertyBag interface *************** *** 83,89 **** HRESULT UnpopulateDOMDocument(IErrorLog* pErrorLog, ITuneInfo** ppObject, const wchar_t* ObjectName); const wchar_t* MakeTagName(int ChannelIndex); HRESULT UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name); ! HRESULT UpdateProgramInfo(); ! private: typedef std::stack<xml::IXMLDOMElement*> ElementStack; --- 83,96 ---- HRESULT UnpopulateDOMDocument(IErrorLog* pErrorLog, ITuneInfo** ppObject, const wchar_t* ObjectName); const wchar_t* MakeTagName(int ChannelIndex); + void UpdateInfo(); + HRESULT UpdateServiceInfo(); + HRESULT UpdateScheduleInfo(); HRESULT UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name); ! HRESULT GetGuideDataProperty(IEnumGuideDataProperties* EnumGuideDataProperties, wchar_t* PropertyName, CComBSTR& PropertyValue); ! HRESULT GetGuideDataProperty(IEnumGuideDataProperties* EnumGuideDataProperties, wchar_t* PropertyName, CComVariant& PropertyValue); ! HRESULT GetGuideDataProperty(IEnumGuideDataProperties* EnumGuideDataProperties, wchar_t* PropertyName, ULONG& PropertyValue); ! HRESULT ConvertGPSTimeToDouble(ULONG GPSTime, double& DoubleTime); ! HRESULT UpdateScheduleInfo(BSTR ServiceId, BSTR ScheduleID, BSTR Title, BSTR Description, ULONG StartTime, ULONG EndTime); ! ITuneInfo* GetTuneInfo(BSTR ServiceId); private: typedef std::stack<xml::IXMLDOMElement*> ElementStack; |
From: <ad...@us...> - 2003-02-21 12:09:14
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv2144 Modified Files: TuneRequestStore.cpp TuneRequestStore.h Log Message: Changed IGuideDataEvent functions to return immediately Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TuneRequestStore.cpp 21 Feb 2003 11:46:34 -0000 1.8 --- TuneRequestStore.cpp 21 Feb 2003 12:09:10 -0000 1.9 *************** *** 9,13 **** // Copyright (c) Jörgen Sigvardsson // ! // This implementation include the following notice // // This code is heavily based on the excellent XML Property Bag implementation --- 9,13 ---- // Copyright (c) Jörgen Sigvardsson // ! // This implementation includes the following notice // // This code is heavily based on the excellent XML Property Bag implementation *************** *** 45,57 **** --- 45,83 ---- CTuneRequestStore::CTuneRequestStore() { + m_UpdatePending = false; } CTuneRequestStore::~CTuneRequestStore() { + // release our lock on the tif in case the user has forgotten + if(m_GuideData) + { + DetachFromTIF(); + } EmptyArray(); } + void CTuneRequestStore::EmptyArray() + { + for(int i(0); i < m_TuneInfos.size(); ++i) + { + if(m_TuneInfos[i] != NULL) + { + m_TuneInfos[i]->Release(); + m_TuneInfos[i] = NULL; + } + } + m_TuneInfos.empty(); + } + + /////////////////////////////////////////////////////////////////////////////// + // ITuneRequestStore Interface functions + /////////////////////////////////////////////////////////////////////////////// + STDMETHODIMP CTuneRequestStore::get__NewEnum(IEnumTuneInfo** ppUnk) { + // make sure we've got the latest info + UpdateProgramInfo(); + if (ppUnk == NULL) { *************** *** 81,84 **** --- 107,113 ---- STDMETHODIMP CTuneRequestStore::get_Item(long Index, ITuneInfo** pVal) { + // make sure we've got the latest info + UpdateProgramInfo(); + if (pVal == NULL) { *************** *** 100,103 **** --- 129,135 ---- STDMETHODIMP CTuneRequestStore::get_Count(long* pVal) { + // make sure we've got the latest info + UpdateProgramInfo(); + *pVal = m_TuneInfos.size(); return S_OK; *************** *** 106,110 **** STDMETHODIMP CTuneRequestStore::Load(BSTR FileName) { ! // This function is NOT reentrant if(m_doc != NULL) { --- 138,145 ---- STDMETHODIMP CTuneRequestStore::Load(BSTR FileName) { ! // *** Warning *** This function is NOT reentrant ! // so before changing this class to free threading this will ! // have to change ! if(m_doc != NULL) { *************** *** 160,164 **** STDMETHODIMP CTuneRequestStore::Save(BSTR FileName) { ! // This function is NOT reentrant if(m_doc != NULL) { --- 195,205 ---- STDMETHODIMP CTuneRequestStore::Save(BSTR FileName) { ! // make sure we've got the latest info ! UpdateProgramInfo(); ! ! // *** Warning *** This function is NOT reentrant ! // so before changing this class to free threading this will ! // have to change ! if(m_doc != NULL) { *************** *** 193,196 **** --- 234,310 ---- } + + STDMETHODIMP CTuneRequestStore::AttachToTIF(IFilterGraph* pFilterGraph) + { + if(m_ConnectionPoint != NULL) + { + DetachFromTIF(); + } + + m_FilterGraph = pFilterGraph; + HRESULT Result = S_OK; + + // declare local variables + CComPtr<IEnumFilters> EnumFilters; + + CComPtr<IConnectionPointContainer> ConnectionPointContainer; + + // find the Transport Information Filter in the filter graph + // we do this by looking for filters that + // implement the IGuideData interface + Result = pFilterGraph->EnumFilters(&EnumFilters); + if(SUCCEEDED(Result)) + { + CComPtr<IBaseFilter> BaseFilter; + ULONG Fetched(0); + while(SUCCEEDED(EnumFilters->Next(1, &BaseFilter, &Fetched))) + { + m_GuideData = BaseFilter; + if(m_GuideData != NULL) + { + CComQIPtr<IConnectionPointContainer> ConnectionPointContainer = m_GuideData; + if(ConnectionPointContainer != NULL) + { + // find the GuideDataEvent connection point + Result = ConnectionPointContainer->FindConnectionPoint(IID_IGuideDataEvent, &m_ConnectionPoint); + + // check if the connection point was found + if(SUCCEEDED(Result)) + { + // advise the GuideDataEvent object + Result = m_ConnectionPoint->Advise((IGuideDataEvent*)this, &m_GuideDataCookie); + return Result; + } + } + } + BaseFilter.Release(); + } + } + ATLTRACE("Failed to find TIF\n"); + return Result; + } + + STDMETHODIMP CTuneRequestStore::DetachFromTIF() + { + // make sure we've got the latest info + // since this is the last chance we have to talk to the TIF + UpdateProgramInfo(); + + // unadvise GuideDataEvent object + m_ConnectionPoint->Unadvise(m_GuideDataCookie); + + // release any objects we hold onto + m_ConnectionPoint.Release(); + m_GuideData.Release(); + m_FilterGraph.Release(); + + m_GuideDataCookie = 0; + + return S_OK; + } + + /////////////////////////////////////////////////////////////////////////////// + // XML storage functions + /////////////////////////////////////////////////////////////////////////////// STDMETHODIMP CTuneRequestStore::Read(LPCOLESTR pwszPropNameIn, VARIANT *pVar, IErrorLog *pErrorLog) { *************** *** 532,548 **** } - void CTuneRequestStore::EmptyArray() - { - for(int i(0); i < m_TuneInfos.size(); ++i) - { - if(m_TuneInfos[i] != NULL) - { - m_TuneInfos[i]->Release(); - m_TuneInfos[i] = NULL; - } - } - m_TuneInfos.empty(); - } - HRESULT CTuneRequestStore::PopulateDOMDocument(IUnknown* pObject, const wchar_t* ObjectName) { --- 646,649 ---- *************** *** 598,681 **** } ! STDMETHODIMP CTuneRequestStore::AttachToTIF(IFilterGraph* pFilterGraph) { ! if(m_ConnectionPoint != NULL) ! { ! DetachFromTIF(); ! } ! ! m_FilterGraph = pFilterGraph; ! HRESULT Result = S_OK; ! ! // declare local variables ! CComPtr<IEnumFilters> EnumFilters; ! ! CComPtr<IConnectionPointContainer> ConnectionPointContainer; ! ! // find the Transport Information Filter in the filter graph ! // we do this by looking for filters that ! // implement the IGuideData interface ! Result = pFilterGraph->EnumFilters(&EnumFilters); ! if(SUCCEEDED(Result)) ! { ! CComPtr<IBaseFilter> BaseFilter; ! ULONG Fetched(0); ! while(SUCCEEDED(EnumFilters->Next(1, &BaseFilter, &Fetched))) ! { ! m_GuideData = BaseFilter; ! if(m_GuideData != NULL) ! { ! CComQIPtr<IConnectionPointContainer> ConnectionPointContainer = m_GuideData; ! if(ConnectionPointContainer != NULL) ! { ! // find the GuideDataEvent connection point ! Result = ConnectionPointContainer->FindConnectionPoint(IID_IGuideDataEvent, &m_ConnectionPoint); ! // check if the connection point was found ! if(SUCCEEDED(Result)) ! { ! // advise the GuideDataEvent object ! Result = m_ConnectionPoint->Advise((IGuideDataEvent*)this, &m_GuideDataCookie); ! return Result; ! } ! } ! } ! BaseFilter.Release(); ! } ! } ! ATLTRACE("Failed to find TIF\n"); ! return Result; } ! STDMETHODIMP CTuneRequestStore::DetachFromTIF() { ! // unadvise GuideDataEvent object ! m_ConnectionPoint->Unadvise(m_GuideDataCookie); ! // release any objects we hold onto ! m_ConnectionPoint.Release(); ! m_GuideData.Release(); ! m_FilterGraph.Release(); ! m_GuideDataCookie = 0; return S_OK; } ! STDMETHODIMP CTuneRequestStore::GuideDataAcquired(void) { ! ATLTRACE("GuideDataAcquired\n"); return S_OK; } ! STDMETHODIMP CTuneRequestStore::ProgramChanged(VARIANT varProgramDescriptionID) { HRESULT Result = S_OK; ! ATLTRACE("ProgramChanged\n"); CComQIPtr<ITuneRequestInfo> TuneRequestInfo = m_GuideData; ! if(varProgramDescriptionID.vt == VT_EMPTY && ! m_GuideData != NULL && ! TuneRequestInfo != NULL) { CComPtr<IEnumTuneRequests> EnumTuneRequests; --- 699,817 ---- } ! /////////////////////////////////////////////////////////////////////////////// ! // IGuideDataEvent Interface implementation ! // **** Start of warning **** ! // These functions all block the TIF so should ! // return quickly. You may get problems even by putting breakpoints ! // in these functions, so be careful ! /////////////////////////////////////////////////////////////////////////////// ! STDMETHODIMP CTuneRequestStore::GuideDataAcquired(void) { ! ATLTRACE("GuideDataAcquired\n"); ! m_UpdatePending = true; ! return S_OK; ! } ! STDMETHODIMP CTuneRequestStore::ProgramChanged(VARIANT varProgramDescriptionID) ! { ! ATLTRACE("ProgramChanged\n"); ! m_UpdatePending = true; ! return S_OK; } ! STDMETHODIMP CTuneRequestStore::ServiceChanged(VARIANT varServiceDescriptionID) { ! ATLTRACE("ServiceChanged\n"); ! m_UpdatePending = true; ! return S_OK; ! } ! STDMETHODIMP CTuneRequestStore::ScheduleEntryChanged(VARIANT varScheduleEntryDescriptionID) ! { ! ATLTRACE("ScheduleEntryChanged\n"); ! m_UpdatePending = true; ! return S_OK; ! } ! STDMETHODIMP CTuneRequestStore::ProgramDeleted(VARIANT varProgramDescriptionID) ! { ! ATLTRACE("ProgramDeleted\n"); ! m_UpdatePending = true; ! return S_OK; ! } + STDMETHODIMP CTuneRequestStore::ServiceDeleted(VARIANT varServiceDescriptionID) + { + ATLTRACE("ServiceDeleted\n"); + m_UpdatePending = true; return S_OK; } ! STDMETHODIMP CTuneRequestStore::ScheduleDeleted(VARIANT varScheduleEntryDescriptionID) { ! ATLTRACE("ScheduleDeleted\n"); ! m_UpdatePending = true; return S_OK; } ! /////////////////////////////////////////////////////////////////////////////// ! // **** End of warning **** ! /////////////////////////////////////////////////////////////////////////////// ! ! /////////////////////////////////////////////////////////////////////////////// ! // Tuning Information maintenance routines ! /////////////////////////////////////////////////////////////////////////////// ! ! HRESULT CTuneRequestStore::UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name) { HRESULT Result = S_OK; ! ! for(int i(0); i < m_TuneInfos.size(); ++i) ! { ! if(m_TuneInfos[i] != NULL) ! { ! CComBSTR Id2; ! Result = m_TuneInfos[i]->get_UniqueID(&Id2); ! CHECK(Result); ! ! if(Id2 == Id) ! { ! Result = m_TuneInfos[i]->put_TuneRequest(TuneRequest); ! return Result; ! } ! } ! } ! ! // if we get down here then the Tune Request is new so lets add it ! // to our list with the name given by the broadcaster ! CComObject<CTuneInfo>* pTuneInfo = new CComObject<CTuneInfo>; ! pTuneInfo->AddRef(); ! ! Result = pTuneInfo->put_UniqueID(Id); ! CHECK(Result); ! Result = pTuneInfo->put_Description(Name); ! CHECK(Result); ! Result = pTuneInfo->put_KeyedNumber(m_TuneInfos.size() + 1); ! CHECK(Result); ! Result = pTuneInfo->put_TuneRequest(TuneRequest); ! CHECK(Result); ! ! m_TuneInfos.push_back(pTuneInfo); ! ! return Result; ! } ! ! HRESULT CTuneRequestStore::UpdateProgramInfo() ! { ! HRESULT Result = S_OK; ! ! if(m_GuideData == NULL || m_UpdatePending == false) ! { ! return S_OK; ! } ! CComQIPtr<ITuneRequestInfo> TuneRequestInfo = m_GuideData; ! if(TuneRequestInfo != NULL) { CComPtr<IEnumTuneRequests> EnumTuneRequests; *************** *** 745,818 **** } } - return S_OK; - } - - STDMETHODIMP CTuneRequestStore::ServiceChanged(VARIANT varServiceDescriptionID) - { - ATLTRACE("ServiceChanged\n"); - return S_OK; - } - - STDMETHODIMP CTuneRequestStore::ScheduleEntryChanged(VARIANT varScheduleEntryDescriptionID) - { - ATLTRACE("ScheduleEntryChanged\n"); - return S_OK; - } - - STDMETHODIMP CTuneRequestStore::ProgramDeleted(VARIANT varProgramDescriptionID) - { - ATLTRACE("ProgramDeleted\n"); - return S_OK; - } - - STDMETHODIMP CTuneRequestStore::ServiceDeleted(VARIANT varServiceDescriptionID) - { - ATLTRACE("ServiceDeleted\n"); - return S_OK; - } - - STDMETHODIMP CTuneRequestStore::ScheduleDeleted(VARIANT varScheduleEntryDescriptionID) - { - ATLTRACE("ScheduleDeleted\n"); - return S_OK; - } - - HRESULT CTuneRequestStore::UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name) - { - HRESULT Result = S_OK; ! for(int i(0); i < m_TuneInfos.size(); ++i) ! { ! if(m_TuneInfos[i] != NULL) ! { ! CComBSTR Id2; ! Result = m_TuneInfos[i]->get_UniqueID(&Id2); ! CHECK(Result); ! ! if(Id2 == Id) ! { ! Result = m_TuneInfos[i]->put_TuneRequest(TuneRequest); ! return Result; ! } ! } ! } ! ! // if we get down here then the Tune Request is new so lets add it ! // to our list with the name given by the broadcaster ! CComObject<CTuneInfo>* pTuneInfo = new CComObject<CTuneInfo>; ! pTuneInfo->AddRef(); ! ! Result = pTuneInfo->put_UniqueID(Id); ! CHECK(Result); ! Result = pTuneInfo->put_Description(Name); ! CHECK(Result); ! Result = pTuneInfo->put_KeyedNumber(m_TuneInfos.size() + 1); ! CHECK(Result); ! Result = pTuneInfo->put_TuneRequest(TuneRequest); ! CHECK(Result); ! ! m_TuneInfos.push_back(pTuneInfo); ! ! return Result; } --- 881,888 ---- } } ! // clear update pending flag ! m_UpdatePending = false; ! return S_OK; } *************** *** 821,824 **** --- 891,897 ---- // // $Log$ + // Revision 1.9 2003/02/21 12:09:10 adcockj + // Changed IGuideDataEvent functions to return immediately + // // Revision 1.8 2003/02/21 11:46:34 adcockj // Changed Attach and Detach function names Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TuneRequestStore.h 21 Feb 2003 11:46:34 -0000 1.7 --- TuneRequestStore.h 21 Feb 2003 12:09:10 -0000 1.8 *************** *** 84,87 **** --- 84,88 ---- const wchar_t* MakeTagName(int ChannelIndex); HRESULT UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name); + HRESULT UpdateProgramInfo(); private: *************** *** 98,101 **** --- 99,103 ---- DWORD m_GuideDataCookie; std::vector<ITuneInfo*> m_TuneInfos; + bool m_UpdatePending; }; |
From: <ad...@us...> - 2003-02-21 11:48:00
|
Update of /cvsroot/bdadev/SimpleTV In directory sc8-pr-cvs1:/tmp/cvs-serv26150 Modified Files: SIMPLETV.CPP Log Message: Changed Attach and Detach function names Index: SIMPLETV.CPP =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SIMPLETV.CPP,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SIMPLETV.CPP 20 Feb 2003 07:52:45 -0000 1.5 --- SIMPLETV.CPP 21 Feb 2003 11:47:57 -0000 1.6 *************** *** 1079,1083 **** if (Result == S_OK) { ! Result = Application->TuneRequestStore->AttachTIF((TUNEREQSTORELib::IFilterGraph *)Application->FilterGraph); BSTR FileName = SysAllocString(L"Channels.xml"); --- 1079,1083 ---- if (Result == S_OK) { ! Result = Application->TuneRequestStore->AttachToTIF((TUNEREQSTORELib::IFilterGraph *)Application->FilterGraph); BSTR FileName = SysAllocString(L"Channels.xml"); *************** *** 1113,1118 **** if (Application->TuneRequestStore) { ! Application->TuneRequestStore->DetachTIF(); ! Application->TuneRequestStore.Release(); } --- 1113,1118 ---- if (Application->TuneRequestStore) { ! Application->TuneRequestStore->DetachFromTIF(); ! Application->TuneRequestStore->Release(); } *************** *** 2737,2740 **** --- 2737,2743 ---- // // $Log$ + // Revision 1.6 2003/02/21 11:47:57 adcockj + // Changed Attach and Detach function names + // // Revision 1.5 2003/02/20 07:52:45 adcockj // Fixes for new channel store and some reformatting |
From: <ad...@us...> - 2003-02-21 11:46:37
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv25776 Modified Files: TuneReqStore.idl TuneRequestStore.cpp TuneRequestStore.h Log Message: Changed Attach and Detach function names Index: TuneReqStore.idl =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.idl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneReqStore.idl 20 Feb 2003 17:39:38 -0000 1.4 --- TuneReqStore.idl 21 Feb 2003 11:46:34 -0000 1.5 *************** *** 107,112 **** [id(2), helpstring("method Load")] HRESULT Load([in] BSTR FileName); [id(3), helpstring("method Save")] HRESULT Save([in] BSTR FileName); ! [id(4), helpstring("method AttachTIF")] HRESULT AttachTIF([in] IFilterGraph* pFilterGraph); ! [id(5), helpstring("method DetachTIF")] HRESULT DetachTIF(); }; --- 107,112 ---- [id(2), helpstring("method Load")] HRESULT Load([in] BSTR FileName); [id(3), helpstring("method Save")] HRESULT Save([in] BSTR FileName); ! [id(4), helpstring("method AttachToTIF")] HRESULT AttachToTIF([in] IFilterGraph* pFilterGraph); ! [id(5), helpstring("method DetachFromTIF")] HRESULT DetachFromTIF(); }; *************** *** 152,155 **** --- 152,158 ---- // // $Log$ + // Revision 1.5 2003/02/21 11:46:34 adcockj + // Changed Attach and Detach function names + // // Revision 1.4 2003/02/20 17:39:38 adcockj // Interim Check in of Schedule storage Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TuneRequestStore.cpp 21 Feb 2003 07:55:12 -0000 1.7 --- TuneRequestStore.cpp 21 Feb 2003 11:46:34 -0000 1.8 *************** *** 598,606 **** } ! STDMETHODIMP CTuneRequestStore::AttachTIF(IFilterGraph* pFilterGraph) { if(m_ConnectionPoint != NULL) { ! DetachTIF(); } --- 598,606 ---- } ! STDMETHODIMP CTuneRequestStore::AttachToTIF(IFilterGraph* pFilterGraph) { if(m_ConnectionPoint != NULL) { ! DetachFromTIF(); } *************** *** 648,652 **** } ! STDMETHODIMP CTuneRequestStore::DetachTIF() { // unadvise GuideDataEvent object --- 648,652 ---- } ! STDMETHODIMP CTuneRequestStore::DetachFromTIF() { // unadvise GuideDataEvent object *************** *** 821,824 **** --- 821,827 ---- // // $Log$ + // Revision 1.8 2003/02/21 11:46:34 adcockj + // Changed Attach and Detach function names + // // Revision 1.7 2003/02/21 07:55:12 adcockj // Fixes for loading saved xml Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TuneRequestStore.h 21 Feb 2003 07:55:12 -0000 1.6 --- TuneRequestStore.h 21 Feb 2003 11:46:34 -0000 1.7 *************** *** 51,56 **** public: ! STDMETHOD(DetachTIF)(); ! STDMETHOD(AttachTIF)(/*[in]*/ IFilterGraph* pFilterGraph); // ITuneRequestStore STDMETHOD(get__NewEnum)(/*[out, retval]*/ IEnumTuneInfo** ppUnk); --- 51,56 ---- public: ! STDMETHOD(DetachFromTIF)(); ! STDMETHOD(AttachToTIF)(/*[in]*/ IFilterGraph* pFilterGraph); // ITuneRequestStore STDMETHOD(get__NewEnum)(/*[out, retval]*/ IEnumTuneInfo** ppUnk); |
From: <ad...@us...> - 2003-02-21 07:55:16
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv31163 Modified Files: TuneRequestStore.cpp TuneRequestStore.h Log Message: Fixes for loading saved xml Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TuneRequestStore.cpp 20 Feb 2003 07:53:39 -0000 1.6 --- TuneRequestStore.cpp 21 Feb 2003 07:55:12 -0000 1.7 *************** *** 119,130 **** HRESULT hr; ! hr = m_doc->load(CComVariant(FileName), &b); if(FAILED(hr)) { m_doc.Release(); ! return hr; } if(VARIANT_FALSE == b) { --- 119,141 ---- HRESULT hr; ! hr = m_doc->load(CComVariant(FileName), &b); if(FAILED(hr)) { + // can't find the file, this is OK m_doc.Release(); ! return S_OK; } + hr = m_doc->selectSingleNode(CComBSTR("ChannelList"), &m_TopNode); + CHECK(hr); + + if(m_TopNode == NULL) + { + m_doc.Release(); + return E_FAIL; + } + + if(VARIANT_FALSE == b) { *************** *** 134,139 **** int i(0); ! while(SUCCEEDED(UnpopulateDOMDocument(NULL, &m_TuneInfos[i], MakeTagName(i)))); { ++i; } --- 145,153 ---- int i(0); ! ITuneInfo* NewTuneInfo = NULL; ! while(SUCCEEDED(UnpopulateDOMDocument(NULL, &NewTuneInfo, MakeTagName(i)))) { + m_TuneInfos.push_back(NewTuneInfo); + NewTuneInfo = NULL; ++i; } *************** *** 156,160 **** HRESULT hr; ! CHECK(m_doc->createElement(CComBSTR("ChannelList"), &m_TopNode)); for(int i(0); i < m_TuneInfos.size(); ++i) --- 170,174 ---- HRESULT hr; ! CHECK(m_doc->createElement(CComBSTR("ChannelList"), &m_TopElement)); for(int i(0); i < m_TuneInfos.size(); ++i) *************** *** 170,174 **** } ! m_doc->appendChild(m_TopNode,0); hr = m_doc->save(CComVariant(FileName)); --- 184,188 ---- } ! m_doc->appendChild(m_TopElement,0); hr = m_doc->save(CComVariant(FileName)); *************** *** 546,550 **** CHECK(PersistObject(spPersistObj)); ! CHECK(m_TopNode->appendChild(m_stackElems.top(), 0)); m_stackElems.pop(); --- 560,564 ---- CHECK(PersistObject(spPersistObj)); ! CHECK(m_TopElement->appendChild(m_stackElems.top(), 0)); m_stackElems.pop(); *************** *** 558,562 **** { CComPtr<xml::IXMLDOMNode> node; ! CHECK(m_doc->selectSingleNode(CComBSTR(L"//Object"), &node)); if(node == NULL) --- 572,576 ---- { CComPtr<xml::IXMLDOMNode> node; ! CHECK(m_TopNode->selectSingleNode(CComBSTR(ObjectName), &node)); if(node == NULL) *************** *** 705,709 **** Id = (BSTR)Variant.bstrVal; } ! else if(PropertyName != NULL && wcsicmp(PropertyName, L"Provider.Name") == 0) { CComVariant Variant; --- 719,723 ---- Id = (BSTR)Variant.bstrVal; } ! else if(PropertyName != NULL && wcsicmp(PropertyName, L"Description.Name") == 0) { CComVariant Variant; *************** *** 737,741 **** { ATLTRACE("ServiceChanged\n"); - ProgramChanged(varServiceDescriptionID); return S_OK; } --- 751,754 ---- *************** *** 808,811 **** --- 821,827 ---- // // $Log$ + // Revision 1.7 2003/02/21 07:55:12 adcockj + // Fixes for loading saved xml + // // Revision 1.6 2003/02/20 07:53:39 adcockj // Fixes to crashing problems Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TuneRequestStore.h 20 Feb 2003 07:53:39 -0000 1.5 --- TuneRequestStore.h 21 Feb 2003 07:55:12 -0000 1.6 *************** *** 91,95 **** typedef CComEnumOnSTL<IEnumTuneInfo, &IID_IEnumTuneInfo, ITuneInfo*, _Copy<ITuneInfo*>, std::vector<ITuneInfo*> > ComSTLEnum; CComPtr<xml::IXMLDOMDocument> m_doc; ! CComPtr<xml::IXMLDOMElement> m_TopNode; CComPtr<IFilterGraph> m_FilterGraph; CComPtr<IConnectionPoint> m_ConnectionPoint; --- 91,96 ---- typedef CComEnumOnSTL<IEnumTuneInfo, &IID_IEnumTuneInfo, ITuneInfo*, _Copy<ITuneInfo*>, std::vector<ITuneInfo*> > ComSTLEnum; CComPtr<xml::IXMLDOMDocument> m_doc; ! CComPtr<xml::IXMLDOMElement> m_TopElement; ! CComPtr<xml::IXMLDOMNode> m_TopNode; CComPtr<IFilterGraph> m_FilterGraph; CComPtr<IConnectionPoint> m_ConnectionPoint; |
From: <ad...@us...> - 2003-02-20 17:40:39
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv11172 Added Files: ProgramInfo.cpp ProgramInfo.h ProgramInfo.rgs Log Message: Initial Checkin --- NEW FILE: ProgramInfo.cpp --- // ProgramInfo.cpp : Implementation of CProgramInfo #include "stdafx.h" #include "TuneReqStore.h" #include "ProgramInfo.h" ///////////////////////////////////////////////////////////////////////////// // CProgramInfo CProgramInfo::CProgramInfo() { m_bRequiresSave = TRUE; } CProgramInfo::~CProgramInfo() { } STDMETHODIMP CProgramInfo::get_Name(BSTR *pVal) { m_Name.CopyTo(pVal); return S_OK; } STDMETHODIMP CProgramInfo::put_Name(BSTR newVal) { m_Name = newVal; return S_OK; } STDMETHODIMP CProgramInfo::get_Description(BSTR *pVal) { m_Description.CopyTo(pVal); return S_OK; } STDMETHODIMP CProgramInfo::put_Description(BSTR newVal) { m_Description = newVal; return S_OK; } STDMETHODIMP CProgramInfo::get_Id(BSTR *pVal) { m_Id.CopyTo(pVal); return S_OK; } STDMETHODIMP CProgramInfo::put_Id(BSTR newVal) { m_Id = newVal; return S_OK; } --- NEW FILE: ProgramInfo.h --- // ProgramInfo.h : Declaration of the CProgramInfo #ifndef __PROGRAMINFO_H_ #define __PROGRAMINFO_H_ #include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CProgramInfo class ATL_NO_VTABLE CProgramInfo : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CProgramInfo, &CLSID_ProgramInfo>, public IPersistPropertyBagImpl<CProgramInfo>, public IDispatchImpl<IProgramInfo, &IID_IProgramInfo, &LIBID_TUNEREQSTORELib> { public: CProgramInfo(); ~CProgramInfo(); DECLARE_REGISTRY_RESOURCEID(IDR_PROGRAMINFO) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CProgramInfo) COM_INTERFACE_ENTRY(IProgramInfo) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(IPersistPropertyBag) END_COM_MAP() BEGIN_PROP_MAP(CProgramInfo) PROP_ENTRY("Name", 1, CLSID_NULL) PROP_ENTRY("Description", 2, CLSID_NULL) PROP_ENTRY("Id", 3, CLSID_NULL) END_PROP_MAP() // IProgramInfo public: STDMETHOD(get_Id)(/*[out, retval]*/ BSTR *pVal); STDMETHOD(put_Id)(/*[in]*/ BSTR newVal); STDMETHOD(get_Description)(/*[out, retval]*/ BSTR *pVal); STDMETHOD(put_Description)(/*[in]*/ BSTR newVal); STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal); STDMETHOD(put_Name)(/*[in]*/ BSTR newVal); unsigned m_bRequiresSave:1; private: CComBSTR m_Id; CComBSTR m_Description; CComBSTR m_Name; }; #endif //__PROGRAMINFO_H_ --- NEW FILE: ProgramInfo.rgs --- HKCR { TuneReqStore.ProgramInfo.1 = s 'ProgramInfo Class' { CLSID = s '{5DACDF4E-4422-11D7-B840-0002A5623377}' } TuneReqStore.ProgramInfo = s 'ProgramInfo Class' { CLSID = s '{5DACDF4E-4422-11D7-B840-0002A5623377}' CurVer = s 'TuneReqStore.ProgramInfo.1' } NoRemove CLSID { ForceRemove {5DACDF4E-4422-11D7-B840-0002A5623377} = s 'ProgramInfo Class' { ProgID = s 'TuneReqStore.ProgramInfo.1' VersionIndependentProgID = s 'TuneReqStore.ProgramInfo' ForceRemove 'Programmable' InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } 'TypeLib' = s '{23F0B0F5-426E-11D7-B840-0002A5623377}' } } } |
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv10535 Modified Files: TuneInfo.cpp TuneInfo.h TuneReqStore.cpp TuneReqStore.dsp TuneReqStore.idl TuneReqStore.rc resource.h Log Message: Interim Check in of Schedule storage Index: TuneInfo.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneInfo.cpp 20 Feb 2003 07:53:39 -0000 1.3 --- TuneInfo.cpp 20 Feb 2003 17:39:37 -0000 1.4 *************** *** 26,29 **** --- 26,43 ---- // CTuneInfo + CTuneInfo::CTuneInfo() + { + m_TuneRequest = NULL; + m_bRequiresSave = TRUE; + } + + CTuneInfo::~CTuneInfo() + { + if(m_TuneRequest != NULL) + { + m_TuneRequest->Release(); + } + m_bRequiresSave = TRUE; + } STDMETHODIMP CTuneInfo::get_TuneRequest(ITuneRequest **pVal) *************** *** 84,91 **** --- 98,148 ---- } + STDMETHODIMP CTuneInfo::get_ProgramInfomation(IEnumProgramInfo **pVal) + { + if (pVal == NULL) + { + return E_POINTER; + } + + *pVal = NULL; + + CComObject<ComSTLEnum>* pEnum = NULL; + CHECK(CComObject<ComSTLEnum>::CreateInstance(&pEnum)); + + HRESULT hr = pEnum->Init((ITuneInfo*)this, m_ProgramInfos); + + if (SUCCEEDED(hr)) + { + hr = pEnum->QueryInterface(pVal); + } + + if (FAILED(hr)) + { + delete pEnum; + } + + return hr; + } + + void CTuneInfo::EmptyArray() + { + for(int i(0); i < m_ProgramInfos.size(); ++i) + { + if(m_ProgramInfos[i] != NULL) + { + m_ProgramInfos[i]->Release(); + m_ProgramInfos[i] = NULL; + } + } + m_ProgramInfos.empty(); + } + ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log$ + // Revision 1.4 2003/02/20 17:39:37 adcockj + // Interim Check in of Schedule storage + // // Revision 1.3 2003/02/20 07:53:39 adcockj // Fixes to crashing problems *************** *** 95,96 **** --- 152,154 ---- // ///////////////////////////////////////////////////////////////////////////// + Index: TuneInfo.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneInfo.h 20 Feb 2003 09:25:05 -0000 1.4 --- TuneInfo.h 20 Feb 2003 17:39:38 -0000 1.5 *************** *** 33,50 **** { public: ! CTuneInfo() ! { ! m_TuneRequest = NULL; ! m_bRequiresSave = TRUE; ! } ! ! ~CTuneInfo() ! { ! if(m_TuneRequest != NULL) ! { ! m_TuneRequest->Release(); ! } ! m_bRequiresSave = TRUE; ! } DECLARE_REGISTRY_RESOURCEID(IDR_TUNEINFO) --- 33,38 ---- { public: ! CTuneInfo(); ! ~CTuneInfo(); DECLARE_REGISTRY_RESOURCEID(IDR_TUNEINFO) *************** *** 68,71 **** --- 56,60 ---- // ITuneInfo public: + STDMETHOD(get_ProgramInfomation)(/*[out, retval]*/ IEnumProgramInfo* *pVal); STDMETHOD(get_KeyedNumber)(/*[out, retval]*/ long *pVal); STDMETHOD(put_KeyedNumber)(/*[in]*/ long newVal); *************** *** 79,82 **** --- 68,78 ---- private: + void EmptyArray(); + + private: + typedef CComEnumOnSTL<IEnumProgramInfo, &IID_IEnumProgramInfo, IProgramInfo*, _Copy<IProgramInfo*>, std::vector<IProgramInfo*> > ComSTLEnum; + + std::vector<IProgramInfo*> m_ProgramInfos; + ITuneRequest* m_TuneRequest; CComBSTR m_Description; Index: TuneReqStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneReqStore.cpp 19 Feb 2003 17:21:42 -0000 1.3 --- TuneReqStore.cpp 20 Feb 2003 17:39:38 -0000 1.4 *************** *** 31,34 **** --- 31,35 ---- #include "TuneRequestStore.h" #include "TuneInfo.h" + #include "ProgramInfo.h" *************** *** 38,41 **** --- 39,43 ---- OBJECT_ENTRY(CLSID_TuneRequestStore, CTuneRequestStore) OBJECT_ENTRY(CLSID_TuneInfo, CTuneInfo) + OBJECT_ENTRY(CLSID_ProgramInfo, CProgramInfo) END_OBJECT_MAP() *************** *** 93,96 **** --- 95,101 ---- // // $Log$ + // Revision 1.4 2003/02/20 17:39:38 adcockj + // Interim Check in of Schedule storage + // // Revision 1.3 2003/02/19 17:21:42 adcockj // removed midl generated file Index: TuneReqStore.dsp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneReqStore.dsp 19 Feb 2003 15:26:30 -0000 1.4 --- TuneReqStore.dsp 20 Feb 2003 17:39:38 -0000 1.5 *************** *** 112,115 **** --- 112,119 ---- # Begin Source File + SOURCE=.\ProgramInfo.cpp + # End Source File + # Begin Source File + SOURCE=.\StdAfx.cpp # ADD CPP /Yc"stdafx.h" *************** *** 130,144 **** SOURCE=.\TuneReqStore.idl - - !IF "$(CFG)" == "TuneReqStore - Win32 Debug" - - # ADD MTL /tlb ".\TuneReqStore.tlb" /h "TuneReqStore.h" /iid "TuneReqStore_i.c" /Oicf - - !ELSEIF "$(CFG)" == "TuneReqStore - Win32 Release" - # ADD MTL /tlb ".\TuneReqStore.tlb" /h "TuneReqStore.h" /iid "TuneReqStore_i.c" /Oicf - - !ENDIF - # End Source File # Begin Source File --- 134,138 ---- *************** *** 156,159 **** --- 150,157 ---- # Begin Source File + SOURCE=.\ProgramInfo.h + # End Source File + # Begin Source File + SOURCE=.\Resource.h # End Source File *************** *** 174,177 **** --- 172,179 ---- # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + # Begin Source File + + SOURCE=.\ProgramInfo.rgs + # End Source File # Begin Source File Index: TuneReqStore.idl =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.idl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneReqStore.idl 19 Feb 2003 17:21:43 -0000 1.3 --- TuneReqStore.idl 20 Feb 2003 17:39:38 -0000 1.4 *************** *** 27,30 **** --- 27,61 ---- [ object, + uuid(5DACDF4D-4422-11D7-B840-0002A5623377), + dual, + helpstring("IProgramInfo Interface"), + pointer_default(unique) + ] + interface IProgramInfo : IDispatch + { + [propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal); + [propput, id(1), helpstring("property Name")] HRESULT Name([in] BSTR newVal); + [propget, id(2), helpstring("property Description")] HRESULT Description([out, retval] BSTR *pVal); + [propput, id(2), helpstring("property Description")] HRESULT Description([in] BSTR newVal); + [propget, id(3), helpstring("property Id")] HRESULT Id([out, retval] BSTR *pVal); + [propput, id(3), helpstring("property Id")] HRESULT Id([in] BSTR newVal); + }; + + [ + object, + uuid(211E1F12-44D6-11d7-B840-0002A5623377), + helpstring("Enumerate Program Information."), + pointer_default(unique) + ] + interface IEnumProgramInfo : IUnknown + { + HRESULT Next([in] unsigned long celt, [out] IProgramInfo **ppprop, [out] unsigned long *pcelt); + HRESULT Skip([in] unsigned long celt); + HRESULT Reset(); + HRESULT Clone([out] IEnumProgramInfo **ppenum); + } + + [ + object, uuid(603A3F81-4325-11D7-B840-0002A5623377), dual, *************** *** 43,46 **** --- 74,78 ---- [propget, id(4), helpstring("property KeyedNumber")] HRESULT KeyedNumber([out, retval] long *pVal); [propput, id(4), helpstring("property KeyedNumber")] HRESULT KeyedNumber([in] long newVal); + [propget, id(5), helpstring("property ProgramInfomation")] HRESULT ProgramInfomation([out, retval] IEnumProgramInfo* *pVal); }; *************** *** 106,109 **** --- 138,149 ---- [default] interface ITuneInfo; }; + [ + uuid(5DACDF4E-4422-11D7-B840-0002A5623377), + helpstring("ProgramInfo Class") + ] + coclass ProgramInfo + { + [default] interface IProgramInfo; + }; }; *************** *** 112,115 **** --- 152,158 ---- // // $Log$ + // Revision 1.4 2003/02/20 17:39:38 adcockj + // Interim Check in of Schedule storage + // // Revision 1.3 2003/02/19 17:21:43 adcockj // removed midl generated file Index: TuneReqStore.rc =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneReqStore.rc 19 Feb 2003 15:05:19 -0000 1.2 --- TuneReqStore.rc 20 Feb 2003 17:39:38 -0000 1.3 *************** *** 121,124 **** --- 121,125 ---- IDR_TUNEREQUESTSTORE REGISTRY DISCARDABLE "TuneRequestStore.rgs" IDR_TUNEINFO REGISTRY DISCARDABLE "TuneInfo.rgs" + IDR_PROGRAMINFO REGISTRY DISCARDABLE "ProgramInfo.rgs" #endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// Index: resource.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/resource.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** resource.h 19 Feb 2003 15:05:20 -0000 1.2 --- resource.h 20 Feb 2003 17:39:39 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- #define IDR_TUNEREQUESTSTORE 101 #define IDR_TUNEINFO 102 + #define IDR_PROGRAMINFO 103 // Next default values for new objects *************** *** 14,18 **** #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 ! #define _APS_NEXT_SYMED_VALUE 103 #endif #endif --- 15,19 ---- #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 ! #define _APS_NEXT_SYMED_VALUE 104 #endif #endif |
From: <ad...@us...> - 2003-02-20 09:25:09
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv18558 Modified Files: TuneInfo.h Log Message: Fixed problem with saving properties on ITuneInfo Index: TuneInfo.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneInfo.h 20 Feb 2003 07:53:39 -0000 1.3 --- TuneInfo.h 20 Feb 2003 09:25:05 -0000 1.4 *************** *** 59,66 **** BEGIN_PROP_MAP(CTuneInfo) ! PROP_DATA_ENTRY("TuneRequest", m_TuneRequest, VT_UNKNOWN) ! PROP_DATA_ENTRY("Description", m_Description, VT_BSTR) ! PROP_DATA_ENTRY("UniqueID", m_UniqueID, VT_BSTR) ! PROP_DATA_ENTRY("KeyedNumber", m_KeyedNumber, VT_I4) END_PROP_MAP() --- 59,66 ---- BEGIN_PROP_MAP(CTuneInfo) ! PROP_ENTRY("TuneRequest", 1, CLSID_NULL) ! PROP_ENTRY("Description", 2, CLSID_NULL) ! PROP_ENTRY("UniqueID", 3, CLSID_NULL) ! PROP_ENTRY("KeyedNumber", 4, CLSID_NULL) END_PROP_MAP() |
From: <ad...@us...> - 2003-02-20 07:53:42
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv15991 Modified Files: StdAfx.h TuneInfo.cpp TuneInfo.h TuneRequestStore.cpp TuneRequestStore.h Log Message: Fixes to crashing problems Index: StdAfx.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/StdAfx.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StdAfx.h 19 Feb 2003 15:05:08 -0000 1.2 --- StdAfx.h 20 Feb 2003 07:53:39 -0000 1.3 *************** *** 36,40 **** #include <vector> ! #define CHECK(x) { HRESULT __hr(x); if(FAILED(__hr)) {ATLTRACE(#x " Returned %8x\n", __hr); return __hr;}} #import "msxml.dll" rename_namespace("xml") raw_interfaces_only no_implementation --- 36,41 ---- #include <vector> ! #define CHECK(x) { HRESULT __hr(x); if(FAILED(__hr)) {ATLTRACE(#x " Returned %8x\n", __hr); _asm{int 3}; return __hr;}} ! //void CHECK(HRESULT hr); #import "msxml.dll" rename_namespace("xml") raw_interfaces_only no_implementation Index: TuneInfo.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneInfo.cpp 19 Feb 2003 17:21:42 -0000 1.2 --- TuneInfo.cpp 20 Feb 2003 07:53:39 -0000 1.3 *************** *** 30,34 **** { *pVal = m_TuneRequest; ! (*pVal)->AddRef(); return S_OK; --- 30,37 ---- { *pVal = m_TuneRequest; ! if(m_TuneRequest != NULL) ! { ! (*pVal)->AddRef(); ! } return S_OK; *************** *** 38,41 **** --- 41,48 ---- { m_TuneRequest = newVal; + if(m_TuneRequest != NULL) + { + m_TuneRequest->AddRef(); + } return S_OK; } *************** *** 81,84 **** --- 88,94 ---- // // $Log$ + // Revision 1.3 2003/02/20 07:53:39 adcockj + // Fixes to crashing problems + // // Revision 1.2 2003/02/19 17:21:42 adcockj // removed midl generated file Index: TuneInfo.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneInfo.h 19 Feb 2003 17:21:42 -0000 1.2 --- TuneInfo.h 20 Feb 2003 07:53:39 -0000 1.3 *************** *** 35,38 **** --- 35,48 ---- CTuneInfo() { + m_TuneRequest = NULL; + m_bRequiresSave = TRUE; + } + + ~CTuneInfo() + { + if(m_TuneRequest != NULL) + { + m_TuneRequest->Release(); + } m_bRequiresSave = TRUE; } *************** *** 45,48 **** --- 55,59 ---- COM_INTERFACE_ENTRY(ITuneInfo) COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(IPersistPropertyBag) END_COM_MAP() *************** *** 68,72 **** private: ! CComPtr<ITuneRequest> m_TuneRequest; CComBSTR m_Description; CComBSTR m_UniqueID; --- 79,83 ---- private: ! ITuneRequest* m_TuneRequest; CComBSTR m_Description; CComBSTR m_UniqueID; Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TuneRequestStore.cpp 19 Feb 2003 17:21:43 -0000 1.5 --- TuneRequestStore.cpp 20 Feb 2003 07:53:39 -0000 1.6 *************** *** 560,563 **** --- 560,568 ---- CHECK(m_doc->selectSingleNode(CComBSTR(L"//Object"), &node)); + if(node == NULL) + { + return E_FAIL; + } + CComPtr<xml::IXMLDOMElement> pElem; CHECK(node->QueryInterface(&pElem)); *************** *** 622,625 **** --- 627,631 ---- } } + BaseFilter.Release(); } } *************** *** 677,681 **** Result = TuneRequestInfo->CreateComponentList(TuneRequest); ! CHECK(Result); CComPtr<IEnumGuideDataProperties> EnumGuideDataProperties; --- 683,688 ---- Result = TuneRequestInfo->CreateComponentList(TuneRequest); ! //don't check this as it seems to return rubbish ! //CHECK(TuneRequest); CComPtr<IEnumGuideDataProperties> EnumGuideDataProperties; *************** *** 690,696 **** while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) { ! BSTR PropertyName; ! GuideDataProperty->get_Name(&PropertyName); ! if(wcsicmp(Name, L"Description.ID") == 0) { CComVariant Variant; --- 697,703 ---- while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) { ! BSTR PropertyName = NULL; ! Result = GuideDataProperty->get_Name(&PropertyName); ! if(PropertyName != NULL && wcsicmp(PropertyName, L"Description.ID") == 0) { CComVariant Variant; *************** *** 698,702 **** Id = (BSTR)Variant.bstrVal; } ! else if(wcsicmp(Name, L"Description.ID") == 0) { CComVariant Variant; --- 705,709 ---- Id = (BSTR)Variant.bstrVal; } ! else if(PropertyName != NULL && wcsicmp(PropertyName, L"Provider.Name") == 0) { CComVariant Variant; *************** *** 704,707 **** --- 711,719 ---- Name = (BSTR)Variant.bstrVal; } + if(PropertyName != NULL) + { + SysFreeString(PropertyName); + } + GuideDataProperty.Release(); } if(Id.Length() > 0 && Name.Length() > 0) *************** *** 715,718 **** --- 727,731 ---- CHECK(Result); } + TuneRequest.Release(); } } *************** *** 724,727 **** --- 737,741 ---- { ATLTRACE("ServiceChanged\n"); + ProgramChanged(varServiceDescriptionID); return S_OK; } *************** *** 794,797 **** --- 808,814 ---- // // $Log$ + // Revision 1.6 2003/02/20 07:53:39 adcockj + // Fixes to crashing problems + // // Revision 1.5 2003/02/19 17:21:43 adcockj // removed midl generated file Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneRequestStore.h 19 Feb 2003 17:21:43 -0000 1.4 --- TuneRequestStore.h 20 Feb 2003 07:53:39 -0000 1.5 *************** *** 47,50 **** --- 47,51 ---- COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(IPropertyBag) + COM_INTERFACE_ENTRY(IGuideDataEvent) END_COM_MAP() |
From: <ad...@us...> - 2003-02-20 07:52:50
|
Update of /cvsroot/bdadev/SimpleTV In directory sc8-pr-cvs1:/tmp/cvs-serv15328 Modified Files: SIMPLETV.CPP SimpleTV.dsw Log Message: Fixes for new channel store and some reformatting Index: SIMPLETV.CPP =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SIMPLETV.CPP,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SIMPLETV.CPP 19 Feb 2003 15:09:05 -0000 1.4 --- SIMPLETV.CPP 20 Feb 2003 07:52:45 -0000 1.5 *************** *** 669,695 **** // add PID to PID filter table PIDFilterEntry[PIDFilterCount++] = PIDMap.ulPID; ! /*printf("PID %04X ", PIDMap.ulPID); ! switch (PIDMap.MediaSampleContent) ! { ! case MEDIA_TRANSPORT_PACKET: ! printf("(TS)\n"); ! break; ! case MEDIA_ELEMENTARY_STREAM: ! printf("(PES)\n"); ! break; ! case MEDIA_MPEG2_PSI: ! printf("(PSI=PAT/PMT/CAT/NIT)\n"); ! break; ! case MEDIA_TRANSPORT_PAYLOAD: ! printf("(payload)\n"); ! break; ! default: ! printf("(unknown type %d)\n", PIDMap.MediaSampleContent); ! break; ! }*/ } else { ! //printf("WARNING: PID FILTER TABLE OVERFLOW!!!\n"); }; }; --- 669,695 ---- // add PID to PID filter table PIDFilterEntry[PIDFilterCount++] = PIDMap.ulPID; ! printf("PID %04X ", PIDMap.ulPID); ! switch (PIDMap.MediaSampleContent) ! { ! case MEDIA_TRANSPORT_PACKET: ! printf("(TS)\n"); ! break; ! case MEDIA_ELEMENTARY_STREAM: ! printf("(PES)\n"); ! break; ! case MEDIA_MPEG2_PSI: ! printf("(PSI=PAT/PMT/CAT/NIT)\n"); ! break; ! case MEDIA_TRANSPORT_PAYLOAD: ! printf("(payload)\n"); ! break; ! default: ! printf("(unknown type %d)\n", PIDMap.MediaSampleContent); ! break; ! } } else { ! printf("WARNING: PID FILTER TABLE OVERFLOW!!!\n"); }; }; *************** *** 1114,1119 **** { Application->TuneRequestStore->DetachTIF(); ! Application->TuneRequestStore->Release(); ! Application->TuneRequestStore = NULL; } --- 1114,1118 ---- { Application->TuneRequestStore->DetachTIF(); ! Application->TuneRequestStore.Release(); } *************** *** 2539,2544 **** }; ! /* Result = Application->TuneRequestInfo-> ! CreateComponentList(DVBTuneRequest); if (Result == S_OK) --- 2538,2542 ---- }; ! Result = Application->TuneRequestInfo->CreateComponentList(DVBTuneRequest); if (Result == S_OK) *************** *** 2553,2557 **** Components->Release(); }; ! };*/ DVBTuneRequest->Release(); --- 2551,2555 ---- Components->Release(); }; ! }; DVBTuneRequest->Release(); *************** *** 2580,2588 **** TuneRequest->Release(); }; ! ! // release the enumerator object ! EnumTuneRequests->Release(); }; // return result return (Result); --- 2578,2586 ---- TuneRequest->Release(); }; ! ! EnumTuneRequests->Release(); }; + // return result return (Result); *************** *** 2739,2742 **** --- 2737,2743 ---- // // $Log$ + // Revision 1.5 2003/02/20 07:52:45 adcockj + // Fixes for new channel store and some reformatting + // // Revision 1.4 2003/02/19 15:09:05 adcockj // Changes for new guide store Index: SimpleTV.dsw =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SimpleTV.dsw,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SimpleTV.dsw 13 Feb 2003 09:24:09 -0000 1.1.1.1 --- SimpleTV.dsw 20 Feb 2003 07:52:45 -0000 1.2 *************** *** 12,15 **** --- 12,30 ---- Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name TuneReqStore + End Project Dependency + }}} + + ############################################################################### + + Project: "TuneReqStore"=..\TuneReqStore\TuneReqStore.dsp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ }}} |
From: <ad...@us...> - 2003-02-19 17:22:25
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv11079 Modified Files: .cvsignore Log Message: Added midl generated header Index: .cvsignore =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 17 Feb 2003 17:02:44 -0000 1.2 --- .cvsignore 19 Feb 2003 17:22:21 -0000 1.3 *************** *** 12,13 **** --- 12,14 ---- TuneReqStoreps.def TuneReqStoreps.mk + TuneReqStore.h \ No newline at end of file |
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv10822 Modified Files: StdAfx.cpp TuneInfo.cpp TuneInfo.h TuneReqStore.cpp TuneReqStore.idl TuneRequestStore.cpp TuneRequestStore.h Removed Files: TuneReqStore.h Log Message: removed midl generated file Index: StdAfx.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/StdAfx.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** StdAfx.cpp 17 Feb 2003 16:57:40 -0000 1.1.1.1 --- StdAfx.cpp 19 Feb 2003 17:21:42 -0000 1.2 *************** *** 1,5 **** ! // stdafx.cpp : source file that includes just the standard includes ! // stdafx.pch will be the pre-compiled header ! // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" --- 1,21 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" *************** *** 11,12 **** --- 27,37 ---- #include <atlimpl.cpp> + + ///////////////////////////////////////////////////////////////////////////// + // CVS Log + // + // $Log$ + // Revision 1.2 2003/02/19 17:21:42 adcockj + // removed midl generated file + // + ///////////////////////////////////////////////////////////////////////////// Index: TuneInfo.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TuneInfo.cpp 19 Feb 2003 15:27:14 -0000 1.1 --- TuneInfo.cpp 19 Feb 2003 17:21:42 -0000 1.2 *************** *** 1,3 **** ! // TuneInfo.cpp : Implementation of CTuneInfo #include "stdafx.h" #include "TuneReqStore.h" --- 1,22 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// ! #include "stdafx.h" #include "TuneReqStore.h" *************** *** 57,58 **** --- 76,86 ---- return S_OK; } + + ///////////////////////////////////////////////////////////////////////////// + // CVS Log + // + // $Log$ + // Revision 1.2 2003/02/19 17:21:42 adcockj + // removed midl generated file + // + ///////////////////////////////////////////////////////////////////////////// Index: TuneInfo.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneInfo.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TuneInfo.h 19 Feb 2003 15:27:15 -0000 1.1 --- TuneInfo.h 19 Feb 2003 17:21:42 -0000 1.2 *************** *** 1,3 **** ! // TuneInfo.h : Declaration of the CTuneInfo #ifndef __TUNEINFO_H_ --- 1,21 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// #ifndef __TUNEINFO_H_ Index: TuneReqStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneReqStore.cpp 19 Feb 2003 15:05:15 -0000 1.2 --- TuneReqStore.cpp 19 Feb 2003 17:21:42 -0000 1.3 *************** *** 1,4 **** ! // TuneReqStore.cpp : Implementation of DLL Exports. ! // Note: Proxy/Stub Information --- 1,21 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// // Note: Proxy/Stub Information *************** *** 72,74 **** } ! --- 89,98 ---- } ! ///////////////////////////////////////////////////////////////////////////// ! // CVS Log ! // ! // $Log$ ! // Revision 1.3 2003/02/19 17:21:42 adcockj ! // removed midl generated file ! // ! ///////////////////////////////////////////////////////////////////////////// Index: TuneReqStore.idl =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.idl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneReqStore.idl 19 Feb 2003 15:05:19 -0000 1.2 --- TuneReqStore.idl 19 Feb 2003 17:21:43 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- uuid(603A3F81-4325-11D7-B840-0002A5623377), dual, + oleautomation, helpstring("ITuneInfo Interface"), pointer_default(unique) *************** *** 62,65 **** --- 63,67 ---- uuid(23F0B101-426E-11D7-B840-0002A5623377), dual, + oleautomation, helpstring("ITuneRequestStore Interface"), pointer_default(unique), *************** *** 105,106 **** --- 107,117 ---- }; }; + + ///////////////////////////////////////////////////////////////////////////// + // CVS Log + // + // $Log$ + // Revision 1.3 2003/02/19 17:21:43 adcockj + // removed midl generated file + // + ///////////////////////////////////////////////////////////////////////////// \ No newline at end of file Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TuneRequestStore.cpp 19 Feb 2003 15:05:19 -0000 1.4 --- TuneRequestStore.cpp 19 Feb 2003 17:21:43 -0000 1.5 *************** *** 789,790 **** --- 789,799 ---- return Result; } + + ///////////////////////////////////////////////////////////////////////////// + // CVS Log + // + // $Log$ + // Revision 1.5 2003/02/19 17:21:43 adcockj + // removed midl generated file + // + ///////////////////////////////////////////////////////////////////////////// Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneRequestStore.h 19 Feb 2003 15:05:19 -0000 1.3 --- TuneRequestStore.h 19 Feb 2003 17:21:43 -0000 1.4 *************** *** 1,3 **** ! // TuneRequestStore.h : Declaration of the CTuneRequestStore #ifndef __TUNEREQUESTSTORE_H_ --- 1,21 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // $Id$ ! ///////////////////////////////////////////////////////////////////////////// ! // TuneReqStore - A channel storage object that used XML to persist tune requests ! // Copyright (c) 2003 John Adcock. All rights reserved. ! ///////////////////////////////////////////////////////////////////////////// ! // ! // This file is subject to the terms of the GNU General Public License as ! // published by the Free Software Foundation. A copy of this license is ! // included with this software distribution in the file COPYING.txt. If you ! // do not have a copy, you may obtain a copy by writing to the Free ! // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! // ! // This software 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 ! // ! ///////////////////////////////////////////////////////////////////////////// #ifndef __TUNEREQUESTSTORE_H_ --- TuneReqStore.h DELETED --- |
From: <ad...@us...> - 2003-02-19 15:27:19
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv19825 Added Files: TuneInfo.cpp TuneInfo.h TuneInfo.rgs Log Message: Add new files --- NEW FILE: TuneInfo.cpp --- // TuneInfo.cpp : Implementation of CTuneInfo #include "stdafx.h" #include "TuneReqStore.h" #include "TuneInfo.h" ///////////////////////////////////////////////////////////////////////////// // CTuneInfo STDMETHODIMP CTuneInfo::get_TuneRequest(ITuneRequest **pVal) { *pVal = m_TuneRequest; (*pVal)->AddRef(); return S_OK; } STDMETHODIMP CTuneInfo::put_TuneRequest(ITuneRequest *newVal) { m_TuneRequest = newVal; return S_OK; } STDMETHODIMP CTuneInfo::get_Description(BSTR *pVal) { *pVal = m_Description.Copy(); return S_OK; } STDMETHODIMP CTuneInfo::put_Description(BSTR newVal) { m_Description = newVal; return S_OK; } STDMETHODIMP CTuneInfo::get_UniqueID(BSTR *pVal) { *pVal = m_UniqueID.Copy(); return S_OK; } STDMETHODIMP CTuneInfo::put_UniqueID(BSTR newVal) { m_UniqueID = newVal; return S_OK; } STDMETHODIMP CTuneInfo::get_KeyedNumber(long *pVal) { *pVal = m_KeyedNumber; return S_OK; } STDMETHODIMP CTuneInfo::put_KeyedNumber(long newVal) { m_KeyedNumber = newVal; return S_OK; } --- NEW FILE: TuneInfo.h --- // TuneInfo.h : Declaration of the CTuneInfo #ifndef __TUNEINFO_H_ #define __TUNEINFO_H_ #include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CTuneInfo class ATL_NO_VTABLE CTuneInfo : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CTuneInfo, &CLSID_TuneInfo>, public IPersistPropertyBagImpl<CTuneInfo>, public IDispatchImpl<ITuneInfo, &IID_ITuneInfo, &LIBID_TUNEREQSTORELib> { public: CTuneInfo() { m_bRequiresSave = TRUE; } DECLARE_REGISTRY_RESOURCEID(IDR_TUNEINFO) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CTuneInfo) COM_INTERFACE_ENTRY(ITuneInfo) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() BEGIN_PROP_MAP(CTuneInfo) PROP_DATA_ENTRY("TuneRequest", m_TuneRequest, VT_UNKNOWN) PROP_DATA_ENTRY("Description", m_Description, VT_BSTR) PROP_DATA_ENTRY("UniqueID", m_UniqueID, VT_BSTR) PROP_DATA_ENTRY("KeyedNumber", m_KeyedNumber, VT_I4) END_PROP_MAP() // ITuneInfo public: STDMETHOD(get_KeyedNumber)(/*[out, retval]*/ long *pVal); STDMETHOD(put_KeyedNumber)(/*[in]*/ long newVal); STDMETHOD(get_UniqueID)(/*[out, retval]*/ BSTR *pVal); STDMETHOD(put_UniqueID)(/*[in]*/ BSTR newVal); STDMETHOD(get_Description)(/*[out, retval]*/ BSTR *pVal); STDMETHOD(put_Description)(/*[in]*/ BSTR newVal); STDMETHOD(get_TuneRequest)(/*[out, retval]*/ ITuneRequest* *pVal); STDMETHOD(put_TuneRequest)(/*[in]*/ ITuneRequest* newVal); unsigned m_bRequiresSave:1; private: CComPtr<ITuneRequest> m_TuneRequest; CComBSTR m_Description; CComBSTR m_UniqueID; long m_KeyedNumber; }; #endif //__TUNEINFO_H_ --- NEW FILE: TuneInfo.rgs --- HKCR { TuneReqStore.TuneInfo.1 = s 'TuneInfo Class' { CLSID = s '{603A3F82-4325-11D7-B840-0002A5623377}' } TuneReqStore.TuneInfo = s 'TuneInfo Class' { CLSID = s '{603A3F82-4325-11D7-B840-0002A5623377}' CurVer = s 'TuneReqStore.TuneInfo.1' } NoRemove CLSID { ForceRemove {603A3F82-4325-11D7-B840-0002A5623377} = s 'TuneInfo Class' { ProgID = s 'TuneReqStore.TuneInfo.1' VersionIndependentProgID = s 'TuneReqStore.TuneInfo' ForceRemove 'Programmable' InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } 'TypeLib' = s '{23F0B0F5-426E-11D7-B840-0002A5623377}' } } } |
From: <ad...@us...> - 2003-02-19 15:26:35
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv19259 Modified Files: TuneReqStore.dsp Log Message: Removed path from project Index: TuneReqStore.dsp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneReqStore.dsp 19 Feb 2003 15:05:18 -0000 1.3 --- TuneReqStore.dsp 19 Feb 2003 15:26:30 -0000 1.4 *************** *** 130,134 **** --- 130,144 ---- SOURCE=.\TuneReqStore.idl + + !IF "$(CFG)" == "TuneReqStore - Win32 Debug" + + # ADD MTL /tlb ".\TuneReqStore.tlb" /h "TuneReqStore.h" /iid "TuneReqStore_i.c" /Oicf + + !ELSEIF "$(CFG)" == "TuneReqStore - Win32 Release" + # ADD MTL /tlb ".\TuneReqStore.tlb" /h "TuneReqStore.h" /iid "TuneReqStore_i.c" /Oicf + + !ENDIF + # End Source File # Begin Source File |
From: <ad...@us...> - 2003-02-19 15:09:11
|
Update of /cvsroot/bdadev/SimpleTV In directory sc8-pr-cvs1:/tmp/cvs-serv8298 Modified Files: SIMPLETV.CPP SimpleTV.dsp Log Message: Changes for new guide store Index: SIMPLETV.CPP =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SIMPLETV.CPP,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SIMPLETV.CPP 17 Feb 2003 17:19:22 -0000 1.3 --- SIMPLETV.CPP 19 Feb 2003 15:09:05 -0000 1.4 *************** *** 43,49 **** #pragma comment(lib, "USER32.LIB") ! /* Test out new channel store code #import "..\TuneReqStore\TuneReqStore.tlb" raw_interfaces_only no_implementation ! */ /****************************************************************************** --- 43,49 ---- #pragma comment(lib, "USER32.LIB") ! #pragma warning(disable : 4192) #import "..\TuneReqStore\TuneReqStore.tlb" raw_interfaces_only no_implementation ! #pragma warning(default : 4192) /****************************************************************************** *************** *** 122,125 **** --- 122,127 ---- DWORD IPSinkFilters; // enumerated IP Sink Filters FILTERDATA IPSinkFilterList[MAX_FILTERS]; + // Guide Store + TUNEREQSTORELib::ITuneRequestStorePtr TuneRequestStore; } APPLICATION, *PAPPLICATION; *************** *** 1071,1080 **** // release the Transport Information Filter BaseFilter->Release(); ! } }; // if the creation failed, delete any objects already created if (Result != S_OK) DeleteFilterGraph(Application); // return result --- 1073,1101 ---- // release the Transport Information Filter BaseFilter->Release(); ! ! // create and attach the guide store loader ! // this will attach itsself to the TIF and listen for update ! Result = Application->TuneRequestStore.CreateInstance(__uuidof(TUNEREQSTORELib::TuneRequestStore)); ! if (Result == S_OK) ! { ! Result = Application->TuneRequestStore->AttachTIF((TUNEREQSTORELib::IFilterGraph *)Application->FilterGraph); ! ! BSTR FileName = SysAllocString(L"Channels.xml"); ! Result = Application->TuneRequestStore->Load(FileName); ! SysFreeString(FileName); ! ! // temporary override as the avobe will probably fail for a while ! Result = S_OK; ! }; ! }; }; + + // if the creation failed, delete any objects already created if (Result != S_OK) + { DeleteFilterGraph(Application); + } // return result *************** *** 1089,1092 **** --- 1110,1121 ---- IN PAPPLICATION Application) { + // check if a TuneRequestStore was created object was created + if (Application->TuneRequestStore) + { + Application->TuneRequestStore->DetachTIF(); + Application->TuneRequestStore->Release(); + Application->TuneRequestStore = NULL; + } + // check if a GuideDataEvent object was created if (Application->GuideDataEvent) *************** *** 2454,2474 **** Result = Application->GuideData->GetServices(&EnumTuneRequests); - /* Test out new channel store code - if(SUCCEEDED(Result)) - { - TUNEREQSTORELib::ITuneRequestStorePtr pStore; - Result = pStore.CreateInstance(__uuidof(TUNEREQSTORELib::TuneRequestStore)); - - if(SUCCEEDED(Result)) - { - pStore->CopyRequests((TUNEREQSTORELib::IEnumTuneRequests*)EnumTuneRequests); - BSTR FileName = SysAllocString(L"Channels.xml"); - pStore->Save(FileName); - SysFreeString(FileName); - } - } - */ - - // check if enumerator was successfully retrieved if (Result == S_OK) --- 2483,2486 ---- *************** *** 2649,2652 **** --- 2661,2671 ---- CheckTIF(Application); + if(Application->TuneRequestStore) + { + BSTR FileName = SysAllocString(L"Channels.xml"); + Application->TuneRequestStore->Save(FileName); + SysFreeString(FileName); + } + //***EXPERIMENTAL CODE TO READ BACK TUNEREQUEST DATA*** /*{ *************** *** 2720,2723 **** --- 2739,2745 ---- // // $Log$ + // Revision 1.4 2003/02/19 15:09:05 adcockj + // Changes for new guide store + // // Revision 1.3 2003/02/17 17:19:22 adcockj // Test code for new channel store (commented out for now) Index: SimpleTV.dsp =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SimpleTV.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleTV.dsp 17 Feb 2003 17:19:23 -0000 1.2 --- SimpleTV.dsp 19 Feb 2003 15:09:06 -0000 1.3 *************** *** 42,46 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" --- 42,46 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" |
From: <ad...@us...> - 2003-02-19 15:05:33
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv5812 Modified Files: StdAfx.h TuneReqStore.cpp TuneReqStore.dsp TuneReqStore.h TuneReqStore.idl TuneReqStore.rc TuneRequestStore.cpp TuneRequestStore.h resource.h Log Message: Interim Checkin Index: StdAfx.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/StdAfx.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** StdAfx.h 17 Feb 2003 16:57:40 -0000 1.1.1.1 --- StdAfx.h 19 Feb 2003 15:05:08 -0000 1.2 *************** *** 22,30 **** #include <atlcom.h> #include <string> #include <stack> #include <vector> ! #define CHECK(x) { HRESULT __hr(x); if(FAILED(__hr)) {ATLTRACE(#x " Returned %8x", __hr); return __hr;}} #import "msxml.dll" rename_namespace("xml") raw_interfaces_only no_implementation --- 22,40 ---- #include <atlcom.h> + #include <strmif.h> + #include <uuids.h> + #include <ks.h> + #include <ksmedia.h> + #include <bdatypes.h> + #include <bdamedia.h> + #include <bdaiface.h> + #include <bdatif.h> + + #include <string> #include <stack> #include <vector> ! #define CHECK(x) { HRESULT __hr(x); if(FAILED(__hr)) {ATLTRACE(#x " Returned %8x\n", __hr); return __hr;}} #import "msxml.dll" rename_namespace("xml") raw_interfaces_only no_implementation Index: TuneReqStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TuneReqStore.cpp 17 Feb 2003 16:57:40 -0000 1.1.1.1 --- TuneReqStore.cpp 19 Feb 2003 15:05:15 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- #include "TuneReqStore_i.c" #include "TuneRequestStore.h" + #include "TuneInfo.h" *************** *** 19,22 **** --- 20,24 ---- BEGIN_OBJECT_MAP(ObjectMap) OBJECT_ENTRY(CLSID_TuneRequestStore, CTuneRequestStore) + OBJECT_ENTRY(CLSID_TuneInfo, CTuneInfo) END_OBJECT_MAP() Index: TuneReqStore.dsp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneReqStore.dsp 17 Feb 2003 17:08:25 -0000 1.2 --- TuneReqStore.dsp 19 Feb 2003 15:05:18 -0000 1.3 *************** *** 80,84 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c ! # ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /Yu"stdafx.h" /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" --- 80,84 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c ! # ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /FR /Yu"stdafx.h" /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" *************** *** 117,120 **** --- 117,124 ---- # Begin Source File + SOURCE=.\TuneInfo.cpp + # End Source File + # Begin Source File + SOURCE=.\TuneReqStore.cpp # End Source File *************** *** 150,153 **** --- 154,161 ---- # Begin Source File + SOURCE=.\TuneInfo.h + # End Source File + # Begin Source File + SOURCE=.\TuneRequestStore.h # End Source File *************** *** 156,159 **** --- 164,171 ---- # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + # Begin Source File + + SOURCE=.\TuneInfo.rgs + # End Source File # Begin Source File Index: TuneReqStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneReqStore.h 18 Feb 2003 08:00:50 -0000 1.3 --- TuneReqStore.h 19 Feb 2003 15:05:19 -0000 1.4 *************** *** 3,9 **** /* File created by MIDL compiler version 5.01.0164 */ ! /* at Mon Feb 17 18:36:18 2003 */ ! /* Compiler settings for C:\Source\BDADev\TuneReqStore\TuneReqStore.idl: Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext error checks: allocation ref bounds_check enum stub_data --- 3,9 ---- /* File created by MIDL compiler version 5.01.0164 */ ! /* at Wed Feb 19 14:23:37 2003 */ ! /* Compiler settings for C:\Source\Bdadev\TuneReqStore\TuneReqStore.idl: Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext error checks: allocation ref bounds_check enum stub_data *************** *** 38,41 **** --- 38,53 ---- /* Forward Declarations */ + #ifndef __ITuneInfo_FWD_DEFINED__ + #define __ITuneInfo_FWD_DEFINED__ + typedef interface ITuneInfo ITuneInfo; + #endif /* __ITuneInfo_FWD_DEFINED__ */ + + + #ifndef __IEnumTuneInfo_FWD_DEFINED__ + #define __IEnumTuneInfo_FWD_DEFINED__ + typedef interface IEnumTuneInfo IEnumTuneInfo; + #endif /* __IEnumTuneInfo_FWD_DEFINED__ */ + + #ifndef __ITuneRequestStore_FWD_DEFINED__ #define __ITuneRequestStore_FWD_DEFINED__ *************** *** 56,67 **** /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" - #include "bdatif.h" void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); void __RPC_USER MIDL_user_free( void __RPC_FAR * ); #ifndef __ITuneRequestStore_INTERFACE_DEFINED__ #define __ITuneRequestStore_INTERFACE_DEFINED__ --- 68,545 ---- + #ifndef __TuneInfo_FWD_DEFINED__ + #define __TuneInfo_FWD_DEFINED__ + + #ifdef __cplusplus + typedef class TuneInfo TuneInfo; + #else + typedef struct TuneInfo TuneInfo; + #endif /* __cplusplus */ + + #endif /* __TuneInfo_FWD_DEFINED__ */ + + /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + /* interface __MIDL_itf_TuneReqStore_0000 */ + /* [local] */ + + + + + + extern RPC_IF_HANDLE __MIDL_itf_TuneReqStore_0000_v0_0_c_ifspec; + extern RPC_IF_HANDLE __MIDL_itf_TuneReqStore_0000_v0_0_s_ifspec; + + #ifndef __ITuneInfo_INTERFACE_DEFINED__ + #define __ITuneInfo_INTERFACE_DEFINED__ + + /* interface ITuneInfo */ + /* [unique][helpstring][dual][uuid][object] */ + + + EXTERN_C const IID IID_ITuneInfo; + + #if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("603A3F81-4325-11D7-B840-0002A5623377") + ITuneInfo : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_TuneRequest( + /* [retval][out] */ ITuneRequest __RPC_FAR *__RPC_FAR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_TuneRequest( + /* [in] */ ITuneRequest __RPC_FAR *newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Description( + /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Description( + /* [in] */ BSTR newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_UniqueID( + /* [retval][out] */ BSTR __RPC_FAR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_UniqueID( + /* [in] */ BSTR newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_KeyedNumber( + /* [retval][out] */ long __RPC_FAR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_KeyedNumber( + /* [in] */ long newVal) = 0; + + }; + + #else /* C style interface */ + + typedef struct ITuneInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ITuneInfo __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ITuneInfo __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ITuneInfo __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ITuneInfo __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ITuneInfo __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ITuneInfo __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ITuneInfo __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_TuneRequest )( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ ITuneRequest __RPC_FAR *__RPC_FAR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_TuneRequest )( + ITuneInfo __RPC_FAR * This, + /* [in] */ ITuneRequest __RPC_FAR *newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Description )( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_Description )( + ITuneInfo __RPC_FAR * This, + /* [in] */ BSTR newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_UniqueID )( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_UniqueID )( + ITuneInfo __RPC_FAR * This, + /* [in] */ BSTR newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_KeyedNumber )( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *put_KeyedNumber )( + ITuneInfo __RPC_FAR * This, + /* [in] */ long newVal); + + END_INTERFACE + } ITuneInfoVtbl; + + interface ITuneInfo + { + CONST_VTBL struct ITuneInfoVtbl __RPC_FAR *lpVtbl; + }; + + + + #ifdef COBJMACROS + + + #define ITuneInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + + #define ITuneInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + + #define ITuneInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + + #define ITuneInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + + #define ITuneInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + + #define ITuneInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + + #define ITuneInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + + #define ITuneInfo_get_TuneRequest(This,pVal) \ + (This)->lpVtbl -> get_TuneRequest(This,pVal) + + #define ITuneInfo_put_TuneRequest(This,newVal) \ + (This)->lpVtbl -> put_TuneRequest(This,newVal) + + #define ITuneInfo_get_Description(This,pVal) \ + (This)->lpVtbl -> get_Description(This,pVal) + + #define ITuneInfo_put_Description(This,newVal) \ + (This)->lpVtbl -> put_Description(This,newVal) + + #define ITuneInfo_get_UniqueID(This,pVal) \ + (This)->lpVtbl -> get_UniqueID(This,pVal) + + #define ITuneInfo_put_UniqueID(This,newVal) \ + (This)->lpVtbl -> put_UniqueID(This,newVal) + + #define ITuneInfo_get_KeyedNumber(This,pVal) \ + (This)->lpVtbl -> get_KeyedNumber(This,pVal) + + #define ITuneInfo_put_KeyedNumber(This,newVal) \ + (This)->lpVtbl -> put_KeyedNumber(This,newVal) + + #endif /* COBJMACROS */ + + + #endif /* C style interface */ + + + + /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneInfo_get_TuneRequest_Proxy( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ ITuneRequest __RPC_FAR *__RPC_FAR *pVal); + + + void __RPC_STUB ITuneInfo_get_TuneRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuneInfo_put_TuneRequest_Proxy( + ITuneInfo __RPC_FAR * This, + /* [in] */ ITuneRequest __RPC_FAR *newVal); + + + void __RPC_STUB ITuneInfo_put_TuneRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneInfo_get_Description_Proxy( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pVal); + + + void __RPC_STUB ITuneInfo_get_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuneInfo_put_Description_Proxy( + ITuneInfo __RPC_FAR * This, + /* [in] */ BSTR newVal); + + + void __RPC_STUB ITuneInfo_put_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneInfo_get_UniqueID_Proxy( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pVal); + + + void __RPC_STUB ITuneInfo_get_UniqueID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuneInfo_put_UniqueID_Proxy( + ITuneInfo __RPC_FAR * This, + /* [in] */ BSTR newVal); + + + void __RPC_STUB ITuneInfo_put_UniqueID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneInfo_get_KeyedNumber_Proxy( + ITuneInfo __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *pVal); + + + void __RPC_STUB ITuneInfo_get_KeyedNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuneInfo_put_KeyedNumber_Proxy( + ITuneInfo __RPC_FAR * This, + /* [in] */ long newVal); + + + void __RPC_STUB ITuneInfo_put_KeyedNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + + #endif /* __ITuneInfo_INTERFACE_DEFINED__ */ + + + #ifndef __IEnumTuneInfo_INTERFACE_DEFINED__ + #define __IEnumTuneInfo_INTERFACE_DEFINED__ + + /* interface IEnumTuneInfo */ + /* [unique][helpstring][uuid][object] */ + + + EXTERN_C const IID IID_IEnumTuneInfo; + + #if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1C0705A6-4342-11d7-B840-0002A5623377") + IEnumTuneInfo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ unsigned long celt, + /* [out] */ ITuneInfo __RPC_FAR *__RPC_FAR *ppprop, + /* [out] */ unsigned long __RPC_FAR *pcelt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ unsigned long celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumTuneInfo __RPC_FAR *__RPC_FAR *ppenum) = 0; + + }; + + #else /* C style interface */ + + typedef struct IEnumTuneInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IEnumTuneInfo __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IEnumTuneInfo __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IEnumTuneInfo __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Next )( + IEnumTuneInfo __RPC_FAR * This, + /* [in] */ unsigned long celt, + /* [out] */ ITuneInfo __RPC_FAR *__RPC_FAR *ppprop, + /* [out] */ unsigned long __RPC_FAR *pcelt); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Skip )( + IEnumTuneInfo __RPC_FAR * This, + /* [in] */ unsigned long celt); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Reset )( + IEnumTuneInfo __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Clone )( + IEnumTuneInfo __RPC_FAR * This, + /* [out] */ IEnumTuneInfo __RPC_FAR *__RPC_FAR *ppenum); + + END_INTERFACE + } IEnumTuneInfoVtbl; + + interface IEnumTuneInfo + { + CONST_VTBL struct IEnumTuneInfoVtbl __RPC_FAR *lpVtbl; + }; + + + + #ifdef COBJMACROS + + + #define IEnumTuneInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + + #define IEnumTuneInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + + #define IEnumTuneInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + + #define IEnumTuneInfo_Next(This,celt,ppprop,pcelt) \ + (This)->lpVtbl -> Next(This,celt,ppprop,pcelt) + + #define IEnumTuneInfo_Skip(This,celt) \ + (This)->lpVtbl -> Skip(This,celt) + + #define IEnumTuneInfo_Reset(This) \ + (This)->lpVtbl -> Reset(This) + + #define IEnumTuneInfo_Clone(This,ppenum) \ + (This)->lpVtbl -> Clone(This,ppenum) + + #endif /* COBJMACROS */ + + + #endif /* C style interface */ + + + + HRESULT STDMETHODCALLTYPE IEnumTuneInfo_Next_Proxy( + IEnumTuneInfo __RPC_FAR * This, + /* [in] */ unsigned long celt, + /* [out] */ ITuneInfo __RPC_FAR *__RPC_FAR *ppprop, + /* [out] */ unsigned long __RPC_FAR *pcelt); + + + void __RPC_STUB IEnumTuneInfo_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + HRESULT STDMETHODCALLTYPE IEnumTuneInfo_Skip_Proxy( + IEnumTuneInfo __RPC_FAR * This, + /* [in] */ unsigned long celt); + + + void __RPC_STUB IEnumTuneInfo_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + HRESULT STDMETHODCALLTYPE IEnumTuneInfo_Reset_Proxy( + IEnumTuneInfo __RPC_FAR * This); + + + void __RPC_STUB IEnumTuneInfo_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + HRESULT STDMETHODCALLTYPE IEnumTuneInfo_Clone_Proxy( + IEnumTuneInfo __RPC_FAR * This, + /* [out] */ IEnumTuneInfo __RPC_FAR *__RPC_FAR *ppenum); + + + void __RPC_STUB IEnumTuneInfo_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + + #endif /* __IEnumTuneInfo_INTERFACE_DEFINED__ */ + + #ifndef __ITuneRequestStore_INTERFACE_DEFINED__ #define __ITuneRequestStore_INTERFACE_DEFINED__ *************** *** 80,88 **** public: virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get__NewEnum( ! /* [retval][out] */ IEnumTuneRequests __RPC_FAR *__RPC_FAR *ppUnk) = 0; virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ long Index, ! /* [retval][out] */ ITuneRequest __RPC_FAR *__RPC_FAR *pVal) = 0; virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Count( --- 558,566 ---- public: virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get__NewEnum( ! /* [retval][out] */ IEnumTuneInfo __RPC_FAR *__RPC_FAR *ppUnk) = 0; virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ long Index, ! /* [retval][out] */ ITuneInfo __RPC_FAR *__RPC_FAR *pVal) = 0; virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Count( *************** *** 95,100 **** /* [in] */ BSTR FileName) = 0; ! virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE CopyRequests( ! /* [in] */ IEnumTuneRequests __RPC_FAR *pEnumTuneRequests) = 0; }; --- 573,580 ---- /* [in] */ BSTR FileName) = 0; ! virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE AttachTIF( ! /* [in] */ IFilterGraph __RPC_FAR *pFilterGraph) = 0; ! ! virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DetachTIF( void) = 0; }; *************** *** 148,157 **** /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get__NewEnum )( ITuneRequestStore __RPC_FAR * This, ! /* [retval][out] */ IEnumTuneRequests __RPC_FAR *__RPC_FAR *ppUnk); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Item )( ITuneRequestStore __RPC_FAR * This, /* [in] */ long Index, ! /* [retval][out] */ ITuneRequest __RPC_FAR *__RPC_FAR *pVal); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Count )( --- 628,637 ---- /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get__NewEnum )( ITuneRequestStore __RPC_FAR * This, ! /* [retval][out] */ IEnumTuneInfo __RPC_FAR *__RPC_FAR *ppUnk); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Item )( ITuneRequestStore __RPC_FAR * This, /* [in] */ long Index, ! /* [retval][out] */ ITuneInfo __RPC_FAR *__RPC_FAR *pVal); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Count )( *************** *** 167,173 **** /* [in] */ BSTR FileName); ! /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *CopyRequests )( ITuneRequestStore __RPC_FAR * This, ! /* [in] */ IEnumTuneRequests __RPC_FAR *pEnumTuneRequests); END_INTERFACE --- 647,656 ---- /* [in] */ BSTR FileName); ! /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *AttachTIF )( ITuneRequestStore __RPC_FAR * This, ! /* [in] */ IFilterGraph __RPC_FAR *pFilterGraph); ! ! /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *DetachTIF )( ! ITuneRequestStore __RPC_FAR * This); END_INTERFACE *************** *** 222,227 **** (This)->lpVtbl -> Save(This,FileName) ! #define ITuneRequestStore_CopyRequests(This,pEnumTuneRequests) \ ! (This)->lpVtbl -> CopyRequests(This,pEnumTuneRequests) #endif /* COBJMACROS */ --- 705,713 ---- (This)->lpVtbl -> Save(This,FileName) ! #define ITuneRequestStore_AttachTIF(This,pFilterGraph) \ ! (This)->lpVtbl -> AttachTIF(This,pFilterGraph) ! ! #define ITuneRequestStore_DetachTIF(This) \ ! (This)->lpVtbl -> DetachTIF(This) #endif /* COBJMACROS */ *************** *** 234,238 **** /* [propget][id] */ HRESULT STDMETHODCALLTYPE ITuneRequestStore_get__NewEnum_Proxy( ITuneRequestStore __RPC_FAR * This, ! /* [retval][out] */ IEnumTuneRequests __RPC_FAR *__RPC_FAR *ppUnk); --- 720,724 ---- /* [propget][id] */ HRESULT STDMETHODCALLTYPE ITuneRequestStore_get__NewEnum_Proxy( ITuneRequestStore __RPC_FAR * This, ! /* [retval][out] */ IEnumTuneInfo __RPC_FAR *__RPC_FAR *ppUnk); *************** *** 247,251 **** ITuneRequestStore __RPC_FAR * This, /* [in] */ long Index, ! /* [retval][out] */ ITuneRequest __RPC_FAR *__RPC_FAR *pVal); --- 733,737 ---- ITuneRequestStore __RPC_FAR * This, /* [in] */ long Index, ! /* [retval][out] */ ITuneInfo __RPC_FAR *__RPC_FAR *pVal); *************** *** 293,302 **** ! /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuneRequestStore_CopyRequests_Proxy( ITuneRequestStore __RPC_FAR * This, ! /* [in] */ IEnumTuneRequests __RPC_FAR *pEnumTuneRequests); ! void __RPC_STUB ITuneRequestStore_CopyRequests_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, --- 779,799 ---- ! /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuneRequestStore_AttachTIF_Proxy( ITuneRequestStore __RPC_FAR * This, ! /* [in] */ IFilterGraph __RPC_FAR *pFilterGraph); ! void __RPC_STUB ITuneRequestStore_AttachTIF_Stub( ! IRpcStubBuffer *This, ! IRpcChannelBuffer *_pRpcChannelBuffer, ! PRPC_MESSAGE _pRpcMessage, ! DWORD *_pdwStubPhase); ! ! ! /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuneRequestStore_DetachTIF_Proxy( ! ITuneRequestStore __RPC_FAR * This); ! ! ! void __RPC_STUB ITuneRequestStore_DetachTIF_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, *************** *** 325,328 **** --- 822,833 ---- class DECLSPEC_UUID("23F0B102-426E-11D7-B840-0002A5623377") TuneRequestStore; + #endif + + EXTERN_C const CLSID CLSID_TuneInfo; + + #ifdef __cplusplus + + class DECLSPEC_UUID("603A3F82-4325-11D7-B840-0002A5623377") + TuneInfo; #endif #endif /* __TUNEREQSTORELib_LIBRARY_DEFINED__ */ Index: TuneReqStore.idl =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.idl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TuneReqStore.idl 17 Feb 2003 16:57:41 -0000 1.1.1.1 --- TuneReqStore.idl 19 Feb 2003 15:05:19 -0000 1.2 *************** *** 21,25 **** import "oaidl.idl"; import "ocidl.idl"; ! import "bdatif.idl"; [ object, --- 21,61 ---- import "oaidl.idl"; import "ocidl.idl"; ! ! interface ITuneRequest; ! interface IFilterGraph; ! ! [ ! object, ! uuid(603A3F81-4325-11D7-B840-0002A5623377), ! dual, ! helpstring("ITuneInfo Interface"), ! pointer_default(unique) ! ] ! interface ITuneInfo : IDispatch ! { ! [propget, id(1), helpstring("property TuneRequest")] HRESULT TuneRequest([out, retval] ITuneRequest* *pVal); ! [propput, id(1), helpstring("property TuneRequest")] HRESULT TuneRequest([in] ITuneRequest* newVal); ! [propget, id(2), helpstring("property Description")] HRESULT Description([out, retval] BSTR *pVal); ! [propput, id(2), helpstring("property Description")] HRESULT Description([in] BSTR newVal); ! [propget, id(3), helpstring("property UniqueID")] HRESULT UniqueID([out, retval] BSTR *pVal); ! [propput, id(3), helpstring("property UniqueID")] HRESULT UniqueID([in] BSTR newVal); ! [propget, id(4), helpstring("property KeyedNumber")] HRESULT KeyedNumber([out, retval] long *pVal); ! [propput, id(4), helpstring("property KeyedNumber")] HRESULT KeyedNumber([in] long newVal); ! }; ! ! [ ! object, ! uuid(1C0705A6-4342-11d7-B840-0002A5623377), ! helpstring("Enumerate Tune Requests."), ! pointer_default(unique) ! ] ! interface IEnumTuneInfo : IUnknown ! { ! HRESULT Next([in] unsigned long celt, [out] ITuneInfo **ppprop, [out] unsigned long *pcelt); ! HRESULT Skip([in] unsigned long celt); ! HRESULT Reset(); ! HRESULT Clone([out] IEnumTuneInfo **ppenum); ! } ! [ object, *************** *** 32,41 **** interface ITuneRequestStore : IDispatch { ! [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IEnumTuneRequests** ppUnk); ! [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] ITuneRequest** pVal); [id(1), propget] HRESULT Count([out, retval] long* pVal); [id(2), helpstring("method Load")] HRESULT Load([in] BSTR FileName); [id(3), helpstring("method Save")] HRESULT Save([in] BSTR FileName); ! [id(4), helpstring("method CopyRequests")] HRESULT CopyRequests([in] IEnumTuneRequests* pEnumTuneRequests); }; --- 68,78 ---- interface ITuneRequestStore : IDispatch { ! [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IEnumTuneInfo** ppUnk); ! [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] ITuneInfo** pVal); [id(1), propget] HRESULT Count([out, retval] long* pVal); [id(2), helpstring("method Load")] HRESULT Load([in] BSTR FileName); [id(3), helpstring("method Save")] HRESULT Save([in] BSTR FileName); ! [id(4), helpstring("method AttachTIF")] HRESULT AttachTIF([in] IFilterGraph* pFilterGraph); ! [id(5), helpstring("method DetachTIF")] HRESULT DetachTIF(); }; *************** *** 49,52 **** --- 86,90 ---- importlib("stdole32.tlb"); importlib("stdole2.tlb"); + import "Tuner.idl"; [ *************** *** 57,60 **** --- 95,106 ---- { [default] interface ITuneRequestStore; + }; + [ + uuid(603A3F82-4325-11D7-B840-0002A5623377), + helpstring("TuneInfo Class") + ] + coclass TuneInfo + { + [default] interface ITuneInfo; }; }; Index: TuneReqStore.rc =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.rc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TuneReqStore.rc 17 Feb 2003 16:57:41 -0000 1.1.1.1 --- TuneReqStore.rc 19 Feb 2003 15:05:19 -0000 1.2 *************** *** 120,123 **** --- 120,124 ---- IDR_TUNEREQUESTSTORE REGISTRY DISCARDABLE "TuneRequestStore.rgs" + IDR_TUNEINFO REGISTRY DISCARDABLE "TuneInfo.rgs" #endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TuneRequestStore.cpp 18 Feb 2003 08:00:51 -0000 1.3 --- TuneRequestStore.cpp 19 Feb 2003 15:05:19 -0000 1.4 *************** *** 19,22 **** --- 19,25 ---- // Don Box and possibly other co-authors. ///////////////////////////////////////////////////////////////////////////// + // The GuideData portions of this code where based on SimpleTV.cpp v 1.1 + // SimpleTV Copyright (c) Robert Schlabbach + ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as *************** *** 36,39 **** --- 39,43 ---- #include "TuneReqStore.h" #include "TuneRequestStore.h" + #include "TuneInfo.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 48,52 **** } ! STDMETHODIMP CTuneRequestStore::get__NewEnum(IEnumTuneRequests** ppUnk) { if (ppUnk == NULL) --- 52,56 ---- } ! STDMETHODIMP CTuneRequestStore::get__NewEnum(IEnumTuneInfo** ppUnk) { if (ppUnk == NULL) *************** *** 60,64 **** CHECK(CComObject<ComSTLEnum>::CreateInstance(&pEnum)); ! HRESULT hr = pEnum->Init((ITuneRequestStore*)this, m_TuneRequests); if (SUCCEEDED(hr)) --- 64,68 ---- CHECK(CComObject<ComSTLEnum>::CreateInstance(&pEnum)); ! HRESULT hr = pEnum->Init((ITuneRequestStore*)this, m_TuneInfos); if (SUCCEEDED(hr)) *************** *** 75,79 **** } ! STDMETHODIMP CTuneRequestStore::get_Item(long Index, ITuneRequest** pVal) { if (pVal == NULL) --- 79,83 ---- } ! STDMETHODIMP CTuneRequestStore::get_Item(long Index, ITuneInfo** pVal) { if (pVal == NULL) *************** *** 82,88 **** } ! if(Index >= 0 && Index < m_TuneRequests.size()) { ! *pVal = m_TuneRequests[Index]; (*pVal)->AddRef(); return S_OK; --- 86,92 ---- } ! if(Index >= 0 && Index < m_TuneInfos.size()) { ! *pVal = m_TuneInfos[Index]; (*pVal)->AddRef(); return S_OK; *************** *** 96,100 **** STDMETHODIMP CTuneRequestStore::get_Count(long* pVal) { ! *pVal = m_TuneRequests.size(); return S_OK; } --- 100,104 ---- STDMETHODIMP CTuneRequestStore::get_Count(long* pVal) { ! *pVal = m_TuneInfos.size(); return S_OK; } *************** *** 130,134 **** int i(0); ! while(SUCCEEDED(UnpopulateDOMDocument(NULL, &m_TuneRequests[i], MakeTagName(i)))); { ++i; --- 134,138 ---- int i(0); ! while(SUCCEEDED(UnpopulateDOMDocument(NULL, &m_TuneInfos[i], MakeTagName(i)))); { ++i; *************** *** 154,160 **** CHECK(m_doc->createElement(CComBSTR("ChannelList"), &m_TopNode)); ! for(int i(0); i < m_TuneRequests.size(); ++i) { ! if(FAILED(hr = PopulateDOMDocument(m_TuneRequests[i], MakeTagName(i)))) { if(m_doc) --- 158,164 ---- CHECK(m_doc->createElement(CComBSTR("ChannelList"), &m_TopNode)); ! for(int i(0); i < m_TuneInfos.size(); ++i) { ! if(FAILED(hr = PopulateDOMDocument(m_TuneInfos[i], MakeTagName(i)))) { if(m_doc) *************** *** 514,543 **** } - STDMETHODIMP CTuneRequestStore::CopyRequests(IEnumTuneRequests* pEnumTuneRequests) - { - EmptyArray(); - - ITuneRequest* TuneRequest; - DWORD Items(0); - - while(pEnumTuneRequests->Next(1, &TuneRequest, &Items) == S_OK) - { - m_TuneRequests.push_back(TuneRequest); - } - - return S_OK; - } - void CTuneRequestStore::EmptyArray() { ! for(int i(0); i < m_TuneRequests.size(); ++i) { ! if(m_TuneRequests[i] != NULL) { ! m_TuneRequests[i]->Release(); ! m_TuneRequests[i] = NULL; } } ! m_TuneRequests.empty(); } --- 518,532 ---- } void CTuneRequestStore::EmptyArray() { ! for(int i(0); i < m_TuneInfos.size(); ++i) { ! if(m_TuneInfos[i] != NULL) { ! m_TuneInfos[i]->Release(); ! m_TuneInfos[i] = NULL; } } ! m_TuneInfos.empty(); } *************** *** 566,570 **** } ! HRESULT CTuneRequestStore::UnpopulateDOMDocument(IErrorLog* pErrorLog, ITuneRequest** ppObject, const wchar_t* ObjectName) { CComPtr<xml::IXMLDOMNode> node; --- 555,559 ---- } ! HRESULT CTuneRequestStore::UnpopulateDOMDocument(IErrorLog* pErrorLog, ITuneInfo** ppObject, const wchar_t* ObjectName) { CComPtr<xml::IXMLDOMNode> node; *************** *** 588,590 **** --- 577,790 ---- swprintf(ObjectName, L"Channel%d", ChannelIndex + 1); return ObjectName; + } + + STDMETHODIMP CTuneRequestStore::AttachTIF(IFilterGraph* pFilterGraph) + { + if(m_ConnectionPoint != NULL) + { + DetachTIF(); + } + + m_FilterGraph = pFilterGraph; + HRESULT Result = S_OK; + + // declare local variables + CComPtr<IEnumFilters> EnumFilters; + + CComPtr<IConnectionPointContainer> ConnectionPointContainer; + + // find the Transport Information Filter in the filter graph + // we do this by looking for filters that + // implement the IGuideData interface + Result = pFilterGraph->EnumFilters(&EnumFilters); + if(SUCCEEDED(Result)) + { + CComPtr<IBaseFilter> BaseFilter; + ULONG Fetched(0); + while(SUCCEEDED(EnumFilters->Next(1, &BaseFilter, &Fetched))) + { + m_GuideData = BaseFilter; + if(m_GuideData != NULL) + { + CComQIPtr<IConnectionPointContainer> ConnectionPointContainer = m_GuideData; + if(ConnectionPointContainer != NULL) + { + // find the GuideDataEvent connection point + Result = ConnectionPointContainer->FindConnectionPoint(IID_IGuideDataEvent, &m_ConnectionPoint); + + // check if the connection point was found + if(SUCCEEDED(Result)) + { + // advise the GuideDataEvent object + Result = m_ConnectionPoint->Advise((IGuideDataEvent*)this, &m_GuideDataCookie); + return Result; + } + } + } + } + } + ATLTRACE("Failed to find TIF\n"); + return Result; + } + + STDMETHODIMP CTuneRequestStore::DetachTIF() + { + // unadvise GuideDataEvent object + m_ConnectionPoint->Unadvise(m_GuideDataCookie); + + // release any objects we hold onto + m_ConnectionPoint.Release(); + m_GuideData.Release(); + m_FilterGraph.Release(); + + m_GuideDataCookie = 0; + + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::GuideDataAcquired(void) + { + ATLTRACE("GuideDataAcquired\n"); + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::ProgramChanged(VARIANT varProgramDescriptionID) + { + HRESULT Result = S_OK; + ATLTRACE("ProgramChanged\n"); + CComQIPtr<ITuneRequestInfo> TuneRequestInfo = m_GuideData; + + if(varProgramDescriptionID.vt == VT_EMPTY && + m_GuideData != NULL && + TuneRequestInfo != NULL) + { + CComPtr<IEnumTuneRequests> EnumTuneRequests; + + Result = m_GuideData->GetServices(&EnumTuneRequests); + + // check if enumerator was successfully retrieved + if(SUCCEEDED(Result)) + { + CComPtr<ITuneRequest> TuneRequest; + ULONG Items(0); + // enumerate all matching filter monikers + while (EnumTuneRequests->Next(1, &TuneRequest, &Items) == S_OK) + { + // pad out tune request to get all the details + // like locator and components + Result = TuneRequestInfo->GetLocatorData(TuneRequest); + CHECK(Result); + + Result = TuneRequestInfo->CreateComponentList(TuneRequest); + CHECK(Result); + + CComPtr<IEnumGuideDataProperties> EnumGuideDataProperties; + + Result = m_GuideData->GetServiceProperties(TuneRequest, &EnumGuideDataProperties); + if(SUCCEEDED(Result)) + { + CComBSTR Id; + CComBSTR Name; + + CComPtr<IGuideDataProperty> GuideDataProperty; + while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) + { + BSTR PropertyName; + GuideDataProperty->get_Name(&PropertyName); + if(wcsicmp(Name, L"Description.ID") == 0) + { + CComVariant Variant; + GuideDataProperty->get_Value(&Variant); + Id = (BSTR)Variant.bstrVal; + } + else if(wcsicmp(Name, L"Description.ID") == 0) + { + CComVariant Variant; + GuideDataProperty->get_Value(&Variant); + Name = (BSTR)Variant.bstrVal; + } + } + if(Id.Length() > 0 && Name.Length() > 0) + { + Result = UpdateTuneRequest(Id, TuneRequest, Name); + CHECK(Result); + } + } + else + { + CHECK(Result); + } + } + } + } + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::ServiceChanged(VARIANT varServiceDescriptionID) + { + ATLTRACE("ServiceChanged\n"); + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::ScheduleEntryChanged(VARIANT varScheduleEntryDescriptionID) + { + ATLTRACE("ScheduleEntryChanged\n"); + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::ProgramDeleted(VARIANT varProgramDescriptionID) + { + ATLTRACE("ProgramDeleted\n"); + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::ServiceDeleted(VARIANT varServiceDescriptionID) + { + ATLTRACE("ServiceDeleted\n"); + return S_OK; + } + + STDMETHODIMP CTuneRequestStore::ScheduleDeleted(VARIANT varScheduleEntryDescriptionID) + { + ATLTRACE("ScheduleDeleted\n"); + return S_OK; + } + + HRESULT CTuneRequestStore::UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name) + { + HRESULT Result = S_OK; + + for(int i(0); i < m_TuneInfos.size(); ++i) + { + if(m_TuneInfos[i] != NULL) + { + CComBSTR Id2; + Result = m_TuneInfos[i]->get_UniqueID(&Id2); + CHECK(Result); + + if(Id2 == Id) + { + Result = m_TuneInfos[i]->put_TuneRequest(TuneRequest); + return Result; + } + } + } + + // if we get down here then the Tune Request is new so lets add it + // to our list with the name given by the broadcaster + CComObject<CTuneInfo>* pTuneInfo = new CComObject<CTuneInfo>; + pTuneInfo->AddRef(); + + Result = pTuneInfo->put_UniqueID(Id); + CHECK(Result); + Result = pTuneInfo->put_Description(Name); + CHECK(Result); + Result = pTuneInfo->put_KeyedNumber(m_TuneInfos.size() + 1); + CHECK(Result); + Result = pTuneInfo->put_TuneRequest(TuneRequest); + CHECK(Result); + + m_TuneInfos.push_back(pTuneInfo); + + return Result; } Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneRequestStore.h 18 Feb 2003 08:00:52 -0000 1.2 --- TuneRequestStore.h 19 Feb 2003 15:05:19 -0000 1.3 *************** *** 13,17 **** public CComCoClass<CTuneRequestStore, &CLSID_TuneRequestStore>, public IPropertyBag, ! public IDispatchImpl<ITuneRequestStore, &IID_ITuneRequestStore, &LIBID_TUNEREQSTORELib> { public: --- 13,19 ---- public CComCoClass<CTuneRequestStore, &CLSID_TuneRequestStore>, public IPropertyBag, ! public IDispatchImpl<ITuneRequestStore, &IID_ITuneRequestStore, &LIBID_TUNEREQSTORELib>, ! public IDispatchImpl<IGuideDataEvent, &IID_IGuideDataEvent, &LIBID_PSISLOADLib> ! { public: *************** *** 30,37 **** public: ! STDMETHOD(CopyRequests)(/*[in]*/ IEnumTuneRequests* pEnumTuneRequests); // ITuneRequestStore ! STDMETHOD(get__NewEnum)(/*[out, retval]*/ IEnumTuneRequests** ppUnk); ! STDMETHOD(get_Item)(/*[in]*/ long Index, /*[out, retval]*/ ITuneRequest** pVal); STDMETHOD(get_Count)(/*[out, retval]*/ long* pVal); STDMETHOD(Save)(/*[in]*/ BSTR FileName); --- 32,40 ---- public: ! STDMETHOD(DetachTIF)(); ! STDMETHOD(AttachTIF)(/*[in]*/ IFilterGraph* pFilterGraph); // ITuneRequestStore ! STDMETHOD(get__NewEnum)(/*[out, retval]*/ IEnumTuneInfo** ppUnk); ! STDMETHOD(get_Item)(/*[in]*/ long Index, /*[out, retval]*/ ITuneInfo** pVal); STDMETHOD(get_Count)(/*[out, retval]*/ long* pVal); STDMETHOD(Save)(/*[in]*/ BSTR FileName); *************** *** 42,45 **** --- 45,57 ---- STDMETHOD(Write)(LPCOLESTR pwszPropName, VARIANT *pVar); + // IGuideDataEvent + STDMETHOD(GuideDataAcquired)(void); + STDMETHOD(ProgramChanged)(/*[in]*/ VARIANT varProgramDescriptionID); + STDMETHOD(ServiceChanged)(/*[in]*/ VARIANT varServiceDescriptionID); + STDMETHOD(ScheduleEntryChanged)(/*[in]*/ VARIANT varScheduleEntryDescriptionID); + STDMETHOD(ProgramDeleted)(/*[in]*/ VARIANT varProgramDescriptionID); + STDMETHOD(ServiceDeleted)(/*[in]*/ VARIANT varServiceDescriptionID); + STDMETHOD(ScheduleDeleted)(/*[in]*/ VARIANT varScheduleEntryDescriptionID); + private: void MangleXMLTagName(const WCHAR* pString, std::wstring& strOut); *************** *** 50,55 **** void EmptyArray(); HRESULT PopulateDOMDocument(IUnknown* pObject, const wchar_t* ObjectName); ! HRESULT UnpopulateDOMDocument(IErrorLog* pErrorLog, ITuneRequest** ppObject, const wchar_t* ObjectName); const wchar_t* MakeTagName(int ChannelIndex); private: --- 62,68 ---- void EmptyArray(); HRESULT PopulateDOMDocument(IUnknown* pObject, const wchar_t* ObjectName); ! HRESULT UnpopulateDOMDocument(IErrorLog* pErrorLog, ITuneInfo** ppObject, const wchar_t* ObjectName); const wchar_t* MakeTagName(int ChannelIndex); + HRESULT UpdateTuneRequest(BSTR Id, ITuneRequest* TuneRequest, BSTR Name); private: *************** *** 57,64 **** ElementStack m_stackElems; ! typedef CComEnumOnSTL<IEnumTuneRequests, &IID_IEnumTuneRequests, ITuneRequest*, _Copy<ITuneRequest*>, std::vector<ITuneRequest*> > ComSTLEnum; CComPtr<xml::IXMLDOMDocument> m_doc; CComPtr<xml::IXMLDOMElement> m_TopNode; ! std::vector<ITuneRequest*> m_TuneRequests; }; --- 70,81 ---- ElementStack m_stackElems; ! typedef CComEnumOnSTL<IEnumTuneInfo, &IID_IEnumTuneInfo, ITuneInfo*, _Copy<ITuneInfo*>, std::vector<ITuneInfo*> > ComSTLEnum; CComPtr<xml::IXMLDOMDocument> m_doc; CComPtr<xml::IXMLDOMElement> m_TopNode; ! CComPtr<IFilterGraph> m_FilterGraph; ! CComPtr<IConnectionPoint> m_ConnectionPoint; ! CComQIPtr<IGuideData> m_GuideData; ! DWORD m_GuideDataCookie; ! std::vector<ITuneInfo*> m_TuneInfos; }; Index: resource.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/resource.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** resource.h 17 Feb 2003 16:57:40 -0000 1.1.1.1 --- resource.h 19 Feb 2003 15:05:20 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- #define IDS_PROJNAME 100 #define IDR_TUNEREQUESTSTORE 101 + #define IDR_TUNEINFO 102 // Next default values for new objects *************** *** 13,17 **** #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 ! #define _APS_NEXT_SYMED_VALUE 102 #endif #endif --- 14,18 ---- #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 201 ! #define _APS_NEXT_SYMED_VALUE 103 #endif #endif |
From: <ad...@us...> - 2003-02-18 08:01:00
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv22360 Modified Files: TuneReqStore.h TuneRequestStore.cpp TuneRequestStore.h Log Message: Bug fixes for saving TuneRequests Index: TuneReqStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneReqStore.h 17 Feb 2003 17:08:07 -0000 1.2 --- TuneReqStore.h 18 Feb 2003 08:00:50 -0000 1.3 *************** *** 3,9 **** /* File created by MIDL compiler version 5.01.0164 */ ! /* at Mon Feb 17 17:02:57 2003 */ ! /* Compiler settings for C:\Source\Bdadev\TuneReqStore\TuneReqStore.idl: Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext error checks: allocation ref bounds_check enum stub_data --- 3,9 ---- /* File created by MIDL compiler version 5.01.0164 */ ! /* at Mon Feb 17 18:36:18 2003 */ ! /* Compiler settings for C:\Source\BDADev\TuneReqStore\TuneReqStore.idl: Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext error checks: allocation ref bounds_check enum stub_data Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneRequestStore.cpp 17 Feb 2003 17:08:07 -0000 1.2 --- TuneRequestStore.cpp 18 Feb 2003 08:00:51 -0000 1.3 *************** *** 103,107 **** { // This function is NOT reentrant ! if(m_doc == NULL) { return E_UNEXPECTED; --- 103,107 ---- { // This function is NOT reentrant ! if(m_doc != NULL) { return E_UNEXPECTED; *************** *** 143,147 **** { // This function is NOT reentrant ! if(m_doc == NULL) { return E_UNEXPECTED; --- 143,147 ---- { // This function is NOT reentrant ! if(m_doc != NULL) { return E_UNEXPECTED; *************** *** 152,155 **** --- 152,157 ---- HRESULT hr; + CHECK(m_doc->createElement(CComBSTR("ChannelList"), &m_TopNode)); + for(int i(0); i < m_TuneRequests.size(); ++i) { *************** *** 164,167 **** --- 166,171 ---- } + m_doc->appendChild(m_TopNode,0); + hr = m_doc->save(CComVariant(FileName)); *************** *** 553,559 **** CHECK(PersistObject(spPersistObj)); ! CHECK(m_doc->appendChild(m_stackElems.top(), 0)); m_stackElems.pop(); return S_OK; --- 557,565 ---- CHECK(PersistObject(spPersistObj)); ! CHECK(m_TopNode->appendChild(m_stackElems.top(), 0)); m_stackElems.pop(); + + ATLASSERT(m_stackElems.size() == 0); return S_OK; Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TuneRequestStore.h 17 Feb 2003 16:57:42 -0000 1.1.1.1 --- TuneRequestStore.h 18 Feb 2003 08:00:52 -0000 1.2 *************** *** 59,62 **** --- 59,63 ---- typedef CComEnumOnSTL<IEnumTuneRequests, &IID_IEnumTuneRequests, ITuneRequest*, _Copy<ITuneRequest*>, std::vector<ITuneRequest*> > ComSTLEnum; CComPtr<xml::IXMLDOMDocument> m_doc; + CComPtr<xml::IXMLDOMElement> m_TopNode; std::vector<ITuneRequest*> m_TuneRequests; |
From: <ad...@us...> - 2003-02-17 17:19:28
|
Update of /cvsroot/bdadev/SimpleTV In directory sc8-pr-cvs1:/tmp/cvs-serv15803 Modified Files: SIMPLETV.CPP SimpleTV.dsp Log Message: Test code for new channel store (commented out for now) Index: SIMPLETV.CPP =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SIMPLETV.CPP,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SIMPLETV.CPP 13 Feb 2003 09:40:33 -0000 1.2 --- SIMPLETV.CPP 17 Feb 2003 17:19:22 -0000 1.3 *************** *** 43,46 **** --- 43,50 ---- #pragma comment(lib, "USER32.LIB") + /* Test out new channel store code + #import "..\TuneReqStore\TuneReqStore.tlb" raw_interfaces_only no_implementation + */ + /****************************************************************************** ***** Global Definitions ***** *************** *** 2450,2453 **** --- 2454,2474 ---- Result = Application->GuideData->GetServices(&EnumTuneRequests); + /* Test out new channel store code + if(SUCCEEDED(Result)) + { + TUNEREQSTORELib::ITuneRequestStorePtr pStore; + Result = pStore.CreateInstance(__uuidof(TUNEREQSTORELib::TuneRequestStore)); + + if(SUCCEEDED(Result)) + { + pStore->CopyRequests((TUNEREQSTORELib::IEnumTuneRequests*)EnumTuneRequests); + BSTR FileName = SysAllocString(L"Channels.xml"); + pStore->Save(FileName); + SysFreeString(FileName); + } + } + */ + + // check if enumerator was successfully retrieved if (Result == S_OK) *************** *** 2462,2472 **** if (Result == S_OK) { ! printf("Enumerated a DVB Tune Request:\n"); ! DVBTuneRequest->get_ONID(&ID); ! printf("ONID = %d (0x%x), ", ID, ID); ! DVBTuneRequest->get_TSID(&ID); ! printf("TSID = %d (0x%x), ", ID, ID); ! DVBTuneRequest->get_SID(&ID); ! printf("SID = %d (0x%x)\n", ID, ID); Result = Application->TuneRequestInfo-> GetLocatorData(DVBTuneRequest); --- 2483,2493 ---- if (Result == S_OK) { ! printf("Enumerated a DVB Tune Request:\n"); ! DVBTuneRequest->get_ONID(&ID); ! printf("ONID = %d (0x%x), ", ID, ID); ! DVBTuneRequest->get_TSID(&ID); ! printf("TSID = %d (0x%x), ", ID, ID); ! DVBTuneRequest->get_SID(&ID); ! printf("SID = %d (0x%x)\n", ID, ID); Result = Application->TuneRequestInfo-> GetLocatorData(DVBTuneRequest); *************** *** 2496,2504 **** Locator->get_OuterFECRate(&OuterFECRate); Locator->get_SymbolRate(&SymbolRate); ! printf("Carrier Frequency = %d kHz\n", CarrierFrequency); ! printf("Inner FEC: Method = %d, Rate = %d\n", InnerFEC, InnerFECRate); ! printf("Modulation Type = %d\n", Modulation); ! printf("Outer FEC: Method = %d, Rate = %d\n", OuterFEC, OuterFECRate); ! printf("Symbol Rate = %d\n", SymbolRate); Locator->Release(); }; --- 2517,2525 ---- Locator->get_OuterFECRate(&OuterFECRate); Locator->get_SymbolRate(&SymbolRate); ! printf("Carrier Frequency = %d kHz\n", CarrierFrequency); ! printf("Inner FEC: Method = %d, Rate = %d\n", InnerFEC, InnerFECRate); ! printf("Modulation Type = %d\n", Modulation); ! printf("Outer FEC: Method = %d, Rate = %d\n", OuterFEC, OuterFECRate); ! printf("Symbol Rate = %d\n", SymbolRate); Locator->Release(); }; *************** *** 2532,2542 **** while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) { ! VariantInit(&Variant); ! GuideDataProperty->get_Language(&LangID); ! GuideDataProperty->get_Name(&Name); ! GuideDataProperty->get_Value(&Variant); ! wprintf(L"Property (Language %d): |%s| = |%s|\n", ! LangID, Name, Variant.bstrVal); ! VariantClear(&Variant); GuideDataProperty->Release(); }; --- 2553,2563 ---- while (EnumGuideDataProperties->Next(1, &GuideDataProperty, &Items) == S_OK) { ! VariantInit(&Variant); ! GuideDataProperty->get_Language(&LangID); ! GuideDataProperty->get_Name(&Name); ! GuideDataProperty->get_Value(&Variant); ! wprintf(L"Property (Language %d): |%s| = |%s|\n", ! LangID, Name, Variant.bstrVal); ! VariantClear(&Variant); GuideDataProperty->Release(); }; *************** *** 2699,2702 **** --- 2720,2726 ---- // // $Log$ + // Revision 1.3 2003/02/17 17:19:22 adcockj + // Test code for new channel store (commented out for now) + // // Revision 1.2 2003/02/13 09:40:33 adcockj // Removed compiler warnings Index: SimpleTV.dsp =================================================================== RCS file: /cvsroot/bdadev/SimpleTV/SimpleTV.dsp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SimpleTV.dsp 13 Feb 2003 09:24:09 -0000 1.1.1.1 --- SimpleTV.dsp 17 Feb 2003 17:19:23 -0000 1.2 *************** *** 49,54 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "SimpleTV - Win32 Debug" --- 49,54 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "SimpleTV - Win32 Debug" *************** *** 65,70 **** # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" --- 65,70 ---- # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" *************** *** 73,78 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF --- 73,78 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF |
From: <ad...@us...> - 2003-02-17 17:08:31
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv10126 Modified Files: TuneReqStore.dsp Log Message: Fixed release compile Index: TuneReqStore.dsp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.dsp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TuneReqStore.dsp 17 Feb 2003 16:57:41 -0000 1.1.1.1 --- TuneReqStore.dsp 17 Feb 2003 17:08:25 -0000 1.2 *************** *** 43,48 **** # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c ! # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /Yu"stdafx.h" /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" --- 43,48 ---- # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" ! # ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c ! # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /Yu"stdafx.h" /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" *************** *** 80,84 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c ! # ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" --- 80,84 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c ! # ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /Yu"stdafx.h" /FD /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" |