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" |