Lines Matching refs:uri
32 {"", UriHelper::UriType::URI_TYPE_FILE }, // empty uri head is treated as the file type uri.
113 UriHelper::UriHelper(const std::string_view &uri)
115 FormatMeForUri(uri);
131 void UriHelper::FormatMeForUri(const std::string_view &uri) noexcept
135 CHECK_AND_RETURN_LOG(!uri.empty(), "uri is empty");
136 auto [head, body] = SplitUriHeadAndBody(uri);
139 // verify whether the uri is readable and generate the formatted uri.
164 MEDIA_LOGD("0x%{public}06" PRIXPTR " formatted uri: %{private}s", FAKE_POINTER(this), formattedUri_.c_str());
221 CHECK_AND_RETURN_RET_LOG(fd_ > 0, false, "Fail to get file descriptor from uri, fd %{public}d", fd_);
230 bool UriHelper::ParseFdUri(std::string_view uri)
234 std::string_view::size_type delim1 = uri.find("?");
235 std::string_view::size_type delim2 = uri.find("&");
237 CHECK_AND_RETURN_RET_LOG(StrToInt(uri, fd_), false, "Invalid fd url");
239 std::string_view fdstr = uri.substr(0, delim1);
241 CHECK_AND_RETURN_RET_LOG(StrToInt(fdstr, fd) && delim1 + delim1Len < uri.size()
243 std::string_view offsetStr = uri.substr(delim1 + delim1Len, delim2 - delim1 - delim1Len);
244 CHECK_AND_RETURN_RET_LOG(StrToInt(offsetStr, offset_) && delim2 + delim2Len < uri.size(), false,
246 std::string_view sizeStr = uri.substr(delim2 + delim2Len);
256 MEDIA_LOGE("invalid fd uri: %{private}s", uri.data());
260 MEDIA_LOGD("parse fd uri, fd: %{public}d, offset: %{public}" PRIi64 ", size: %{public}" PRIi64,