namespace {
const DPL::String FILE_URI_BEGIN = L"file://";
const DPL::String WIDGET_URI_BEGIN = L"widget://";
+const DPL::String APP_URI_BEGIN = L"app://";
const DPL::String LOCALE_PREFIX = L"locales/";
DPL::Optional<std::string> GetFilePathInWidgetPackageInternal(
req.erase(0, position + 1);
}
}
+ } else if(req.find(APP_URI_BEGIN) == 0) {
+ req.erase(0, APP_URI_BEGIN.length());
+ DPL::String id = *dao->getTizenAppId();
+ if(req.substr(0, id.size()) != id)
+ {
+ LogError("Tizen id does not match, ignoring");
+ return DPL::Optional<DPL::String>::Null;
+ }
+ req.erase(0, id.length());
} else {
LogDebug("Unknown path format, ignoring");
return DPL::Optional<DPL::String>::Null;
auto widgetPath = dao->getPath();
+ LogDebug("Required path: " << req);
DPL::Optional<DPL::String> found =
GetFilePathInWidgetPackageInternal(widgetPath, req);
// Unfortunatly all widgets are using file protocol to load its data from
// hard drive. What's why we cannot check any iri with file schema.
-const char *IRI_IGNORED_SCHEME[] = { "file://", "widget://", "tel:", "sms:",
- "mmsto:", "mailto:", "data:", "blob:", 0 };
+const char *IRI_IGNORED_SCHEME[] = { "file://", "widget://", "app://", "tel:",
+ "sms:", "mmsto:", "mailto:", "data:", "blob:",
+ 0 };
const DPL::String SCHEMA_HTTP = DPL::FromUTF8String("http");
const DPL::String SCHEMA_HTTPS = DPL::FromUTF8String("https");