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 |