bool CPVRTimerInfoTag::DeleteFromClient(bool force) const { try { CLIENTMAP *clients = CPVRManager::Get()->Clients(); /* and write it to the backend */ PVR_ERROR err = clients->find(m_iClientID)->second->DeleteTimer(*this, force); if (err == PVR_ERROR_RECORDING_RUNNING) { if (CGUIDialogYesNo::ShowAndGetInput(122,0,19122,0)) err = clients->find(m_iClientID)->second->DeleteTimer(*this, true); } if (err != PVR_ERROR_NO_ERROR) throw err; return true; } catch (PVR_ERROR err) { DisplayError(err); } return false; }
bool CPVRTimerInfoTag::RenameOnClient(const CStdString &newname) const { try { CLIENTMAP *clients = CPVRManager::Get()->Clients(); /* and write it to the backend */ PVR_ERROR err = clients->find(m_iClientID)->second->RenameTimer(*this, newname); if (err == PVR_ERROR_NOT_IMPLEMENTED) err = clients->find(m_iClientID)->second->UpdateTimer(*this); if (err != PVR_ERROR_NO_ERROR) throw err; return true; } catch (PVR_ERROR err) { DisplayError(err); } return false; }
bool CPVRRecording::Delete(void) const { try { CLIENTMAP *clients = CPVRManager::Get()->Clients(); /* and write it to the backend */ PVR_ERROR err = clients->find(m_clientID)->second->DeleteRecording(*this); if (err != PVR_ERROR_NO_ERROR) throw err; return true; } catch (PVR_ERROR err) { DisplayError(err); } return false; }
bool CPVRRecording::Rename(const CStdString &strNewName) const { try { CLIENTMAP *clients = CPVRManager::Get()->Clients(); /* and write it to the backend */ PVR_ERROR err = clients->find(m_clientID)->second->RenameRecording(*this, strNewName); if (err != PVR_ERROR_NO_ERROR) throw err; CPVRManager::GetRecordings()->Update(true); // async update return true; } catch (PVR_ERROR err) { DisplayError(err); } return false; }
bool CPVRTimerInfoTag::UpdateOnClient() const { try { CLIENTMAP *clients = CPVRManager::Get()->Clients(); /* and write it to the backend */ PVR_ERROR err = clients->find(m_iClientID)->second->UpdateTimer(*this); if (err != PVR_ERROR_NO_ERROR) throw err; if (m_StartTime < CDateTime::GetCurrentDateTime() && m_StopTime > CDateTime::GetCurrentDateTime()) CPVRManager::Get()->TriggerRecordingsUpdate(); return true; } catch (PVR_ERROR err) { DisplayError(err); } return false; }