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 |