75 QFile mapFile(keyValueMapsLocation() + keyValueMapPath);
76 if (mapFile.open(QIODevice::ReadOnly)) {
77 QByteArray mapFileContents = mapFile.readAll();
78 QJsonDocument mapDocument = QJsonDocument::fromJson(mapFileContents);
79 if (mapDocument.isObject()) {
80 QJsonObject mapObject = mapDocument.object();
89 const mmr_error_info_t *
const mmError = mmr_error_info(context);
92 *errorCode = mmError->error_code;
95 return QString::fromLatin1(
"%1: %2 (code %3)").arg(msg).arg(QString::fromUtf8(mmErrors[mmError->error_code].name))
96 .arg(mmError->error_code);
98 return QString::fromLatin1(
"%1: Unknown error code %2").arg(msg).arg(mmError->error_code);
104 QDir sandboxDir = QDir::home();
107 QFile file(sandboxDir.filePath(QString::fromUtf8(
"app/native/bar-descriptor.xml")));
108 if (!file.open(QIODevice::ReadOnly)) {
109 qWarning() <<
"checkForDrmPermission: Unable to open bar-descriptor.xml";
113 QXmlStreamReader reader(&file);
114 while (!reader.atEnd()) {
115 reader.readNextStartElement();
116 if (reader.name() == QLatin1String(
"action")
117 || reader.name() == QLatin1String(
"permission")) {
118 if (reader.readElementText().trimmed() == QLatin1String(
"access_protected_media"))