void CIRTranslator::Load() { #if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE) Clear(); std::string irMapName; #ifdef TARGET_POSIX irMapName = "Lircmap.xml"; #else irMapName = "IRSSmap.xml"; #endif bool success = false; std::string irMapPath = URIUtils::AddFileToFolder("special://xbmc/system/", irMapName); if (XFILE::CFile::Exists(irMapPath)) success |= LoadIRMap(irMapPath); else CLog::Log(LOGDEBUG, "CIRTranslator::Load - no system %s found, skipping", irMapName.c_str()); irMapPath = CProfilesManager::GetInstance().GetUserDataItem(irMapName); if (XFILE::CFile::Exists(irMapPath)) success |= LoadIRMap(irMapPath); else CLog::Log(LOGDEBUG, "CIRTranslator::Load - no userdata %s found, skipping", irMapName.c_str()); if (!success) CLog::Log(LOGERROR, "CIRTranslator::Load - unable to load remote map %s", irMapName.c_str()); #endif }
void CIRTranslator::Load(const std::string &irMapName) { if (irMapName.empty()) return; Clear(); bool success = false; std::string irMapPath = URIUtils::AddFileToFolder("special://xbmc/system/", irMapName); if (XFILE::CFile::Exists(irMapPath)) success |= LoadIRMap(irMapPath); else CLog::Log(LOGDEBUG, "CIRTranslator::Load - no system %s found, skipping", irMapName.c_str()); irMapPath = CServiceBroker::GetSettingsComponent()->GetProfileManager()->GetUserDataItem(irMapName); if (XFILE::CFile::Exists(irMapPath)) success |= LoadIRMap(irMapPath); else CLog::Log(LOGDEBUG, "CIRTranslator::Load - no userdata %s found, skipping", irMapName.c_str()); if (!success) CLog::Log(LOGERROR, "CIRTranslator::Load - unable to load remote map %s", irMapName.c_str()); }